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

📄 main.asm

📁 基于二进制模2除法的简单流加解密算法。要求被加密的数据至少8字节
💻 ASM
📖 第 1 页 / 共 5 页
字号:
; Line 36
	jae	SHORT $l1$9503
; Line 37
	xor	eax, DWORD PTR _key$[ebp]
; Line 38
	stc
$l1$9503:
; Line 40
	rcr	ebx, 1
; Line 41
	dec	cl
; Line 42
	jne	SHORT $lp1$9502
; Line 44
	mov	DWORD PTR [edi], ebx
; Line 45
	add	edi, 4
; Line 47
	mov	ebx, DWORD PTR _nsize$[ebp]
; Line 48
	sub	ebx, 4
; Line 49
	mov	DWORD PTR _nsize$[ebp], ebx
; Line 50
	jne	SHORT $lp2$9501
; Line 52
	mov	DWORD PTR [edi], eax
; Line 56
	xor	eax, eax
$L9499:
; Line 57
	pop	edi
	pop	esi
	pop	ebx
	add	esp, 192				; 000000c0H
	cmp	ebp, esp
	call	__RTC_CheckEsp
	mov	esp, ebp
	pop	ebp
	ret	0
?encry@@YAHPAE0HH@Z ENDP				; encry
_TEXT	ENDS
PUBLIC	?decry@@YAHPAE0HH@Z				; decry
; Function compile flags: /Odt /RTCsu /ZI
;	COMDAT ?decry@@YAHPAE0HH@Z
_TEXT	SEGMENT
_src$ = 8						; size = 4
_des$ = 12						; size = 4
_nsize$ = 16						; size = 4
_key$ = 20						; size = 4
?decry@@YAHPAE0HH@Z PROC NEAR				; decry, COMDAT
; Line 61
	push	ebp
	mov	ebp, esp
	sub	esp, 192				; 000000c0H
	push	ebx
	push	esi
	push	edi
	lea	edi, DWORD PTR [ebp-192]
	mov	ecx, 48					; 00000030H
	mov	eax, -858993460				; ccccccccH
	rep stosd
; Line 62
	cmp	DWORD PTR _nsize$[ebp], 8
	jge	SHORT $L9510
	mov	eax, 1
	jmp	SHORT $L9509
$L9510:
; Line 67
	mov	esi, DWORD PTR _src$[ebp]
; Line 68
	mov	edi, DWORD PTR _des$[ebp]
; Line 69
	xor	eax, eax
; Line 71
	mov	ebx, DWORD PTR _nsize$[ebp]
; Line 72
	sub	ebx, 4
; Line 73
	mov	DWORD PTR _nsize$[ebp], ebx
$lp2$9511:
; Line 76
	mov	edx, DWORD PTR [esi]
; Line 77
	add	esi, 4
; Line 78
	mov	cl, 32					; 00000020H
$lp1$9512:
; Line 80
	shr	edx, 1
; Line 81
	jae	SHORT $l10$9513
; Line 82
	shr	eax, 1
; Line 83
	cmc
; Line 84
	rcr	ebx, 1
; Line 85
	xor	eax, DWORD PTR _key$[ebp]
; Line 86
	jmp	SHORT $l11$9514
$l10$9513:
; Line 88
	shr	eax, 1
; Line 89
	rcr	ebx, 1
$l11$9514:
; Line 91
	dec	cl
; Line 92
	jne	SHORT $lp1$9512
; Line 94
	mov	DWORD PTR [edi], ebx
; Line 95
	add	edi, 4
; Line 97
	mov	ebx, DWORD PTR _nsize$[ebp]
; Line 98
	sub	ebx, 4
; Line 99
	mov	DWORD PTR _nsize$[ebp], ebx
; Line 100
	jne	SHORT $lp2$9511
; Line 103
	xor	eax, DWORD PTR [esi]
; Line 104
	mov	DWORD PTR [edi], eax
; Line 108
	xor	eax, eax
$L9509:
; Line 109
	pop	edi
	pop	esi
	pop	ebx
	add	esp, 192				; 000000c0H
	cmp	ebp, esp
	call	__RTC_CheckEsp
	mov	esp, ebp
	pop	ebp
	ret	0
