include windows.inc
include kernel32.inc
include user32.inc
includelib kernel32.lib
includelib user32.lib
.data?
hKeyFile dd ?
dwBytesRead dd ?
.const
szKeyFileName db 'thekey.nk',0
szMessCap db 'message',0
szBadboy db 'The program will continue in trial mode.', 0
szGoodboy db 'Thanks for registering. The program is unlocked now.', 0
.code
_HomeProc proc
local loc_Buff[8]:byte ;分配8字节缓冲区,作溢出用
invoke CreateFile, offset szKeyFileName, GENERIC_READ, FILE_SHARE_READ, \
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL
cmp eax, INVALID_HANDLE_VALUE
jne @F
ret