最近看了《加密与解密》这本书,自己想动手找出一个软件的注册码,可是按书上的所有方法,都找不出来。我把我的方法讲一下,求各位高手不吝赐教,不胜感激!!!!!!!!
【加壳方式】 Borland Delphi 6.0 - 7.0(无壳)
先用DarkDe4.exe进行反编译。找到程序中注册窗口中计算注册码的入口点。
***************************************************************
004CD454 55 push ebp
004CD455 8BEC mov ebp, esp
004CD457 33C9 xor ecx, ecx
004CD459 51 push ecx
004CD45A 51 push ecx
004CD45B 51 push ecx
004CD45C 51 push ecx
004CD45D 51 push ecx
004CD45E 51 push ecx
004CD45F 53 push ebx
004CD460 8BD8 mov ebx, eax
004CD462 33C0 xor eax, eax
004CD464 55 push ebp
* Possible String Reference to: '殛g?朕[嬪]脥@'
|
004CD465 6851D54C00 push $004CD551
***** TRY
|
004CD46A 64FF30 push dword ptr fs:[eax]
004CD46D 648920 mov fs:[eax], esp
004CD470 8D55FC lea edx, [ebp-$04]
* Reference to control edtauthorizationCode : TEdit
|
004CD473 8B83F4020000 mov eax, [ebx+$02F4]
* Reference to: Controls.TControl.GetText(TControl):TCaption;
|
004CD479 E8D2ACF7FF call 00448150
004CD47E 8B45FC mov eax, [ebp-$04]
|
004CD481 E87ADFFCFF call 0049B400
004CD486 84C0 test al, al
004CD488 0F8480000000 jz 004CD50E;***********************
004CD48E 8D55F8 lea edx, [ebp-$08]
* Reference to control edtauthorizationCode : TEdit
|
004CD491 8B83F4020000 mov eax, [ebx+$02F4]
* Reference to: Controls.TControl.GetText(TControl):TCaption;
|
004CD497 E8B4ACF7FF call 00448150
004CD49C 8B45F8 mov eax, [ebp-$08]
004CD49F 50 push eax
004CD4A0 8D55F4 lea edx, [ebp-$0C]
* Reference to control edtName : TEdit
|
004CD4A3 8B8304030000 mov eax, [ebx+$0304]
* Reference to: Controls.TControl.GetText(TControl):TCaption;
|
004CD4A9 E8A2ACF7FF call 00448150
004CD4AE 8B55F4 mov edx, [ebp-$0C]
004CD4B1 A13C024E00 mov eax, dword ptr [$004E023C]
004CD4B6 8B00 mov eax, [eax]
004CD4B8 59 pop ecx
* Reference to : TfrmMain._PROC_004D46D8()
|
004CD4B9 E81A720000 call 004D46D8
004CD4BE 84C0 test al, al
004CD4C0 7427 jz 004CD4E9
004CD4C2 C7834C02000001000000 mov dword ptr [ebx+$024C], $00000001
004CD4CC 66B8F100 mov ax, $00F1
|
004CD4D0 E86FF5FCFF call 0049CA44
004CD4D5 8BD0 mov edx, eax
004CD4D7 8D45F0 lea eax, [ebp-$10]
* Reference to: System.@LStrFromPChar(String;String;PAnsiChar);
| or: System.@WStrFromPChar(WideString;WideString;PAnsiChar);
|
004CD4DA E82970F3FF call 00404508
004CD4DF 8B45F0 mov eax, [ebp-$10]
|
004CD4E2 E8318AFCFF call 00495F18
004CD4E7 EB40 jmp 004CD529
004CD4E9 66B8F300 mov ax, $00F3
|
004CD4ED E852F5FCFF call 0049CA44
004CD4F2 8BD0 mov edx, eax
004CD4F4 8D45EC lea eax, [ebp-$14]
* Reference to: System.@LStrFromPChar(String;String;PAnsiChar);
| or: System.@WStrFromPChar(WideString;WideString;PAnsiChar);
|
004CD4F7 E80C70F3FF call 00404508
004CD4FC 8B45EC mov eax, [ebp-$14]
|
004CD4FF E8BC89FCFF call 00495EC0
004CD504 33C0 xor eax, eax
004CD506 89834C020000 mov [ebx+$024C], eax
004CD50C EB1B jmp 004CD529
004CD50E 66B8F200 mov ax, $00F2
|
004CD512 E82DF5FCFF call 0049CA44
004CD517 8BD0 mov edx, eax
004CD519 8D45E8 lea eax, [ebp-$18]
* Reference to: System.@LStrFromPChar(String;String;PAnsiChar);
| or: System.@WStrFromPChar(WideString;WideString;PAnsiChar);
|
004CD51C E8E76FF3FF call 00404508
004CD521 8B45E8 mov eax, [ebp-$18]
|
004CD524 E8EF89FCFF call 00495F18
004CD529 33C0 xor eax, eax
004CD52B 5A pop edx
004CD52C 59 pop ecx
004CD52D 59 pop ecx
004CD52E 648910 mov fs:[eax], edx
****** FINALLY
|
* Possible String Reference to: '[嬪]脥@'
|
004CD531 6858D54C00 push $004CD558
004CD536 8D45E8 lea eax, [ebp-$18]
004CD539 BA03000000 mov edx, $00000003
* Reference to: System.@LStrArrayClr(void;void;Integer);
|
004CD53E E8F96DF3FF call 0040433C
004CD543 8D45F4 lea eax, [ebp-$0C]
004CD546 BA03000000 mov edx, $00000003
* Reference to: System.@LStrArrayClr(void;void;Integer);
|
004CD54B E8EC6DF3FF call 0040433C
004CD550 C3 ret
* Reference to: System.@HandleFinally;
|
004CD551 E9EA67F3FF jmp 00403D40
004CD556 EBDE jmp 004CD536
****** END
|
004CD558 5B pop ebx
004CD559 8BE5 mov esp, ebp
004CD55B 5D pop ebp
004CD55C C3 ret
***************************************************************
我认为
004CD481 E87ADFFCFF call 0049B400
004CD486 84C0 test al, al
004CD488 0F8480000000 jz 004CD50E;***********************
004CD48E 8D55F8 lea edx, [ebp-$08]
这四行是入口,通过判断al,判断注册码是否正确。
我首先是把
004CD488 0F8480000000 jz 004CD50E;***********************
改为
004CD488 0F8480000000 jnz 004CD50E;***********************
结果显示注册成功。但是程序重新启动后注册窗口又出现。
在
004CD481 E87ADFFCFF call 0049B400
中按F7步入,在堆栈窗口中没看到正确的注册码,只看到我输入的用户名和注册码。
我又从另一本书中看到一个办法,就是先运行注册程序,让后打开WinHex_12.75_SR-6_HA,搜索输入的用户名和注册码,但是还是没有正确的注册码。
我是新手,问的问题有点弱智,请各位高手不吝赐教!!!!
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!