?decry@@YAHPAE0HH@Z ENDP				; decry
_TEXT	ENDS
PUBLIC	?encrystream@@YAXPAU_iobuf@@0H@Z		; encrystream
EXTRN	_memset:NEAR
EXTRN	_fread:NEAR
EXTRN	_fseek:NEAR
EXTRN	_ftell:NEAR
EXTRN	_fwrite:NEAR
EXTRN	@_RTC_CheckStackVars@8:NEAR
; Function compile flags: /Odt /RTCsu /ZI
;	COMDAT ?encrystream@@YAXPAU_iobuf@@0H@Z
_TEXT	SEGMENT
_n$ = -292						; size = 4
_size$ = -280						; size = 4
_obuf$ = -268						; size = 128
_ibuf$ = -132						; size = 128
_fs$ = 8						; size = 4
_fd$ = 12						; size = 4
_key$ = 16						; size = 4
?encrystream@@YAXPAU_iobuf@@0H@Z PROC NEAR		; encrystream, COMDAT
; Line 113
	push	ebp
	mov	ebp, esp
	sub	esp, 488				; 000001e8H
	push	ebx
	push	esi
	push	edi
	lea	edi, DWORD PTR [ebp-488]
	mov	ecx, 122				; 0000007aH
	mov	eax, -858993460				; ccccccccH
	rep stosd
; Line 117
	push	2
	push	0
	mov	eax, DWORD PTR _fs$[ebp]
	push	eax
	call	_fseek
	add	esp, 12					; 0000000cH
; Line 118
	mov	eax, DWORD PTR _fs$[ebp]
	push	eax
	call	_ftell
	add	esp, 4
	mov	DWORD PTR _size$[ebp], eax
; Line 119
	push	0
	push	0
	mov	eax, DWORD PTR _fs$[ebp]
	push	eax
	call	_fseek
	add	esp, 12					; 0000000cH
; Line 120
	mov	eax, DWORD PTR _fd$[ebp]
	push	eax
	push	1
	push	4
	lea	ecx, DWORD PTR _size$[ebp]
	push	ecx
	call	_fwrite
	add	esp, 16					; 00000010H
$L9526:
; Line 122
	mov	eax, DWORD PTR _fs$[ebp]
	mov	ecx, DWORD PTR [eax+12]
	and	ecx, 16					; 00000010H
	jne	$L9519
; Line 123
	push	128					; 00000080H
	push	0
	lea	eax, DWORD PTR _ibuf$[ebp]
	push	eax
	call	_memset
	add	esp, 12					; 0000000cH
; Line 124
	mov	eax, DWORD PTR _fs$[ebp]
	push	eax
	push	128					; 00000080H
	push	1
	lea	ecx, DWORD PTR _ibuf$[ebp]
	push	ecx
	call	_fread
	add	esp, 16					; 00000010H
	mov	DWORD PTR _n$[ebp], eax
; Line 125
	mov	eax, DWORD PTR _key$[ebp]
	push	eax
	push	128					; 00000080H
	lea	ecx, DWORD PTR _obuf$[ebp]
	push	ecx
	lea	edx, DWORD PTR _ibuf$[ebp]
	push	edx
	call	?encry@@YAHPAE0HH@Z			; encry
	add	esp, 16					; 00000010H
; Line 126
	mov	eax, DWORD PTR _fd$[ebp]
	push	eax
	push	128					; 00000080H
	push	1
	lea	ecx, DWORD PTR _obuf$[ebp]
	push	ecx
	call	_fwrite
	add	esp, 16					; 00000010H
; Line 127
	mov	eax, DWORD PTR _size$[ebp]
	sub	eax, DWORD PTR _n$[ebp]
	mov	DWORD PTR _size$[ebp], eax
; Line 128
	jmp	$L9526
$L9519:
; Line 129
	push	edx
	mov	ecx, ebp
	push	eax
	lea	edx, DWORD PTR $L10980
	call	@_RTC_CheckStackVars@8
	pop	eax
	pop	edx
	pop	edi
	pop	esi
	pop	ebx
	add	esp, 488				; 000001e8H
	cmp	ebp, esp
	call	__RTC_CheckEsp
	mov	esp, ebp
	pop	ebp
	ret	0
