好友
阅读权限10
听众
最后登录1970-1-1
|
大牛可以飘过了,由于今年署期52没有CM大赛,看到八爷写的160的教程,于是自己也想挑战下这160个CM看看能否全部坚持把注册机,纯汇编编写的注册机,给在学习的朋友们一个参考
(ps:蛋疼的浮点指令)
以下直接贴出源码
第三题 AfKayAs.2
.386
.model flat, stdcall ;32 bit memory model
option casemap :none ;case sensitive
include 360个CM之AfKayAs.2注册机.inc
.code
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke InitCommonControls
invoke DialogBoxParam,hInstance,IDD_DIALOG1,NULL,addr DlgProc,NULL
invoke ExitProcess,0
;########################################################################
DlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL @buffer[256]:byte
mov eax,uMsg
.if eax==WM_INITDIALOG
invoke LoadIcon,hInstance,APP_ICON
invoke SendMessage,hWin,WM_SETICON,ICON_BIG,eax
.elseif eax==WM_COMMAND
mov eax,wParam
.if ax==IDC_OK
INVOKE GetDlgItemText,hWin,IDC_NAME,addr @buffer,256
imul eax,eax,15B38H
mov edi,eax
lea eax,@buffer
movzx eax,byte ptr ds:[eax]
add edi,eax
invoke wsprintf,addr @buffer,offset szqian,edi
invoke FpuAtoFL,addr @buffer,0,DEST_FPU
fld dword ptr dwshishu
fdiv dword ptr dwchushu
fstsw ax
faddp st(1),st
fstsw ax
fmul qword ptr dwchengshu
fsub qword ptr dwjianshu
fstsw ax
fsub qword ptr dwjianshu2
invoke FpuFLtoA,0,0,offset szinput,SRC1_FPU OR SRC2_DIMM OR STR_REG
lea eax,szinput
inc eax
invoke SetDlgItemText,hWin,IDC_REG,eax
.endif
.elseif eax==WM_CLOSE
invoke EndDialog,hWin,0
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
DlgProc endp
end start
AfKayAs.2原程序 注册机.rar
(27.51 KB, 下载次数: 3)
|
|