一次苦中作乐的追码过程(下)
004EFD55 |. 8D45 CC lea eax,[local.13]
004EFD58 |. 8B4D EC mov ecx,[local.5] ; 假码第5位
004EFD5B |. BA E0FF4E00 mov edx,PrivacyE.004EFFE0 ; $
004EFD60 |. E8 0B4DF1FF call PrivacyE.00404A70
004EFD65 |. 8B45 CC mov eax,[local.13] ; 合并后$5
004EFD68 |. BA FFFF0000 mov edx,0xFFFF
004EFD6D |. E8 0298F1FF call PrivacyE.00409574
004EFD72 |. 8BF0 mov esi,eax ; 5转16进制 记为M2
004EFD74 |. 81FE FFFF0000 cmp esi,0xFFFF
004EFD7A |. 0F84 FC010000 je PrivacyE.004EFF7C
004EFD80 |. 8B45 F8 mov eax,[local.2] ; 机器码
004EFD83 |. E8 9C4CF1FF call PrivacyE.00404A24
004EFD88 |. 3BF0 cmp esi,eax ; 机器码长度和M2对比
004EFD8A |. 74 15 je short PrivacyE.004EFDA1
004EFD8C |. 8B45 F8 mov eax,[local.2] ; 机器码
004EFD8F |. E8 904CF1FF call PrivacyE.00404A24
004EFD94 |. 83F8 10 cmp eax,0x10 ; 机器码长度和16对比
004EFD97 |. 7E 08 jle short PrivacyE.004EFDA1 ; 这里必须要跳走
004EFD99 |. 85F6 test esi,esi
004EFD9B |. 0F85 DB010000 jnz PrivacyE.004EFF7C
004EFDA1 |> 8D45 E0 lea eax,[local.8]
004EFDA4 |. 8B55 F4 mov edx,[local.3] ; 假码
004EFDA7 |. 8A52 06 mov dl,byte ptr ds:[edx+0x6] ; 假码[7]
004EFDAA |. 8850 01 mov byte ptr ds:[eax+0x1],dl
004EFDAD |. C600 01 mov byte ptr ds:[eax],0x1 ; [eax]指向下一位假码
004EFDB0 |. 8D55 E0 lea edx,[local.8]
004EFDB3 |. 8D45 DC lea eax,[local.9]
004EFDB6 |. E8 5133F1FF call PrivacyE.0040310C
004EFDBB |. 8D45 D8 lea eax,[local.10]
004EFDBE |. 8B55 F4 mov edx,[local.3]
004EFDC1 |. 8A52 08 mov dl,byte ptr ds:[edx+0x8] ; 假码[9]
004EFDC4 |. 8850 01 mov byte ptr ds:[eax+0x1],dl
004EFDC7 |. C600 01 mov byte ptr ds:[eax],0x1
004EFDCA |. 8D55 D8 lea edx,[local.10]
004EFDCD |. 8D45 DC lea eax,[local.9]
004EFDD0 |. B1 02 mov cl,0x2
004EFDD2 |. E8 0533F1FF call PrivacyE.004030DC
004EFDD7 |. 8D55 DC lea edx,[local.9] ; 假码[7] 和假码[9]合并 这里为79
004EFDDA |. 8D45 D4 lea eax,[local.11]
004EFDDD |. E8 2A33F1FF call PrivacyE.0040310C
004EFDE2 |. 8D45 D8 lea eax,[local.10]
004EFDE5 |. 8B55 F4 mov edx,[local.3] ; 假码
004EFDE8 |. 8A52 0A mov dl,byte ptr ds:[edx+0xA] ; 假码[11]
004EFDEB |. 8850 01 mov byte ptr ds:[eax+0x1],dl
004EFDEE |. C600 01 mov byte ptr ds:[eax],0x1
004EFDF1 |. 8D55 D8 lea edx,[local.10]
004EFDF4 |. 8D45 D4 lea eax,[local.11]
004EFDF7 |. B1 03 mov cl,0x3
004EFDF9 |. E8 DE32F1FF call PrivacyE.004030DC
004EFDFE |. 8D55 D4 lea edx,[local.11] ; 假码[7] 假码[9] 假码[11] 合并 79B
004EFE01 |. 8D45 F0 lea eax,[local.4]
004EFE04 |. E8 BF4BF1FF call PrivacyE.004049C8
004EFE09 |. 8D45 C8 lea eax,[local.14]
004EFE0C |. 8B4D F0 mov ecx,[local.4] ; 79B
004EFE0F |. BA E0FF4E00 mov edx,PrivacyE.004EFFE0 ; $
004EFE14 |. E8 574CF1FF call PrivacyE.00404A70
004EFE19 |. 8B45 C8 mov eax,[local.14] ; $79B
004EFE1C |. BA FFFF0000 mov edx,0xFFFF
004EFE21 |. E8 4E97F1FF call PrivacyE.00409574
004EFE26 |. 8945 E8 mov [local.6],eax ; $79B转16进制 0000079B 记为M3
004EFE29 |. 817D E8 FFFF0>cmp [local.6],0xFFFF ; M3和0xFFFF对比
004EFE30 |. 0F84 46010000 je PrivacyE.004EFF7C
004EFE36 |. 33F6 xor esi,esi
004EFE38 |. 8B45 F8 mov eax,[local.2] ; 机器码
004EFE3B |. E8 E44BF1FF call PrivacyE.00404A24
004EFE40 |. 85C0 test eax,eax ; 对比机器码长度是否为空
004EFE42 |. 7E 13 jle short PrivacyE.004EFE57
004EFE44 |. BB 01000000 mov ebx,0x1
004EFE49 |> 8B55 F8 /mov edx,[local.2] ; 机器码
004EFE4C |. 0FB6541A FF |movzx edx,byte ptr ds:[edx+ebx-0x1] ; 指向机器码的每一个字节
004EFE51 |. 03F2 |add esi,edx ; esi=机器码相加后的结果 记为K k=203
004EFE53 |. 43 |inc ebx
004EFE54 |. 48 |dec eax
004EFE55 |.^ 75 F2 \jnz short PrivacyE.004EFE49
004EFE57 |> C1E6 04 shl esi,0x4 ; 00000203左移4位 等于00002030 记为K1
004EFE5A |. 8B45 FC mov eax,[local.1]
004EFE5D |. 3370 74 xor esi,dword ptr ds:[eax+0x74] ; 03C9642B和K1 xor 结果记为K2 K2=03C9441B
004EFE60 |. 81E6 FF0F0000 and esi,0xFFF ; K2和0xFFFand 记为K3
004EFE66 |. 8975 E4 mov [local.7],esi ; K3=41B
004EFE69 |. 8B45 E4 mov eax,[local.7]
004EFE6C |. 3B45 E8 cmp eax,[local.6] ; K3和M3比较 不相等就跳
004EFE6F |. 0F85 07010000 jnz PrivacyE.004EFF7C ; 所以一定要K3=M3
小结:
1.假码[5]转16进制 记为M2
2.Len和M2对比,
3.假码[7] 假码[9] 假码[11] 合并 记为M3 M3=79B
4.M3转16进制后和K3对比 一定要实现M3=K3
5.K3=41B 所以M3=41B 得出 假码[7]=4 假码[9]=1 假码[11]=B
假码更新为:E2D255481AB3DEFG
004EFE75 |. 8B45 F4 mov eax,[local.3] ; 假码
004EFE78 |. E8 A74BF1FF call PrivacyE.00404A24 ; 获取注册码长度
004EFE7D |. 83F8 0C cmp eax,0xC ; 注册码长度和12比较
004EFE80 |. 0F8E E9000000 jle PrivacyE.004EFF6F
004EFE86 |. 8D45 EC lea eax,[local.5]
004EFE89 |. E8 D648F1FF call PrivacyE.00404764
004EFE8E |. 33C0 xor eax,eax
004EFE90 |. 8945 E4 mov [local.7],eax
004EFE93 |. 8B45 F8 mov eax,[local.2] ; 机器码
004EFE96 |. E8 894BF1FF call PrivacyE.00404A24
004EFE9B |. 85C0 test eax,eax ; 对比机器码长度是否为空
004EFE9D |. 7E 14 jle short PrivacyE.004EFEB3
004EFE9F |. BB 01000000 mov ebx,0x1
004EFEA4 |> 8B55 F8 /mov edx,[local.2] ; 机器码
004EFEA7 |. 0FB6541A FF |movzx edx,byte ptr ds:[edx+ebx-0x1]
004EFEAC |. 0155 E4 |add [local.7],edx ; 机器码所有字节相加存到一个变量中 变量=203
004EFEAF |. 43 |inc ebx
004EFEB0 |. 48 |dec eax
004EFEB1 |.^ 75 F1 \jnz short PrivacyE.004EFEA4
004EFEB3 |> B8 FFFFFF07 mov eax,0x7FFFFFF ; x
004EFEB8 |. 99 cdq
004EFEB9 |. F77D E4 idiv [local.7] ; 134217727÷515=260616.....487
004EFEBC |. F76D E4 imul [local.7] ; 260616×515=134217240
004EFEBF |. 8945 E4 mov [local.7],eax
004EFEC2 |. 8B45 F4 mov eax,[local.3] ; 注册码
004EFEC5 |. E8 5A4BF1FF call PrivacyE.00404A24
004EFECA |. 83E8 0C sub eax,0xC ; 注册码长度-12=4
004EFECD |. 8945 E8 mov [local.6],eax
004EFED0 |. 8D45 F0 lea eax,[local.4]
004EFED3 |. 50 push eax
004EFED4 |. 8B4D E8 mov ecx,[local.6]
004EFED7 |. BA 0D000000 mov edx,0xD
004EFEDC |. 8B45 F4 mov eax,[local.3] ; 注册码
004EFEDF |. E8 A04DF1FF call PrivacyE.00404C84
004EFEE4 |. BF 1F000000 mov edi,0x1F
004EFEE9 |. BB 01000000 mov ebx,0x1
004EFEEE |> 8BCB /mov ecx,ebx
004EFEF0 |. 8B45 FC |mov eax,[local.1]
004EFEF3 |. 8B40 78 |mov eax,dword ptr ds:[eax+0x78]
004EFEF6 |. 8BF0 |mov esi,eax
004EFEF8 |. D3E6 |shl esi,cl
004EFEFA |. 8BCF |mov ecx,edi
004EFEFC |. D3E8 |shr eax,cl
004EFEFE |. 0BF0 |or esi,eax
004EFF00 |. 8BC6 |mov eax,esi
004EFF02 |. 99 |cdq
004EFF03 |. 33C2 |xor eax,edx
004EFF05 |. 2BC2 |sub eax,edx
004EFF07 |. 8BF0 |mov esi,eax
004EFF09 |. 3B75 E4 |cmp esi,[local.7] ; PrivacyE.004F0611
004EFF0C |. 7E 0A |jle short PrivacyE.004EFF18
004EFF0E |. 8BC6 |mov eax,esi
004EFF10 |. 99 |cdq
004EFF11 |. F77D E4 |idiv [local.7] ; PrivacyE.004F0611
004EFF14 |. 8BF2 |mov esi,edx
004EFF16 |. EB 08 |jmp short PrivacyE.004EFF20
004EFF18 |> 8B45 E4 |mov eax,[local.7] ; PrivacyE.004F0611
004EFF1B |. 99 |cdq
004EFF1C |. F7FE |idiv esi
004EFF1E |. 8BF2 |mov esi,edx
004EFF20 |> 8D4D C4 |lea ecx,[local.15]
004EFF23 |. 8BC6 |mov eax,esi
004EFF25 |. 25 FF0F0000 |and eax,0xFFF
004EFF2A |. BA 03000000 |mov edx,0x3
004EFF2F |. E8 DC95F1FF |call PrivacyE.00409510 这段主要循环计算得出一堆字符串 这堆字符串后面有用
004EFF34 |. 8B55 C4 |mov edx,[local.15] ; 0F40F46C86C80881104089F85400999E65B3B658B17CFF9EBDCC9F4DA9B4550C880208F174E083105727CCAF9DBDEF7F 记为str
004EFF37 |. 8D45 EC |lea eax,[local.5]
004EFF3A |. E8 ED4AF1FF |call PrivacyE.00404A2C
004EFF3F |. 4F |dec edi
004EFF40 |. 43 |inc ebx
004EFF41 |. 83FB 21 |cmp ebx,0x21 循环33次
004EFF44 |.^ 75 A8 \jnz short PrivacyE.004EFEEE
004EFF46 |. 8D45 EC lea eax,[local.5]
004EFF49 |. 50 push eax
004EFF4A |. 8B45 FC mov eax,[local.1]
004EFF4D |. 8B48 6C mov ecx,dword ptr ds:[eax+0x6C] ; 14
004EFF50 |. 83E9 0C sub ecx,0xC ; 14-C=8
004EFF53 |. BA 01000000 mov edx,0x1
004EFF58 |. 8B45 EC mov eax,[local.5] ; str=0F40F46C86C80881104089F85400999E65B3B658B17CFF9EBDCC9F4DA9B4550C880208F174E083105727CCAF9DBDEF7F
004EFF5B |. E8 244DF1FF call PrivacyE.00404C84 ; 拿出str 8位字符寸
004EFF60 |. 8B55 EC mov edx,[local.5] ; 0F40F46C 记为str1
004EFF63 |. 8B45 F0 mov eax,[local.4] ; 拿出假码第13位以后的字符 DFEG记为M4
004EFF66 |. E8 2990F1FF call PrivacyE.00408F94 ; str1和M4比较 不一样的话就实现跳转 这里不能跳,所以得出str1=M4
004EFF6B |. 85C0 test eax,eax
004EFF6D |. 75 0D jnz short PrivacyE.004EFF7C
004EFF6F |> 8B45 08 mov eax,[arg.1] ; PrivacyE.004F0C8F
004EFF72 |. BA ECFF4E00 mov edx,PrivacyE.004EFFEC ; 645364631365423154824
004EFF77 |. E8 3C48F1FF call PrivacyE.004047B8
004EFF7C |> 33C0 xor eax,eax
004EFF7E |. 5A pop edx ; PrivacyE.004F05C4
004EFF7F |. 59 pop ecx ; PrivacyE.004F05C4
004EFF80 |. 59 pop ecx ; PrivacyE.004F05C4
004EFF81 |. 64:8910 mov dword ptr fs:[eax],edx
004EFF84 |. 68 ABFF4E00 push PrivacyE.004EFFAB
004EFF89 |> 8D45 C4 lea eax,[local.15]
004EFF8C |. BA 04000000 mov edx,0x4
004EFF91 |. E8 F247F1FF call PrivacyE.00404788
004EFF96 |. 8D45 EC lea eax,[local.5]
004EFF99 |. BA 04000000 mov edx,0x4
004EFF9E |. E8 E547F1FF call PrivacyE.00404788
004EFFA3 \. C3 retn
004EFFA4 .^ E9 3340F1FF jmp PrivacyE.00403FDC
004EFFA9 .^ EB DE jmp short PrivacyE.004EFF89
004EFFAB . 5F pop edi ; PrivacyE.004F05C4
004EFFAC . 5E pop esi ; PrivacyE.004F05C4
004EFFAD . 5B pop ebx ; PrivacyE.004F05C4
004EFFAE . 8BE5 mov esp,ebp
004EFFB0 . 5D pop ebp ; PrivacyE.004F05C4
004EFFB1 . C2 0400 retn 0x4
小结:其实这段可以很清楚的看到假码第13位以后的字符一定要和str1相等,否则的话就注册失败。
所以最终注册码为 :E2D255481AB30F40F46C
关于这个注册机问题,因为这个软件的算法设计到其他未知变量,所以写注册机比较麻烦,要知道的参数比较多才行,比如str这个字符串是怎么计算出来的,因为最后会用到这个,所以写注册机的问题自己解决吧,
其实追码的教程也是一种享受!苦中作乐。
总结:完成这个追码教程弄了我几天,不过都是断断续续的再研究,每次研究不超过一小时,虽然有参考别人的文章,但是现在你所看到的整篇算法分析都是我自己写的,比原作者还要详细,当然这里肯定要先感谢原作者,
提供了一篇很好的分析文章,其实要有耐心,其实纵观全篇文章,其实这个算法并不难,主要还是有耐心分析下去才行,一开始我看原作者的前面的年月日的分析,我也搞不明白是什么意思,但是经过自己多次调试
和分析后,终于弄明白了,而且弄明白后,后面的问题也是迎刃而解,软件作者写的算法是一步接着一步来的,第一步走错了,就会全盘皆输。还有这个软件不是直接出真码的,是把真码拆分开来,一步一步来进行
对比。至此,研究了这么一个软件,令我收益颇多。