起手
- 查壳 Borland Delphi v3.0
- 直接用idr吧
跟下事件
- 没有注册按钮,那么处理代码一般有按键,文本变化,定时器几种,用idr发现,用户名输入框有个按键事件
CKM.TForm1.KeyUp
00457E4C push ebp
00457E4D mov ebp,esp
00457E4F push ebx
00457E50 push esi
00457E51 mov ebx,eax
00457E53 mov eax,dword ptr [ebx+2D4];TForm1.Edit1:TEdit
00457E59 call TControl.GetTextLen
00457E5E mov esi,eax
00457E60 mov dword ptr [ebx+2F8],esi;取出用户名长度存下来
00457E66 mov eax,esi
00457E68 cdq
00457E69 xor eax,edx
00457E6B sub eax,edx
00457E6D mov dword ptr [ebx+2F8],eax;TForm1.?f2F8:Integer
00457E73 pop esi
00457E74 pop ebx
00457E75 pop ebp
00457E76 ret 4
- 在看看注册码的文本框,也有一个按键事件,那就看看吧,个人习惯复制出来把确定的内容命名,方便看
CKM.TForm1.chkcode
00457C60 push dword ptr fs:[eax]
00457C63 mov dword ptr fs:[eax],esp
00457C66 mov esi,dword ptr [ebx+2F8]; 把上一步的长度拿出来
00457C6C add esi,5 ;+5
00457C6F push dword ptr [ebx+310];固定值"黑头Sun Bird"
00457C75 lea edx,[ebx+nameLenth_plus5]
00457C78 mov eax,esi
00457C7A call IntToStr ;变成字符
00457C7F push dword ptr [ebx+nameLenth_plus5] ;放入堆栈
00457C82 push dword ptr [ebx+314];固定值dseloffc-012-OK
00457C88 lea edx,[ebp-0C]
00457C8B mov eax,dword ptr [ebx+2D4];TForm1.Edit1:TEdit
00457C91 call TControl.GetText ;再把Name拿出来
00457C96 push dword ptr [ebp-0C]
00457C99 lea eax,[ebx+AllData];TForm1.?f318:String
00457C9F mov edx,4
00457CA4 call @LStrCatN ;吧他们连在一起
....
;下边没目标了,跟不下去了.
倒着走试试
00458094 xor edx,edx
00458096 mov eax,dword ptr [esi+2F0];TForm1.Panel1:TPanel
0045809C call TControl.SetVisible
004580A1 mov eax,[0045B820];gvar_0045B820:TForm1
004580A6 add eax,70
004580A9 mov edx,458114 ;恭喜恭喜!注册成功
- 在00458031发现类变量30C要求0x85,否则跳走失败,两头都有垃圾代码填充
00458031 cmp dword ptr [esi+30C],85;TForm1.?f30C:dword
0045803B> jne 004580B3
- 图片框DblClick事件中,可见要成为0x85,先要0x3E,同样两头都有垃圾代码
00457EF5 cmp dword ptr [esi+30C],3E;TForm1.?f30C:dword
00457EFC> jne 00457F08
00457EFE mov dword ptr [esi+30C],85;TForm1.?f30C:dword
- 再找,回到注册框的按键事件上来了,和上边的对上了.
00457D1E lea edx,[ebp-20]
00457D21 mov eax,dword ptr [ebx+2D8];TForm1.Edit2:TEdit
00457D27 call TControl.GetText ;读取注册码
00457D2C mov eax,dword ptr [ebp-20]
00457D2F mov edx,dword ptr [ebx+AllData];和第一步的比较
00457D35 call @LStrCmp
00457D3A> jne 00457D46
00457D3C mov dword ptr [ebx+30C],3E;赋值 3e
00457D46 mov eax,dword ptr [ebx+30C];TForm1.?f30C:dword
00457D4C add eax,10
注册机
输入注册码,然后对着图相框快速点3下,或者多点几下也行
Function Regcode(userName As String) As String
Regcode = "oúí·Sun Bird" & Len(userName) + 5 & "dseloffc-012-OK" & userName
End Function
总结
作者的恶作剧,搞了一堆垃圾代码干扰跟踪.