引用coldpine的:
00401790 . 52 PUSH EDX
00401791 . 50 PUSH EAX
00401792 . E8 B9FEFFFF CALL CrackMe2.00401650
00401797 . 8B4424 2C MOV EAX, DWORD PTR SS:[ESP+2C]
0040179B . 8B4C24 28 MOV ECX, DWORD PTR SS:[ESP+28]
0040179F . 50 PUSH EAX
004017A0 . 51 PUSH ECX
004017A1 . 8D5424 20 LEA EDX, DWORD PTR SS:[ESP+20]
004017A5 . 68 3CC14200 PUSH CrackMe2.0042C13C ; %x-%x //序列号的格式
004017AA . 52 PUSH EDX
004017AB . E8 CF450100 CALL CrackMe2.00415D7F //应该是第一次计算序列号
004017B0 . 83C4 1C ADD ESP, 1C
004017B3 . 8D4C24 0C LEA ECX, DWORD PTR SS:[ESP+C]
004017B7 . E8 B5670100 CALL CrackMe2.00417F71 //第二次计算序列号 (都没有仔细去跟踪计算算法,感觉比较难)
004017BC . 8D4C24 0C LEA ECX, DWORD PTR SS:[ESP+C][I]
00401792 . E8 B9FEFFFF CALL CrackMe2.00401650 //这才是计算序列号的核心算法!要先看这个Call
00401650 /$ 83EC 08 SUB ESP,8
00401653 |. 8B5424 14 MOV EDX,DWORD PTR SS:[ESP+14]
00401657 |. 8B4C24 0C MOV ECX,DWORD PTR SS:[ESP+C]
0040165B |. 53 PUSH EBX
0040165C |. 55 PUSH EBP
0040165D |. 56 PUSH ESI
0040165E |. 8B32 MOV ESI,DWORD PTR DS:[EDX]
00401660 |. 8B01 MOV EAX,DWORD PTR DS:[ECX]
00401662 |. 8B49 04 MOV ECX,DWORD PTR DS:[ECX+4]
00401665 |. 897424 18 MOV DWORD PTR SS:[ESP+18],ESI
00401669 |. 8B72 04 MOV ESI,DWORD PTR DS:[EDX+4]
0040166C |. 897424 20 MOV DWORD PTR SS:[ESP+20],ESI
00401670 |. 8B72 08 MOV ESI,DWORD PTR DS:[EDX+8]
00401673 |. 8B52 0C MOV EDX,DWORD PTR DS:[EDX+C]
00401676 |. 897424 0C MOV DWORD PTR SS:[ESP+C],ESI
0040167A |. 895424 10 MOV DWORD PTR SS:[ESP+10],EDX
0040167E |. 57 PUSH EDI
0040167F |. 33D2 XOR EDX,EDX
00401681 |. BE 20000000 MOV ESI,20
00401686 |> 8B5C24 1C /MOV EBX,DWORD PTR SS:[ESP+1C]
0040168A |. 8B6C24 24 |MOV EBP,DWORD PTR SS:[ESP+24]
0040168E |. 8BF9 |MOV EDI,ECX
00401690 |. 33D9 |XOR EBX,ECX
00401692 |. 81EA 4786C861 |SUB EDX,61C88647
00401698 |. 03DD |ADD EBX,EBP
0040169A |. C1EF 05 |SHR EDI,5
0040169D |. 33FA |XOR EDI,EDX
0040169F |. 8BE9 |MOV EBP,ECX
004016A1 |. C1E5 04 |SHL EBP,4
004016A4 |. 03DF |ADD EBX,EDI
004016A6 |. 03EB |ADD EBP,EBX
004016A8 |. 8B5C24 10 |MOV EBX,DWORD PTR SS:[ESP+10]
004016AC |. 03C5 |ADD EAX,EBP
004016AE |. 8B6C24 14 |MOV EBP,DWORD PTR SS:[ESP+14]
004016B2 |. 8BF8 |MOV EDI,EAX
004016B4 |. 33D8 |XOR EBX,EAX
004016B6 |. C1EF 05 |SHR EDI,5
004016B9 |. 03DD |ADD EBX,EBP
004016BB |. 33FA |XOR EDI,EDX
004016BD |. 8BE8 |MOV EBP,EAX
004016BF |. 03DF |ADD EBX,EDI
004016C1 |. C1E5 04 |SHL EBP,4
004016C4 |. 03EB |ADD EBP,EBX
004016C6 |. 03CD |ADD ECX,EBP
004016C8 |. 4E |DEC ESI
004016C9 |.^ 75 BB \JNZ SHORT CrackMe2.00401686
004016CB |. 8B5424 20 MOV EDX,DWORD PTR SS:[ESP+20]
004016CF |. 5F POP EDI
004016D0 |. 5E POP ESI
004016D1 |. 5D POP EBP
004016D2 |. 8902 MOV DWORD PTR DS:[EDX],EAX
004016D4 |. 894A 04 MOV DWORD PTR DS:[EDX+4],ECX
004016D7 |. 5B POP EBX
004016D8 |. 83C4 08 ADD ESP,8
004016DB \. C3 RETN
一起分析下这个算法吧!我也在看啊!^_^