OD载入刚刚Dump出来的文件wood_dumped.exe 这同样是一个标准的C++程序OEP
但是由于先前父进程只解密了程序执行过的语句,所以这里还是有很多的CC代码。
F9直接运行会出错,根据出错提示一一加以修改就行了。
repl 00401F97,#??#,#90#,2
asm 00401E10,"jmp 00401E1E"
repl 004034F4,#??#,#90#,2
asm 004034FB,"jmp 0040350B"
repl 0040350F,#??#,#90#,2
asm 00401458,"jmp short 00401460"
ret
终于看到注册的界面了。F7跟进Main函数看一下。
004010C0 /$ 83EC 4C sub esp, 4C
004010C3 |. 53 push ebx
004010C4 |. 55 push ebp
004010C5 |. 56 push esi
004010C6 |. 8B7424 5C mov esi, dword ptr [esp+5C]
004010CA |. 57 push edi
.......................................
00401108 |. 6A 65 push 65 ; /RsrcName = 101.
0040110A |. 56 push esi ; |hInst
0040110B |. 894424 50 mov dword ptr [esp+50], eax ; |
0040110F |. C74424 54 100>mov dword ptr [esp+54], 10 ; |
00401117 |. 896C24 58 mov dword ptr [esp+58], ebp ; |
0040111B |. C74424 5C F87>mov dword ptr [esp+5C], 004070F8 ; |dappleclass
00401123 |. FFD7 call edi ; \LoadIconA
00401125 |. 894424 58 mov dword ptr [esp+58], eax
00401129 |. 8D4424 2C lea eax, dword ptr [esp+2C]
0040112D |. 50 push eax ; /pWndClassEx
0040112E |. FF15 AC704000 call dword ptr [<&USER32.RegisterClas>; \RegisterClassExA
00401134 |. 8B3D B0704000 mov edi, dword ptr [<&USER32.GetSyst>; USER32.GetSystemMetrics
.......................................
00401143 |. 99 cdq
00401144 |. 55 push ebp ; /lParam => NULL
00401145 |. 2BC2 sub eax, edx ; |
00401147 |. 56 push esi ; |hInst
00401148 |. 55 push ebp ; |hMenu => NULL
00401149 |. D1F8 sar eax, 1 ; |
0040114B |. 55 push ebp ; |hParent => NULL
0040114C |. 68 D2000000 push 0D2 ; |Height = D2 (210.)
00401151 |. 83E8 69 sub eax, 69 ; |
00401154 |. 68 2C010000 push 12C ; |Width = 12C (300.)
00401159 |. 50 push eax ; |Y
0040115A |. 8BC3 mov eax, ebx ; |
0040115C |. 99 cdq ; |
0040115D |. 2BC2 sub eax, edx ; |
0040115F |. D1F8 sar eax, 1 ; |
00401161 |. 2D 96000000 sub eax, 96 ; |
00401166 |. 50 push eax ; |X
00401167 |. 68 00008A00 push 8A0000 ; |Style = WS_OVERLAPPED|WS_MINIMIZEBOX|WS_SYSMENU|WS_BORDER
0040116C |. 68 68804000 push 00408068 ; |WindowName = "Riijj - Crackme 13 20070510"
00401171 |. 68 F8704000 push 004070F8 ; |dappleclass
00401176 |. 55 push ebp ; |ExtStyle => 0
00401177 |. FF15 B4704000 call dword ptr [<&USER32.CreateWindow>; \CreateWindowExA
0040117D |. 55 push ebp ; /lParam => 0
0040117E |. 68 70104000 push 00401070 ; |pDlgProc = wood_Dum.00401070 注意一下这里
00401183 |. 50 push eax ; |hOwner
00401184 |. 6A 65 push 65 ; |pTemplate = 65
00401186 |. 56 push esi ; |hInst
00401187 |. A3 30A84000 mov dword ptr [40A830], eax ; |
0040118C |. FF15 B8704000 call dword ptr [<&USER32.CreateDialog>; \CreateDialogParamA 00401192 |. 8B0D 30A84000 mov ecx, dword ptr [40A830]
.......................................
004011F6 |> /8B0D 34A84000 /mov ecx, dword ptr [40A834]
004011FC |. |8D4424 10 |lea eax, dword ptr [esp+10]
00401200 |. |50 |push eax ; /pMsg
00401201 |. |51 |push ecx ; |hWnd => 0016076A
00401202 |. |FF15 D4704000 |call dword ptr [<&USER32.IsDialogMes>; \IsDialogMessageA
00401208 |. |85C0 |test eax, eax
0040120A |. |75 0E |jnz short 0040121A
0040120C |. |8D5424 10 |lea edx, dword ptr [esp+10]
00401210 |. |52 |push edx
00401211 |. |FFD7 |call edi
00401213 |. |8D4424 10 |lea eax, dword ptr [esp+10]
00401217 |. |50 |push eax
00401218 |. |FFD3 |call ebx
0040121A |> |55 |push ebp
0040121B |. |55 |push ebp
0040121C |. |8D4C24 18 |lea ecx, dword ptr [esp+18]
00401220 |. |55 |push ebp
00401221 |. |51 |push ecx
00401222 |. |FFD6 |call esi
00401224 |. |85C0 |test eax, eax
00401226 |.^\75 CE \jnz short 004011F6
00401228 |> CC int3
00401229 |. CC int3
00401070 . 8B4424 08 mov eax, dword ptr [esp+8]
00401074 . 3D 10010000 cmp eax, 110
00401079 . 75 1C jnz short 00401097
0040107B . 8B4424 04 mov eax, dword ptr [esp+4]
0040107F . 68 E8030000 push 3E8 ; /ControlID = 3E8 (1000.)
00401084 . 50 push eax ; |hWnd
00401085 . FF15 D8704000 call dword ptr [<&USER32.GetDlgItem>] ; \GetDlgItem
0040108B . 50 push eax ; /hWnd
0040108C . FF15 DC704000 call dword ptr [<&USER32.SetFocus>] ; \SetFocus
00401092 . 33C0 xor eax, eax
00401094 . C2 1000 retn 10
00401097 > 3D 11010000 cmp eax,
111 ;WM_COMMAND事件
0040109C . 75 0E jnz short 004010AC
0040109E . 66:817C24 0C >cmp word ptr [esp+C],
3EA ;按钮ID
004010A5 . 75 05 jnz short 004010AC
004010A7 . E8 94010000
call 00401240
004010AC > 33C0 xor eax, eax
004010AE . C2 1000 retn 10
我们直接在00401240处F2下断点,然后F9运行程序,输入用户名及Key并点击注册按钮后就会停在这里了。