.386
.model flat,stdcall
option casemap:none
include windows.inc
include user32.inc
include kernel32.inc
include comctl32.inc
include comdlg32.inc
include masm32.inc
includelib masm32.lib
includelib user32.lib
includelib kernel32.lib
includelib comctl32.lib
includelib comdlg32.lib
DLG_MAIN equ 100
IDGEN equ 10
Edit1 equ 11
Edit2 equ 12
Edit3 equ 13
BFLEFT EQU BFHIGH
BFRIGHT EQU BFLOW
IDABOUT EQU 17
STATIC1 equ 14
STATIC2 equ 15
STATIC3 equ 16
IDI_ICO equ 101
_ProcDlgMain PROTO :DWORD,:DWORD,:DWORD,:DWORD
.data?
hInstance dd ?
.data
STRABOUT1 DB "任何问题,提议,请联系",0
STRABOUT2 DB "firingme@sina.com",0
STRDEF1 DB "仅以此献给我们可爱的CCG",0
STRDEF2 DB " 祝愿它蒸蒸日上!",0
szOK DB "OK",0
szABOUT DB "ABOUT",0
szID DB 10 DUP(0)
NAMEERR DB "名字,Email长度不能为0",0
szName db 100 dup(0)
szEmail db 100 dup(0)
szSn db "FAR22-%s-00000-%s",0
szTemp1 db 10 dup (0)
szTemp2 db 10 dup (0)
szAAA db "AAAAA",0
szLast db 100 dup (0)
magicnum dw 0
NameLen dd 0
EmailLen dd 0
Num dd 0
.code
;消息处理函数
_ProcDlgMain proc uses ebx edi esi edx ecx,hWnd:DWORD,wMsg:DWORD,wParam:DWORD,lParam:DWORD
mov eax,wMsg
.if eax==WM_CLOSE
invoke EndDialog,hWnd,NULL
.ELSEif eax==WM_INITDIALOG
invoke LoadIcon,hInstance,IDI_ICO
invoke SendMessage,hWnd,WM_SETICON,ICON_BIG,EAX
MOV EAX,FALSE
RET
.elseif eax==WM_COMMAND
mov eax,wParam
and eax,0ffffh
.if eax==IDGEN
invoke GetDlgItem,hWnd,Edit2
invoke SetFocus,EAX
invoke GetDlgItemText,hWnd,Edit1,offset szName,100
mov NameLen,eax
.if eax==0
jmp @ERR
.endif
invoke GetDlgItemText,hWnd,Edit2,offset szEmail,100
mov EmailLen,eax
.if eax==0
jmp @ERR
.endif
MOV ECX,NameLen
add EmailLen,ecx
mov esi,offset szName
MOV EdI,OFFSET szEmail
add edi,eax
rep movsb
mov ecx,EmailLen
mov esi,offset szEmail
mov edi,offset szTemp1
xor eax,eax
xor ebx,ebx
@@1:
lodsb
.if (eax>40h)&&(eax<5bh)
stosb
inc ebx
.if ebx==5
jmp @@3
.endif
.endif
loop @@1
mov esi,offset szAAA
mov ecx,5
sub ecx,ebx
rep movsb
@@3:
mov byte ptr [edi],0
mov magicnum,13820
mov ecx,5
xor eax,eax
mov esi,offset szTemp1
@@2:
lodsb
sub ax,41h
imul ax,10
add magicnum,ax
loop @@2
mov ax,magicnum
cwd
invoke dwtoa,eax,offset szTemp2
invoke wsprintf,offset szLast,offset szSn,offset szTemp1,offset szTemp2
invoke SetDlgItemText,hWnd,Edit3,offset szLast
mov eax,FALSE
ret
@ERR:
invoke SetDlgItemText,hWnd,Edit2,NULL
invoke SendDlgItemMessage,hWnd,Edit1,EM_SETREADONLY,TRUE,NULL
invoke SendDlgItemMessage,hWnd,Edit2,EM_SETREADONLY,TRUE,NULL
invoke SetDlgItemText,hWnd,STATIC1,offset NAMEERR
invoke SetDlgItemText,hWnd,STATIC2,NULL
invoke SetDlgItemText,hWnd,IDABOUT,OFFSET szOK
MOV EAX,FALSE
RET
.elseif eax==IDABOUT
invoke GetDlgItemText,hWnd,IDABOUT,OFFSET szID,5
MOVZX EAX,BYTE PTR [szID]
.IF EAX==79 ;此时显示的是OK
invoke GetDlgItem,hWnd,Edit1
invoke SetFocus,eax
invoke SendDlgItemMessage,hWnd,Edit1,EM_SETREADONLY,FALSE,NULL
invoke SendDlgItemMessage,hWnd,Edit2,EM_SETREADONLY,FALSE,NULL
invoke SetDlgItemText,hWnd,STATIC1,offset STRDEF1
invoke SetDlgItemText,hWnd,STATIC2,offset STRDEF2
invoke SetDlgItemText,hWnd,IDABOUT,offset szABOUT
MOV EAX,FALSE
RET
.ELSE
invoke GetDlgItem,hWnd,Edit2
invoke SetFocus,eax
invoke SendDlgItemMessage,hWnd,Edit1,EM_SETREADONLY,TRUE,NULL
invoke SendDlgItemMessage,hWnd,Edit2,EM_SETREADONLY,TRUE,NULL
invoke SetDlgItemText,hWnd,STATIC1,offset STRABOUT1
invoke SetDlgItemText,hWnd,STATIC2,offset STRABOUT2
invoke SetDlgItemText,hWnd,IDABOUT,offset szOK
MOV EAX,FALSE
RET
.ENDIF
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,FALSE
RET
_ProcDlgMain endp
;主程序
start:
invoke InitCommonControls
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke DialogBoxParam,hInstance,DLG_MAIN,NULL,offset _ProcDlgMain,0
invoke ExitProcess,NULL
end start
end
相关视频
相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么
热门文章 去除winrar注册框方法
最新文章
比特币病毒怎么破解 比去除winrar注册框方法
华为无线路由器HG522-C破解教程(附超级密码JEB格式文件京东电子书下载和阅读限制破解教UltraISO注册码全集(最新)通过Access破解MSSQL获得数据
人气排行 华为无线路由器HG522-C破解教程(附超级密码JEB格式文件京东电子书下载和阅读限制破解教UltraISO注册码全集(最新)qq相册密码破解方法去除winrar注册框方法(适应任何版本)怎么用手机破解收费游戏华为无线猫HG522破解如何给软件脱壳基础教程
查看所有0条评论>>