exe.asm

来自「crc源代码」· 汇编 代码 · 共 52 行

ASM
52
字号
.386
.model	flat, stdcall
option	casemap:none

include		EXE.inc
CRC32		PROTO	:DWORD,:DWORD
Main		PROTO
.code
start:



	push	esi
	push	ecx
	push	edx

	mov	esi,  Main			; Address To Start CRC Check
	xor	edx, edx
	or	eax, -1
	mov	ecx, 37				; No. of bytes to CRC check

CRC32_loop:
	mov	dl, byte ptr [esi]
	xor	dl, al
	shr	eax, 8
	xor	eax, dword ptr [crc32_table+ 4*edx]
	inc	esi
	dec	ecx
	jnz	CRC32_loop

	not	eax

	pop	edx
	pop	ecx
	pop	esi

cmp eax,07DD07FEh			; The Real CRC checksum for the segment
je Main
err:
invoke MessageBox,0,addr Modify,addr MsgCaption,MB_ICONERROR
invoke ExitProcess,NULL


Main proc 
	invoke MessageBox, NULL,addr MsgBoxText, addr MsgCaption,MB_OK
	invoke ExitProcess,NULL
Main 	endp
	
	

end start

⌨️ 快捷键说明

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