在看雪精华中看了很多分析算法的文章,手痒痒的,就拿了个老外的程序开刀,却不太会分析,我初学,请各位指教。
下载地址:
http://www.51files.com/?TPBDJCDLIPDAHAGKNZ69
程序用Aspack 2.12加壳,直接用脱壳机脱了,用插件查找字串参考,来到这里
0041A76F > \6A 00 push 0
0041A771 . 6A 00 push 0
0041A773 . 68 A85E4700 push 00475EA8 ; 001.the license is invalid or expired. //出错提示
0041A778 .^ E9 CDFBFFFF jmp 0041A34A
于是就看看哪里跳到0041A76F,来到
0041A4C1 . E8 91900200 call 00443557
0041A4C6 . 51 push ecx
0041A4C7 . 8D85 DC010000 lea eax, dword ptr [ebp+1DC]
0041A4CD . 8BCC mov ecx, esp
0041A4CF . 896424 34 mov dword ptr [esp+34], esp
0041A4D3 . 50 push eax
0041A4D4 . C68424 00040000 04 mov byte ptr [esp+400], 4
0041A4DC . E8 76900200 call 00443557
0041A4E1 . 8D4C24 20 lea ecx, dword ptr [esp+20]
0041A4E5 . C68424 FC030000 00 mov byte ptr [esp+3FC], 0
0041A4ED . E8 7EEEFFFF call 00419370 //估计这个是关键CALL,就下断
0041A4F2 . 83F8 FF cmp eax, -1 //比较EAX的返回值 ,-1
0041A4F5 . 0F84 74020000 je 0041A76F //这里跳到出错
0041A4FB . 83F8 01 cmp eax, 1 //比较EAX的返回值 ,1
0041A4FE . 0F84 6B020000 je 0041A76F //这里跳到出错
0041A504 > 8D85 DC010000 lea eax, dword ptr [ebp+1DC]
0041A50A . 50 push eax
0041A50B . A1 948F4700 mov eax, dword ptr [478F94]
0041A510 . 8D48 5C lea ecx, dword ptr [eax+5C]
跟进0041A4ED的CALL
00419370 /$ 6A FF push -1
00419372 |. 68 68D24500 push 0045D268 ; SE 处理程序安装
00419377 |. 64:A1 00000000 mov eax, dword ptr fs:[0]
0041937D |. 50 push eax
0041937E |. 64:8925 00000000 mov dword ptr fs:[0], esp
00419385 |. 83EC 10 sub esp, 10
00419388 |. 56 push esi
00419389 |. 8BF1 mov esi, ecx
0041938B |. 51 push ecx
0041938C |. 8D4424 34 lea eax, dword ptr [esp+34]
00419390 |. 8BCC mov ecx, esp
00419392 |. 896424 08 mov dword ptr [esp+8], esp
00419396 |. 50 push eax
00419397 |. C74424 24 03000000 mov dword ptr [esp+24], 3
0041939F |. E8 B3A10200 call 00443557 // 反复调用这个CALL,不知道干什么的
004193A4 |. 51 push ecx
004193A5 |. 8D5424 34 lea edx, dword ptr [esp+34]
004193A9 |. 8BCC mov ecx, esp
004193AB |. 896424 10 mov dword ptr [esp+10], esp
004193AF |. 52 push edx
004193B0 |. C64424 28 04 mov byte ptr [esp+28], 4
004193B5 |. E8 9DA10200 call 00443557 // 反复调用这个CALL,不知道干什么的
004193BA |. 51 push ecx
004193BB |. 8D4424 34 lea eax, dword ptr [esp+34]
004193BF |. 8BCC mov ecx, esp
004193C1 |. 896424 18 mov dword ptr [esp+18], esp
004193C5 |. 50 push eax
004193C6 |. C64424 2C 05 mov byte ptr [esp+2C], 5
004193CB |. E8 87A10200 call 00443557 // 反复调用这个CALL,不知道干什么的
004193D0 |. 51 push ecx
004193D1 |. 8D5424 34 lea edx, dword ptr [esp+34]
004193D5 |. 8BCC mov ecx, esp
004193D7 |. 896424 20 mov dword ptr [esp+20], esp
004193DB |. 52 push edx
004193DC |. C64424 30 06 mov byte ptr [esp+30], 6
004193E1 |. E8 71A10200 call 00443557 // 反复调用这个CALL,不知道干什么的
004193E6 |. 8BCE mov ecx, esi ; |
004193E8 |. C64424 2C 03 mov byte ptr [esp+2C], 3 ; |
004193ED |. E8 9E000000 call 00419490 ; //这里关键,跟进去
004193F2 |. 85C0 test eax, eax
004193F4 |. C64424 1C 02 mov byte ptr [esp+1C], 2
004193F9 |. 8D4C24 24 lea ecx, dword ptr [esp+24]
004193FD |. 75 46 jnz short 00419445
004193FF |. E8 DEA30200 call 004437E2
跟进CALL之后来到这里
00419490 /$ 6A FF push -1
00419492 |. 68 0ED34500 push 0045D30E ; SE 处理程序安装
00419497 |. 64:A1 00000000 mov eax, dword ptr fs:[0]
0041949D |. 50 push eax
0041949E |. 64:8925 00000000 mov dword ptr fs:[0], esp
004194A5 |. 81EC 58010000 sub esp, 158
004194AB |. 53 push ebx
004194AC |. 56 push esi
004194AD |. 57 push edi
004194AE |. 8BF1 mov esi, ecx
004194B0 |. 68 608F4700 push 00478F60
004194B5 |. 8D4C24 10 lea ecx, dword ptr [esp+10]
004194B9 |. C78424 70010000 0300>mov dword ptr [esp+170], 3
004194C4 |. E8 87A30200 call 00443850
004194C9 |. 8B8424 74010000 mov eax, dword ptr [esp+174]
004194D0 |. C68424 6C010000 04 mov byte ptr [esp+16C], 4
004194D8 |. 8B40 F8 mov eax, dword ptr [eax-8]
004194DB |. 83F8 10 cmp eax, 10 // 比较Serial Number是否是16位
004194DE |. 0F85 BF050000 jnz 00419AA3
004194E4 |. 8B8C24 7C010000 mov ecx, dword ptr [esp+17C]
004194EB |. 8B41 F8 mov eax, dword ptr [ecx-8]
004194EE |. 83F8 08 cmp eax, 8 //比较Data是否为 8 位
004194F1 |. 0F85 AC050000 jnz 00419AA3
004194F7 |. 8B9424 80010000 mov edx, dword ptr [esp+180]
004194FE |. 68 645E4700 push 00475E64 ; /Arg2 = 00475E64 ASCII "EVALUATION VERSION" //评估版
00419503 |. 52 push edx ; |Arg1
00419504 |. E8 034A0100 call 0042DF0C
00419509 |. 83C4 08 add esp, 8
0041950C |. 85C0 test eax, eax
0041950E |. 0F84 EB000000 je 004195FF
00419514 |. 8B8424 74010000 mov eax, dword ptr [esp+174]
0041951B |. 8A48 0E mov cl, byte ptr [eax+E]
0041951E |. 8A50 0F mov dl, byte ptr [eax+F]
00419521 |. 0FBEC1 movsx eax, cl
00419524 |. 0FBECA movsx ecx, dl
00419527 |. 8D0480 lea eax, dword ptr [eax+eax*4>
0041952A |. 8D9441 F0FDFFFF lea edx, dword ptr [ecx+eax*2>
00419531 |. A1 645D4700 mov eax, dword ptr [475D64]
00419536 |. 3BD0 cmp edx, eax
00419538 |. 0F85 65050000 jnz 00419AA3
0041953E |. 8B8424 78010000 mov eax, dword ptr [esp+178]
00419545 |. 8378 F8 10 cmp dword ptr [eax-8], 10
00419549 |. 0F85 54050000 jnz 00419AA3
0041954F |. 8B8424 80010000 mov eax, dword ptr [esp+180]
00419556 |. 8178 F8 A0000000 cmp dword ptr [eax-8], 0A0 //比较Lisence是否为 160 位
0041955D |. 0F85 40050000 jnz 00419AA3
00419563 |. 50 push eax
00419564 |. 8D4C24 2C lea ecx, dword ptr [esp+2C]
00419568 |. 05 80000000 add eax, 80
0041956D |. 51 push ecx
0041956E |. 50 push eax
0041956F |. E8 ACE8FFFF call 00417E20
00419574 |. 8B8424 80010000 mov eax, dword ptr [esp+180]
0041957B |. 8D5424 34 lea edx, dword ptr [esp+34]
0041957F |. 52 push edx
00419580 |. 50 push eax
00419581 |. E8 4AE9FFFF call 00417ED0
00419586 |. 83C4 14 add esp, 14
00419589 |. 85C0 test eax, eax
0041958B |. 74 3B je short 004195C8
0041958D |. 8B9424 74010000 mov edx, dword ptr [esp+174]
00419594 |. 8D4C24 28 lea ecx, dword ptr [esp+28]
00419598 |. 51 push ecx
00419599 |. 52 push edx
0041959A |. 8D8424 A4000000 lea eax, dword ptr [esp+A4]
就跟到这里,停住了,没发现比较的地方,希望各位大哥指点下,谢谢!
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课