本帖最后由 GeekCat 于 2015-8-21 10:23 编辑
文章标题】: _Magic_Partition_Recovery算法分析 【软件大小】: 13.6 MB (14,286,907 字节) 【加壳方式】: 无 【保护方式】: 注册码
【编写语言】: Borland Delphi
【使用工具】: OD、PEID
【操作平台】: XP SP3 【软件介绍】: 全站都是数据恢复软件 【破解声明】:技术交流、学习,请不要用于商业用途! --------------------------------------------------------------------------------------------------------------------------------
切入方式: 1、工具按键事件; 2、F12暂停法。
算法代码: - [/align][align=left]00620358 . 50 push eax
- 00620359 . FF75 E8 push dword ptr ss:[ebp-0x18] ; (UNICODE "GEEKCAT")
- 0062035C . FF75 E0 push dword ptr ss:[ebp-0x20] ; (UNICODE "MAGIC PARTITION RECOVERY")
- 0062035F . FF75 FC push dword ptr ss:[ebp-0x4] ; (UNICODE "HOME EDITION")
- 00620362 . 68 24056200 push Magic_Pa.00620524 ; UNICODE "6C78111B-1BD5-48E9-9F46-257BB8340404"
- 00620367 . 8D45 A4 lea eax,dword ptr ss:[ebp-0x5C]
- 0062036A . BA 04000000 mov edx,0x4
- 0062036F . E8 DC8BDEFF call Magic_Pa.00408F50 ; 拼接字符串并取前50位
- 00620374 . 8B55 A4 mov edx,dword ptr ss:[ebp-0x5C] ; (UNICODE "GEEKCATMAGIC PARTITION RECOVERYHOME EDITION6C78111")
- 00620377 . 8B45 D8 mov eax,dword ptr ss:[ebp-0x28] ; (ASCII "xpa")
- 0062037A . 59 pop ecx
- 0062037B . E8 AC63FFFF call Magic_Pa.0061672C ; 计算字符串(注册名+软件名+版本+固定字符串:全部字母大写)MD5值
- 00620380 . 8B45 A8 mov eax,dword ptr ss:[ebp-0x58] ; (UNICODE "A89D5BA776F727619DCED47D4CAA9FF0")
- 00620383 . 8D55 DC lea edx,dword ptr ss:[ebp-0x24]
- 00620386 . E8 990FE0FF call Magic_Pa.00421324
- 0062038B . 33C0 xor eax,eax
- 0062038D . 8945 F4 mov dword ptr ss:[ebp-0xC],eax
- 00620390 > 837D F4 00 cmp dword ptr ss:[ebp-0xC],0x0
- 00620394 . 74 0D je short Magic_Pa.006203A3
- 00620396 . 8D45 E4 lea eax,dword ptr ss:[ebp-0x1C]
- 00620399 . BA 7C056200 mov edx,Magic_Pa.0062057C ; UNICODE "-"
- 0062039E . E8 CD8ADEFF call Magic_Pa.00408E70
- 006203A3 > 33C0 xor eax,eax
- 006203A5 . 8945 F0 mov dword ptr ss:[ebp-0x10],eax
- 006203A8 > 8B45 F4 mov eax,dword ptr ss:[ebp-0xC]
- 006203AB . C1E0 02 shl eax,0x2
- 006203AE . 0345 F0 add eax,dword ptr ss:[ebp-0x10]
- 006203B1 . 8B55 DC mov edx,dword ptr ss:[ebp-0x24] ; (UNICODE "A89D5BA776F727619DCED47D4CAA9FF0")
- 006203B4 . 0FB70442 movzx eax,word ptr ds:[edx+eax*2] ; 奇数位字符 AS值
- 006203B8 . 8D55 EC lea edx,dword ptr ss:[ebp-0x14]
- 006203BB . E8 E41BE0FF call Magic_Pa.00421FA4 ; 字符AS值16进制转10进制
- 006203C0 . 8B45 EC mov eax,dword ptr ss:[ebp-0x14] ; AS值10进制数值
- 006203C3 . 8945 D4 mov dword ptr ss:[ebp-0x2C],eax
- 006203C6 . 837D D4 00 cmp dword ptr ss:[ebp-0x2C],0x0
- 006203CA . 74 0B je short Magic_Pa.006203D7
- 006203CC . 8B45 D4 mov eax,dword ptr ss:[ebp-0x2C]
- 006203CF . 83E8 04 sub eax,0x4 ; eax减4
- 006203D2 . 8B00 mov eax,dword ptr ds:[eax]
- 006203D4 . 8945 D4 mov dword ptr ss:[ebp-0x2C],eax
- 006203D7 > 8D45 A0 lea eax,dword ptr ss:[ebp-0x60]
- 006203DA . 8B55 EC mov edx,dword ptr ss:[ebp-0x14] ; 字符AS值的10进制数
- 006203DD . 8B4D D4 mov ecx,dword ptr ss:[ebp-0x2C]
- 006203E0 . 66:8B544A FE mov dx,word ptr ds:[edx+ecx*2-0x2] ; 10进制的最后一位转AS值
- 006203E5 . E8 9A88DEFF call Magic_Pa.00408C84 ; 转AS值
- 006203EA . 8B55 A0 mov edx,dword ptr ss:[ebp-0x60] ; 其实就是字符AS值转10进制的最后一位
- 006203ED . 8D45 E4 lea eax,dword ptr ss:[ebp-0x1C]
- 006203F0 . E8 7B8ADEFF call Magic_Pa.00408E70
- 006203F5 . FF45 F0 inc dword ptr ss:[ebp-0x10]
- 006203F8 . 837D F0 04 cmp dword ptr ss:[ebp-0x10],0x4 ; 每一段注册码循环4次为4位
- 006203FC .^ 75 AA jnz short Magic_Pa.006203A8
- 006203FE . FF45 F4 inc dword ptr ss:[ebp-0xC]
- 00620401 . 837D F4 04 cmp dword ptr ss:[ebp-0xC],0x4 ; 每一段注册码后加一个中横线
- 00620405 .^ 75 89 jnz short Magic_Pa.00620390
- 00620407 . 8B45 E4 mov eax,dword ptr ss:[ebp-0x1C][/align][align=left]
复制代码
总结: 1、计算字符串(注册名+软件名+版本+固定字符串:全部字母大写)MD5值
2、依次取MD5值的每一位,取前16位;
3、所取的字符AS值转10进制;
4、10进制数值后一位作为输出结果;
5、输出的16位字符,每4位为一段,段与段之间用"-"分开。
---------------------------------------------------------------------------------------------------------------------------- 【版权声明】: 本文原创于geekcat,转载请注明作者并保存文章的完整! |