TA的每日心情 | 开心 2018-3-29 07:24 |
---|
签到天数: 4 天 [LV.2]偶尔看看I
|
发表于 2008-8-1 12:11:01
|
显示全部楼层
我分析的结果和楼上的几位DX不一样啊,有点意思,算法白痴,推不出来,莫非只有一组注册码?
...........
004012CA lea esi, dword ptr [esi]
004012D0 movsx eax, byte ptr [ebp-90] ; 从这里开始取用户名的第一位计算得到一个值
004012D7 mov edx, eax
004012D9 add edx, dword ptr [ebp-C]
004012DC mov eax, dword ptr [ebp-4]
004012DF add eax, edx
004012E1 mov dword ptr [ebp-C], eax ; 结果存在[ebp-c]=var1*A+37h(var1为用户名第1位的ascii码值)
004012E4 inc dword ptr [ebp-4]
004012E7 jmp short 004012C2
004012E9 lea esi, dword ptr [esi]
004012F0 lea eax, dword ptr [ebp-90]
004012F6 test eax, eax
004012F8 jnz short 00401310
004012FA add esp, -0C
004012FD push 00401231 ; /请输入用户名\n
00401302 call <jmp.&msvcrt.printf> ; \printf
00401307 add esp, 10
0040130A jmp short 00401335
0040130C lea esi, dword ptr [esi]
00401310 mov dword ptr [ebp-4], 1
00401317 cmp dword ptr [ebp-4], 0A
0040131B jle short 00401320
0040131D jmp short 00401335
0040131F nop
00401320 mov eax, dword ptr [ebp-8] ; 取输入的注册码,注意这里是mov,上面是movsx,猫腻在这里
00401323 mov edx, dword ptr [ebp-10]
00401326 add eax, edx
00401328 mov edx, dword ptr [ebp-4]
0040132B add edx, eax
0040132D mov dword ptr [ebp-10], edx ; 算法和上面基本一样,结果存在[ebp-10],后面是比较了
00401330 inc dword ptr [ebp-4]
00401333 jmp short 00401317
00401335 mov eax, dword ptr [ebp-10] ;由假码计算得到的值
00401338 cmp eax, dword ptr [ebp-C] ;由用户名第1位计算得到的值
0040133B jnz short 00401350 ;关键跳转
0040133D add esp, -0C
00401340 push 0040123F ; /注册成功\n
00401345 call <jmp.&msvcrt.printf> ; \printf
0040134A add esp, 10
0040134D jmp short 00401360
0040134F nop
00401350 add esp, -0C
00401353 push 00401249 ; /注册失败\n
00401358 call <jmp.&msvcrt.printf> ; \printf
............
[ 本帖最后由 x80x88 于 2008-8-1 12:14 编辑 ] |
|