这里的序列号根本就不用算,直接就是输入的字符,而且序列号也是静态存储的 没啥意思
.text:00401512
.text:00401512 ; =============== S U B R O U T I N E =======================================
.text:00401512
.text:00401512 ; Attributes: bp-based frame
.text:00401512
.text:00401512 sub_401512 proc near ; DATA XREF: .rdata:004024FC↓o
.text:00401512
.text:00401512 var_20 = dword ptr -20h
.text:00401512 String2 = byte ptr -1Ch
.text:00401512 var_18 = dword ptr -18h
.text:00401512 var_14 = word ptr -14h
.text:00401512 String1Len = dword ptr -10h
.text:00401512 String1 = byte ptr -0Ch
.text:00401512 .0 = dword ptr -0Ah
.text:00401512 var_6 = dword ptr -6
.text:00401512
.text:00401512 push ebp
.text:00401513 mov ebp, esp
.text:00401515 sub esp, 20h
.text:00401518 mov [ebp+var_20], ecx ; 初始化变量
.text:0040151B mov ax, word_40315C
.text:00401521 mov word ptr [ebp+String1], ax
.text:00401525 xor ecx, ecx
.text:00401527 mov [ebp+.0], ecx
.text:0040152A mov [ebp+var_6], ecx
.text:0040152D mov edx, dword_403020 ; String2的位置
.text:00401533 mov dword ptr [ebp+String2], edx
.text:00401536 mov eax, dword_403024
.text:0040153B mov [ebp+var_18], eax
.text:0040153E mov cx, word_403028
.text:00401545 mov [ebp+var_14], cx
.text:00401549 push 0Ah ; 读取字符串到String1
.text:0040154B lea edx, [ebp+String1]
.text:0040154E push edx
.text:0040154F push 3E8h
.text:00401554 mov ecx, [ebp+var_20]
.text:00401557 call ?GetDlgItemTextA@CWnd@@QBEHHPADH@Z ; CWnd::GetDlgItemTextA(int,char *,int)
.text:0040155C lea eax, [ebp+String1]
.text:0040155F push eax ; lpString
.text:00401560 call ds:lstrlenA
.text:00401566 mov [ebp+String1Len], eax
.text:00401569 cmp [ebp+String1Len], 1
.text:0040156D jnb short loc_401585 ; 不小于1(大于0)去右边
.text:0040156F push 40h ; 叫你输入
.text:00401571 push offset aCrackme ; "CrackMe"
.text:00401576 push offset aEnterRegistrat ; "Enter Registration Number"
.text:0040157B mov ecx, [ebp+var_20]
.text:0040157E call ?MessageBoxA@CWnd@@QAEHPBD0I@Z ; CWnd::MessageBoxA(char const *,char const *,uint)
.text:00401583 jmp short loc_4015C1
.text:00401585 ; ---------------------------------------------------------------------------
.text:00401585
.text:00401585 loc_401585: ; CODE XREF: sub_401512+5B↑j
.text:00401585 lea ecx, [ebp+String2]
.text:00401588 push ecx ; lpString2
.text:00401589 lea edx, [ebp+String1]
.text:0040158C push edx ; lpString1
.text:0040158D call ds:lstrcmpA
.text:00401593 test eax, eax
.text:00401595 jnz short loc_4015AD ; 错误
.text:00401597 push 40h ; 成功
.text:00401599 push offset aCrackme_0 ; "CrackMe"
.text:0040159E push offset aCorrectWayToGo ; "Correct way to go!!"
.text:004015A3 mov ecx, [ebp+var_20]
.text:004015A6 call ?MessageBoxA@CWnd@@QAEHPBD0I@Z ; CWnd::MessageBoxA(char const *,char const *,uint)
.text:004015AB jmp short loc_4015C1
.text:004015AD ; ---------------------------------------------------------------------------
.text:004015AD
.text:004015AD loc_4015AD: ; CODE XREF: sub_401512+83↑j
.text:004015AD push 40h ; 错误
.text:004015AF push offset aCrackme_1 ; "CrackMe"
.text:004015B4 push offset aIncorrectTryAg ; "Incorrect try again!!"
.text:004015B9 mov ecx, [ebp+var_20]
.text:004015BC call ?MessageBoxA@CWnd@@QAEHPBD0I@Z ; CWnd::MessageBoxA(char const *,char const *,uint)
.text:004015C1
.text:004015C1 loc_4015C1: ; CODE XREF: sub_401512+71↑j
.text:004015C1 ; sub_401512+99↑j
.text:004015C1 mov esp, ebp
.text:004015C3 pop ebp
.text:004015C4 retn
.text:004015C4 sub_401512 endp