破解心得之CHMMaker(耶書制造)篇
作者:时空幻影
时间:2002年1月20日
使用工具:W32DASM汉化版黄金版、TRW2000 v1.22、UPX v1.20W
软件名称:CHMMaker(耶書制造)
软件版本:v2.87中文版
这个软件使用了UPX加壳,所以我们用UPX脱壳。然后用TRW2000载入它,随便输入几个数字后,按CTRL+N激活TRW2000,
设置断点BPX HMEMCPY,按F5回到程序,点击按钮“注册”,会被拦下,然后按F10经过几个DELPHI或者C++ BUILDER程序的
几个固定的RET后会来到如下的地方:
* Possible StringData Ref from Code Obj ->"Q2lA5rM6zI7sK8eO9aL2wP3q3pZ4mW5V5vT6gG7y9iC2bR"
->"3hF4uB8cY9fH2tN3kS6oX7nE8jDxU4dJ" <--注意这个字符串,设它为s
|
:0048EB72 BA3CF44800 mov edx, 0048F43C
:0048EB77 E8DC50F7FF call 00403C58
:0048EB7C 8D45F0 lea eax, dword ptr [ebp-10]
:0048EB7F BA94F44800 mov edx, 0048F494
:0048EB84 E8CF50F7FF call 00403C58
:0048EB89 8D45F0 lea eax, dword ptr [ebp-10]
:0048EB8C E8FFFEFFFF call 0048EA90
:0048EB91 8BD8 mov ebx, eax
:0048EB93 8BC3 mov eax, ebx
:0048EB95 E8928AF7FF call 0040762C
:0048EB9A 0FB7C0 movzx eax, ax
:0048EB9D 8BF0 mov esi, eax
:0048EB9F C1E602 shl esi, 02
:0048EBA2 0FB7C3 movzx eax, bx
:0048EBA5 8BF8 mov edi, eax
:0048EBA7 03FF add edi, edi
:0048EBA9 8D3C7F lea edi, dword ptr [edi+2*edi]
:0048EBAC 81C70D260000 add edi, 0000260D
:0048EBB2 8D95C8FEFFFF lea edx, dword ptr [ebp+FFFFFEC8]
:0048EBB8 8BC7 mov eax, edi
:0048EBBA E8419FF7FF call 00408B00
:0048EBBF FFB5C8FEFFFF push dword ptr [ebp+FFFFFEC8]
:0048EBC5 8BC3 mov eax, ebx
:0048EBC7 33D2 xor edx, edx
:0048EBC9 52 push edx
:0048EBCA 50 push eax
:0048EBCB 8D85C4FEFFFF lea eax, dword ptr [ebp+FFFFFEC4]
:0048EBD1 E85A9FF7FF call 00408B30
:0048EBD6 FFB5C4FEFFFF push dword ptr [ebp+FFFFFEC4]
:0048EBDC 8D95C0FEFFFF lea edx, dword ptr [ebp+FFFFFEC0]
:0048EBE2 8BC6 mov eax, esi
:0048EBE4 E8179FF7FF call 00408B00
:0048EBE9 FFB5C0FEFFFF push dword ptr [ebp+FFFFFEC0]
:0048EBEF 8D45F0 lea eax, dword ptr [ebp-10]
:0048EBF2 BA03000000 mov edx, 00000003
:0048EBF7 E80453F7FF call 00403F00
:0048EBFC C745D401000000 mov [ebp-2C], 00000001
:0048EC03 8D95B8FEFFFF lea edx, dword ptr [ebp+FFFFFEB8]
:0048EC09 8BC7 mov eax, edi
:0048EC0B E8F09EF7FF call 00408B00
:0048EC10 FFB5B8FEFFFF push dword ptr [ebp+FFFFFEB8]
:0048EC16 68A0F44800 push 0048F4A0
:0048EC1B 8BC3 mov eax, ebx
:0048EC1D 33D2 xor edx, edx
:0048EC1F 52 push edx
:0048EC20 50 push eax
:0048EC21 8D85B4FEFFFF lea eax, dword ptr [ebp+FFFFFEB4]
:0048EC27 E8049FF7FF call 00408B30
:0048EC2C FFB5B4FEFFFF push dword ptr [ebp+FFFFFEB4]
:0048EC32 68A0F44800 push 0048F4A0
:0048EC37 8D95B0FEFFFF lea edx, dword ptr [ebp+FFFFFEB0]
:0048EC3D 8BC6 mov eax, esi
:0048EC3F E8BC9EF7FF call 00408B00
:0048EC44 FFB5B0FEFFFF push dword ptr [ebp+FFFFFEB0]
:0048EC4A 8D85BCFEFFFF lea eax, dword ptr [ebp+FFFFFEBC]
:0048EC50 BA05000000 mov edx, 00000005
:0048EC55 E8A652F7FF call 00403F00
:0048EC5A 8B95BCFEFFFF mov edx, dword ptr [ebp+FFFFFEBC]
:0048EC60 A1E81F4900 mov eax, dword ptr [00491FE8]
:0048EC65 8B00 mov eax, dword ptr [eax]
:0048EC67 8B8098060000 mov eax, dword ptr [eax+00000698]
:0048EC6D E8CA31FAFF call 00431E3C
:0048EC72 8B45F0 mov eax, dword ptr [ebp-10] <--会停在这里
:0048EC75 E8C651F7FF call 00403E40 <--取出去掉字符"-"的机器码字符串的长度放到eax中
:0048EC7A 83F804 cmp eax, 00000004 <--长度与4进行比较
:0048EC7D 0F8C4C010000 jl 0048EDCF <--长度小于4的话跳转,一般不会跳转
:0048EC83 8945D8 mov dword ptr [ebp-28], eax
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048EDC9(C)
|
:0048EC86 8D85ACFEFFFF lea eax, dword ptr [ebp+FFFFFEAC]
:0048EC8C 50 push eax
:0048EC8D B901000000 mov ecx, 00000001
:0048EC92 8B55D8 mov edx, dword ptr [ebp-28] <--edx为偏移量
:0048EC95 8B45F0 mov eax, dword ptr [ebp-10] <--eax中为存放去掉"-"的机器码字符串的首地址
:0048EC98 E8AB53F7FF call 00404048 <--取[eax+edx]中的一个字符
:0048EC9D FFB5ACFEFFFF push dword ptr [ebp+FFFFFEAC]
:0048ECA3 8D85A8FEFFFF lea eax, dword ptr [ebp+FFFFFEA8]
:0048ECA9 50 push eax
:0048ECAA 8B55D8 mov edx, dword ptr [ebp-28] <--edx为偏移量
:0048ECAD 4A dec edx
:0048ECAE B901000000 mov ecx, 00000001
:0048ECB3 8B45F0 mov eax, dword ptr [ebp-10] <--eax中为存放去掉"-"的机器码字符串
:0048ECB6 E88D53F7FF call 00404048 <--取[eax+edx]中的一个字符
:0048ECBB FFB5A8FEFFFF push dword ptr [ebp+FFFFFEA8]
:0048ECC1 8D85A4FEFFFF lea eax, dword ptr [ebp+FFFFFEA4]
:0048ECC7 50 push eax
:0048ECC8 8B55D8 mov edx, dword ptr [ebp-28] <--edx为偏移量
:0048ECCB 83EA02 sub edx, 00000002
:0048ECCE B901000000 mov ecx, 00000001
:0048ECD3 8B45F0 mov eax, dword ptr [ebp-10] <--eax中为存放去掉"-"的机器码字符串
:0048ECD6 E86D53F7FF call 00404048 <--取[eax+edx]中的一个字符
:0048ECDB FFB5A4FEFFFF push dword ptr [ebp+FFFFFEA4]
:0048ECE1 8D85A0FEFFFF lea eax, dword ptr [ebp+FFFFFEA0]
:0048ECE7 50 push eax
:0048ECE8 8B55D8 mov edx, dword ptr [ebp-28] <--edx为偏移量
:0048ECEB 83EA03 sub edx, 00000003
:0048ECEE B901000000 mov ecx, 00000001
:0048ECF3 8B45F0 mov eax, dword ptr [ebp-10] <--eax中为存放去掉"-"的机器码字符串
:0048ECF6 E84D53F7FF call 00404048 <--取[eax+edx]中的一个字符
:0048ECFB FFB5A0FEFFFF push dword ptr [ebp+FFFFFEA0]
:0048ED01 8D45EC lea eax, dword ptr [ebp-14]
:0048ED04 BA04000000 mov edx, 00000004
:0048ED09 E8F251F7FF call 00403F00 <--把上面4次取的4个字符连起来
:0048ED0E 33C0 xor eax, eax
:0048ED10 55 push ebp
:0048ED11 6831ED4800 push 0048ED31
:0048ED16 64FF30 push dword ptr fs:[eax]
:0048ED19 648920 mov dword ptr fs:[eax], esp
:0048ED1C 8B45EC mov eax, dword ptr [ebp-14]
:0048ED1F E8809EF7FF call 00408BA4 <--把上面连起来的字符串转化成十六进制数
:0048ED24 8945D4 mov dword ptr [ebp-2C], eax <--这里如果用指令? eax看的话,就可看到eax中的值为上面字符串的数字表示
:0048ED27 33C0 xor eax, eax
:0048ED29 5A pop edx
:0048ED2A 59 pop ecx
:0048ED2B 59 pop ecx
:0048ED2C 648910 mov dword ptr fs:[eax], edx
:0048ED2F EB14 jmp 0048ED45 <--跳转
:0048ED31 E96E46F7FF jmp 004033A4
:0048ED36 E8C549F7FF call 00403700
:0048ED3B E982000000 jmp 0048EDC2
:0048ED40 E8BB49F7FF call 00403700
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048ED2F(U)
|
:0048ED45 8B45D4 mov eax, dword ptr [ebp-2C]
:0048ED48 B94F000000 mov ecx, 0000004F
:0048ED4D 99 cdq
:0048ED4E F7F9 idiv ecx
:0048ED50 8955D4 mov dword ptr [ebp-2C], edx <--将余数送[ebp-2c]
:0048ED53 837DD400 cmp dword ptr [ebp-2C], 00000000 <--比对余数是否为0
:0048ED57 7506 jne 0048ED5F
:0048ED59 8B45D8 mov eax, dword ptr [ebp-28]
:0048ED5C 8945D4 mov dword ptr [ebp-2C], eax
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048ED57(C)
|
:0048ED5F 8D45E8 lea eax, dword ptr [ebp-18]
:0048ED62 50 push eax
:0048ED63 B901000000 mov ecx, 00000001
:0048ED68 8B55D4 mov edx, dword ptr [ebp-2C]
:0048ED6B 8B45DC mov eax, dword ptr [ebp-24] <--eax为存放字符串s的首地址
:0048ED6E E8D552F7FF call 00404048 <--取[eax+edx]中的一个字符
:0048ED73 8B45E4 mov eax, dword ptr [ebp-1C] <--eax为正确的注册码当前的长度
:0048ED76 E8C550F7FF call 00403E40
:0048ED7B 8BC8 mov ecx, eax
:0048ED7D 85C9 test ecx, ecx
:0048ED7F 750D jne 0048ED8E
:0048ED81 8D45E4 lea eax, dword ptr [ebp-1C]
:0048ED84 8B55E8 mov edx, dword ptr [ebp-18]
:0048ED87 E8CC4EF7FF call 00403C58
:0048ED8C EB34 jmp 0048EDC2
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048ED7F(C)
|
:0048ED8E 8D4101 lea eax, dword ptr [ecx+01]
:0048ED91 B905000000 mov ecx, 00000005
:0048ED96 99 cdq
:0048ED97 F7F9 idiv ecx
:0048ED99 85D2 test edx, edx <--比对注册码当前长度是否能整除5
:0048ED9B 751A jne 0048EDB7 <--不是的话就跳转
:0048ED9D FF75E4 push [ebp-1C]
:0048EDA0 68A0F44800 push 0048F4A0
:0048EDA5 FF75E8 push [ebp-18]
:0048EDA8 8D45E4 lea eax, dword ptr [ebp-1C]
:0048EDAB BA03000000 mov edx, 00000003
:0048EDB0 E84B51F7FF call 00403F00
:0048EDB5 EB0B jmp 0048EDC2 <--往注册码中插入字符"-"
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048ED9B(C)
|
:0048EDB7 8D45E4 lea eax, dword ptr [ebp-1C]
:0048EDBA 8B55E8 mov edx, dword ptr [ebp-18]
:0048EDBD E88650F7FF call 00403E48
* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:0048ED3B(U), :0048ED8C(U), :0048EDB5(U)
|
:0048EDC2 FF4DD8 dec [ebp-28] <--偏移量-1
:0048EDC5 837DD803 cmp dword ptr [ebp-28], 00000003
:0048EDC9 0F85B7FEFFFF jne 0048EC86
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048EC7D(C)
|
:0048EDCF 8D45E0 lea eax, dword ptr [ebp-20]
:0048EDD2 8B55E4 mov edx, dword ptr [ebp-1C] <--在这里下指令d edx就可看到正确的注册码了
:0048EDD5 E87E4EF7FF call 00403C58
:0048EDDA 8D45D0 lea eax, dword ptr [ebp-30]
:0048EDDD 50 push eax
至此,我们对该软件的注册算法进行了比较完整的分析,下面我来总结一下注册算法:
我的机器码为"240927-1009227395-61596",软件先对该字符串作处理——去掉该字符串中的两个"-",得到字符串"240927100922739561596",
第一次依次从最后取4个字符"6"、"9"、"5"、"1",然后把它们连起来,再转化为十六进制数,接着把该十六进制数对0x4F进行求模,把求得的结果
作为偏移量,取出字符串s中处于该偏移量位置的字符,从而得到正确的注册码的第一个字符;然后第二次从倒数第二个字符开始取4个字符"9"、"5"、
"1"、"9",重复上面的步骤……直到取完最后4个字符。最后注册码中偏移量为5的倍数的位置插入字符"-"就可得到正确的注册码了.
现在剩下的事就是写注册机了。
相关视频
相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么
热门文章 去除winrar注册框方法
最新文章
比特币病毒怎么破解 比去除winrar注册框方法
华为无线路由器HG522-C破解教程(附超级密码JEB格式文件京东电子书下载和阅读限制破解教UltraISO注册码全集(最新)通过Access破解MSSQL获得数据
人气排行 华为无线路由器HG522-C破解教程(附超级密码JEB格式文件京东电子书下载和阅读限制破解教UltraISO注册码全集(最新)qq相册密码破解方法去除winrar注册框方法(适应任何版本)怎么用手机破解收费游戏华为无线猫HG522破解如何给软件脱壳基础教程
查看所有0条评论>>