我还是很低端。只会爆破。。
关键call容易找,关键跳转也容易找。
对算法还是没感觉。。。
0040120B /$ C8 000000 enter 0, 0
0040120F |. 53 push ebx
00401210 |. 52 push edx
00401211 |. 33C0 xor eax, eax ; eax=0
00401213 |. B8 A6204000 mov eax, 004020A6 ; eax=pRegCode
00401218 |. 8038 00 cmp byte ptr [eax], 0 ; 注册码为空则返回0
0040121B |. 74 60 je short 0040127D
0040121D |. 33DB xor ebx, ebx ; ebx=0
0040121F |. 33D2 xor edx, edx ; edx=0
00401221 |> 8A18 /mov bl, byte ptr [eax] ; 取注册码的每一位到bl
00401223 |. C1C3 08 |rol ebx, 8 ; 循环左移8位
00401226 |. 03D3 |add edx, ebx ; edx=edx+edx
00401228 |. 40 |inc eax ; eax+1\
00401229 |. 8038 00 |cmp byte ptr [eax], 0 ; 看看是不是结束符号
0040122C |.^ 75 F3 \jnz short 00401221 ; 不是结束符号就继续
0040122E |. 52 push edx ; /把edx格式化为16进制字符串保存到004020bf
0040122F |. 68 54204000 push 00402054 ; |Format = "%lX"
00401234 |. 68 BF204000 push 004020BF ; |s = crackme5.004020BF
00401239 |. E8 8F000000 call <jmp.&USER32.wsprintfA> ; \wsprintfA
0040123E |. BB BF204000 mov ebx, 004020BF ; ASCII "C53AA753"
00401243 |. 803B 38 cmp byte ptr [ebx], 38 ; 下面就是字符串比较了
00401246 |. 75 35 jnz short 0040127D ; 格式化后的字符串和8DCAF368比较
00401248 |. 807B 01 44 cmp byte ptr [ebx+1], 44
0040124C |. 75 2F jnz short 0040127D
0040124E |. 807B 02 43 cmp byte ptr [ebx+2], 43
00401252 |. 75 29 jnz short 0040127D
00401254 |. 807B 03 41 cmp byte ptr [ebx+3], 41
00401258 |. 75 23 jnz short 0040127D
0040125A |. 807B 04 46 cmp byte ptr [ebx+4], 46
0040125E |. 75 1D jnz short 0040127D
00401260 |. 807B 05 33 cmp byte ptr [ebx+5], 33
00401264 |. 75 17 jnz short 0040127D
00401266 |. 807B 06 36 cmp byte ptr [ebx+6], 36
0040126A |. 75 11 jnz short 0040127D
0040126C |. 807B 07 38 cmp byte ptr [ebx+7], 38
00401270 |. 75 0B jnz short 0040127D
00401272 |. B8 01000000 mov eax, 1 ; 相等就返回1(返回1的话就注册成功!)
00401277 |. 5A pop edx
00401278 |. 5B pop ebx
00401279 |. C9 leave
0040127A |. C2 0400 retn 4
0040127D |> 33C0 xor eax, eax
0040127F |. 5A pop edx
00401280 |. 5B pop ebx
00401281 |. C9 leave
00401282 \. C2 0400 retn 4
/////////////////////////////////////////////////////////////////////////////////////////////////
edx=0; 注册码以我的ID为例:Squn
取S的Ascii码 = 0x53 = >bl (ebx = 0x00000053)
ebx 循环左移8位 =>ebx = 0x00005300
edx = edx+ebx = 0+ 0x00005300 = 0x00005300
取q的Ascii码 = 0x71 = >bl (ebx = 0x00005371)
ebx 循环左移8位 =>ebx = 0x00537100
edx = edx+ebx = 0x00005300 + 0x00537100 = 0x0053c400
取u的Ascii码 = 0x71 = >bl (ebx = 0x00537175)
ebx 循环左移8位 =>ebx = 0x53717500
edx = edx+ebx = 0x0053c400 + 0x53717500= 53C53900
取n的Ascii码 = 0x6e = >bl (ebx = 0x5371756e)
ebx 循环左移8位 =>ebx = 0x71756e53
edx = edx+ebx = 0x53C53900 + 0x71756e53= C53AA753