$L10980:
	DD	3
	DD	$L10979
$L10979:
	DD	-132					; ffffff7cH
	DD	128					; 00000080H
	DD	$L10976
	DD	-268					; fffffef4H
	DD	128					; 00000080H
	DD	$L10977
	DD	-280					; fffffee8H
	DD	4
	DD	$L10978
$L10978:
	DB	115					; 00000073H
	DB	105					; 00000069H
	DB	122					; 0000007aH
	DB	101					; 00000065H
	DB	0
$L10977:
	DB	111					; 0000006fH
	DB	98					; 00000062H
	DB	117					; 00000075H
	DB	102					; 00000066H
	DB	0
$L10976:
	DB	105					; 00000069H
	DB	98					; 00000062H
	DB	117					; 00000075H
	DB	102					; 00000066H
	DB	0
?encrystream@@YAXPAU_iobuf@@0H@Z ENDP			; encrystream
_TEXT	ENDS
PUBLIC	?decrystream@@YAXPAU_iobuf@@0H@Z		; decrystream
; Function compile flags: /Odt /RTCsu /ZI
;	COMDAT ?decrystream@@YAXPAU_iobuf@@0H@Z
_TEXT	SEGMENT
_n$ = -292						; size = 4
_size$ = -280						; size = 4
_obuf$ = -268						; size = 128
_ibuf$ = -132						; size = 128
_fs$ = 8						; size = 4
_fd$ = 12						; size = 4
_key$ = 16						; size = 4
?decrystream@@YAXPAU_iobuf@@0H@Z PROC NEAR		; decrystream, COMDAT
; Line 133
	push	ebp
	mov	ebp, esp
	sub	esp, 488				; 000001e8H
	push	ebx
	push	esi
	push	edi
	lea	edi, DWORD PTR [ebp-488]
	mov	ecx, 122				; 0000007aH
	mov	eax, -858993460				; ccccccccH
	rep stosd
; Line 137
	push	0
	push	0
	mov	eax, DWORD PTR _fs$[ebp]
	push	eax
	call	_fseek
	add	esp, 12					; 0000000cH
; Line 138
	mov	eax, DWORD PTR _fs$[ebp]
	push	eax
	push	1
	push	4
	lea	ecx, DWORD PTR _size$[ebp]
	push	ecx
	call	_fread
	add	esp, 16					; 00000010H
$L9539:
; Line 140
	mov	eax, DWORD PTR _fs$[ebp]
	mov	ecx, DWORD PTR [eax+12]
	and	ecx, 16					; 00000010H
	jne	$L9532
	cmp	DWORD PTR _size$[ebp], 0
	jle	$L9532
; Line 141
	push	128					; 00000080H
	push	0
	lea	eax, DWORD PTR _ibuf$[ebp]
	push	eax
	call	_memset
	add	esp, 12					; 0000000cH
; Line 142
	mov	eax, DWORD PTR _fs$[ebp]
	push	eax
	push	128					; 00000080H
	push	1
	lea	ecx, DWORD PTR _ibuf$[ebp]
	push	ecx
	call	_fread
	add	esp, 16					; 00000010H
	mov	DWORD PTR _n$[ebp], eax
; Line 143
	mov	eax, DWORD PTR _key$[ebp]
	push	eax
	push	128					; 00000080H
	lea	ecx, DWORD PTR _obuf$[ebp]
	push	ecx
	lea	edx, DWORD PTR _ibuf$[ebp]
	push	edx
	call	?decry@@YAHPAE0HH@Z			; decry
	add	esp, 16					; 00000010H
; Line 144
	cmp	DWORD PTR _size$[ebp], 128		; 00000080H
	jge	SHORT $L9541
; Line 145
	mov	eax, DWORD PTR _fd$[ebp]
	push	eax
	mov	ecx, DWORD PTR _size$[ebp]
	push	ecx
	push	1
	lea	edx, DWORD PTR _obuf$[ebp]
	push	edx
	call	_fwrite
	add	esp, 16					; 00000010H
; Line 146

⌨️ 快捷键说明

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