本帖最后由 Sound 于 2016-8-23 09:14 编辑
【软件名称】: 兴达销售小票打印软件 v3.66 标准版
【下载地址】: 自己找把
【使用工具】: OD等
【软件介绍】: 一看就明白干什么的。
【 声 明】: 仅为算法研究,勿作它途。
论坛里面有人讨论过,不过没算法分析,刚好今天要用一下,顺手发上来。
机器码:BZ2637613460
注册码:3897251368
机器码:BZ2637611050
注册码:3897247876
PEID检测信息:
Borland Delphi 6.0 - 7.0
[Asm] 纯文本查看 复制代码 00576684 55 push ebp
00576685 8BEC mov ebp, esp
00576687 B907000000 mov ecx, $00000007
0057668C 6A00 push $00
0057668E 6A00 push $00
00576690 49 dec ecx
00576691 75F9 jnz 0057668C
00576693 53 push ebx
00576694 56 push esi
00576695 8BD8 mov ebx, eax
00576697 33C0 xor eax, eax
00576699 55 push ebp
* Possible String Reference to: '榛砧?胗^[嬪]?
|
[Asm] 纯文本查看 复制代码 0057669A 6894675700 push $00576794
[Asm] 纯文本查看 复制代码 ***** TRY
|
0057669F 64FF30 push dword ptr fs:[eax]
005766A2 648920 mov fs:[eax], esp
005766A5 8D45F0 lea eax, [ebp-$10]
|
[Asm] 纯文本查看 复制代码 005766A8 E843FFFFFF call 005765F0///取CPUID
--------------------------------------------
[Asm] 纯文本查看 复制代码 005765F0 /$ 53 push ebx
005765F1 |. 57 push edi ; 兴达销售.00576330
005765F2 |. 89C7 mov edi,eax
005765F4 |. B8 01000000 mov eax,0x1
005765F9 |. 0FA2 cpuid
005765FB |. AB stos dword ptr es:[edi] ; eax=00040651
005765FC |. 89D8 mov eax,ebx
005765FE |. AB stos dword ptr es:[edi] ; eax=02100800
005765FF |. 89C8 mov eax,ecx
00576601 |. AB stos dword ptr es:[edi] ; eax=7FDAFBBF
00576602 |. 89D0 mov eax,edx
00576604 |. AB stos dword ptr es:[edi] ; eax=BFEBFBFF
00576605 |. 5F pop edi ; 0152DCD0
00576606 |. 5B pop ebx ; 0152DCD0
00576607 \. C3 retn
--------------------------------------------
[Asm] 纯文本查看 复制代码 005766AD 8D55E8 lea edx, [ebp-$18]
005766B0 8B45F0 mov eax, [ebp-$10]//堆栈 ss:[0012FDB8]=00040651//转10进制263761
* Reference to: SysUtils.IntToStr(Integer):AnsiString;overload;
|
[Asm] 纯文本查看 复制代码 005766B3 E8102DE9FF call 004093C8
005766B8 |. FF75 E8 push [local.6] ; (ASCII "263761")
005766BB 8D55E4 lea edx, [ebp-$1C]
005766BE |. 8B45 F4 mov eax,[local.3] ; 堆栈 ss:[0012FDBC]=02100800
* Reference to: SysUtils.IntToStr(Integer):AnsiString;overload;
|
[Asm] 纯文本查看 复制代码 005766C1 E8022DE9FF call 004093C8//02100800转10进制
005766C6 |. FF75 E4 push [local.7] ; (ASCII "34605056")
005766C9 8D55E0 lea edx, [ebp-$20]
005766CC |. 8B45 F8 mov eax,[local.2] ; 堆栈 ss:[0012FDC0]=7FDAFBBF
* Reference to: SysUtils.IntToStr(Integer):AnsiString;overload;
|
[Asm] 纯文本查看 复制代码 005766CF E8F42CE9FF call 004093C8//7FDAFBBF转10进制
005766D4 |. FF75 E0 push [local.8] ; (ASCII "2145057727")
005766D7 8D55DC lea edx, [ebp-$24]
005766DA |. 8B45 FC mov eax,[local.1] ; 堆栈 ss:[0012FDC4]=BFEBFBFF
* Reference to: SysUtils.IntToStr(Integer):AnsiString;overload;
|
[Asm] 纯文本查看 复制代码 005766DD E8E62CE9FF call 004093C8//BFEBFBFF转10进制
005766E2 |. FF75 DC push [local.9] ; (ASCII "-1075053569")
005766E5 8D45EC lea eax, [ebp-$14]
005766E8 BA04000000 mov edx, $00000004
* Reference to: System.@LStrCatN;////字符串连接在一起
|
[Asm] 纯文本查看 复制代码 005766ED E8DEE0E8FF call 004047D0
005766F2 |. 8B55 EC mov edx,[local.5] ; (ASCII "263761346050562145057727-1075053569")
* Reference to control Edit1 : TEdit
|
[Asm] 纯文本查看 复制代码 005766F5 8B8314030000 mov eax, [ebx+$0314]
* Reference to: Controls.TControl.SetText(TControl;TCaption);
|
[Asm] 纯文本查看 复制代码 005766FB E81484EFFF call 0046EB14
00576700 8D55D0 lea edx, [ebp-$30]
* Reference to control Edit1 : TEdit
|
[Asm] 纯文本查看 复制代码 00576703 8BB314030000 mov esi, [ebx+$0314]
00576709 8BC6 mov eax, esi
* Reference to: Controls.TControl.GetText(TControl):TCaption;
|
[Asm] 纯文本查看 复制代码 0057670B E8D483EFFF call 0046EAE4
00576710 8B45D0 mov eax, [ebp-$30]
00576713 8D4DD4 lea ecx, [ebp-$2C]
00576716 |. BA 0A000000 mov edx,0xA ; (ASCII "263761346050562145057727-1075053569")
* Reference to: StrUtils.LeftStr(AnsiString;Integer):AnsiString;overload;
|
[Asm] 纯文本查看 复制代码 0057671B E83889ECFF call 0043F058
00576720 |. 8B4D D4 mov ecx,[local.11] ; 取左边10位字符串(ASCII "2637613460")
00576723 8D45D8 lea eax, [ebp-$28]
* Possible String Reference to: 'BZ'
|
[Asm] 纯文本查看 复制代码 00576726 BAAC675700 mov edx, $005767AC
* Reference to: System.@LStrCat3;//与固定字符串BZ变成BZ2637613460
|
[Asm] 纯文本查看 复制代码 0057672B E82CE0E8FF call 0040475C
00576730 8B55D8 mov edx, [ebp-$28]
00576733 8BC6 mov eax, esi
* Reference to: Controls.TControl.SetText(TControl;TCaption);
|
[Asm] 纯文本查看 复制代码 00576735 E8DA83EFFF call 0046EB14
0057673A 8D55C8 lea edx, [ebp-$38]
* Reference to control Edit1 : TEdit
|
[Asm] 纯文本查看 复制代码 0057673D 8B8314030000 mov eax, [ebx+$0314]
* Reference to: Controls.TControl.GetText(TControl):TCaption;
|
[Asm] 纯文本查看 复制代码 00576743 E89C83EFFF call 0046EAE4
00576748 8B45C8 mov eax, [ebp-$38]
0057674B 8D55CC lea edx, [ebp-$34]
* Reference to : TZhcForm._PROC_00576608()
|
[Asm] 纯文本查看 复制代码 0057674E E8B5FEFFFF call 00576608///////////////////////////////
00576753 |. 8B55 CC mov edx,[local.13] ; (ASCII "3897251368")
* Reference to control Edit3 : TEdit
|
[Asm] 纯文本查看 复制代码 00576756 8B83F8020000 mov eax, [ebx+$02F8]
* Reference to: Controls.TControl.SetText(TControl;TCaption);
|
[Asm] 纯文本查看 复制代码 0057675C E8B383EFFF call 0046EB14
00576761 33C0 xor eax, eax
00576763 5A pop edx
00576764 59 pop ecx
00576765 59 pop ecx
00576766 648910 mov fs:[eax], edx
****** FINALLY
call 00576608///////////////////////////////注册算法
[Asm] 纯文本查看 复制代码
0057662B |. 8B45 FC mov eax,[local.1] ; (ASCII "BZ2637613460")
0057662E |. E8 DDE0E8FF call 兴达销售.00404710
00576633 |. 85C0 test eax,eax
00576635 |. 76 1C jbe short 兴达销售.00576653
00576637 |. BA 01000000 mov edx,0x1
0057663C |> 8B4D FC mov ecx,[local.1]
0057663F |. 0FB64C11 FF movzx ecx,byte ptr ds:[ecx+edx-0x1] ; (ASCII "BZ2637613460")依次取每位
00576644 |. 03D9 add ebx,ecx
00576646 |. 8BCB mov ecx,ebx
00576648 |. 03C9 add ecx,ecx
0057664A |. 8D0C49 lea ecx,dword ptr ds:[ecx+ecx*2]
0057664D |. 8BD9 mov ebx,ecx
0057664F |. 42 inc edx
00576650 |. 48 dec eax
00576651 |.^ 75 E9 jnz short 兴达销售.0057663C
00576653 |> \8BC3 mov eax,ebx
00576655 |. 33D2 xor edx,edx
00576657 |. 52 push edx
00576658 |. 50 push eax
00576659 |. 8BC6 mov eax,esi
42+0=42
42+42=84
84+84x2=18C
5A+18C=1E6
1E6+1E6=3CC
3CC+3CCx2=B64
.....
ECX=E84B5628
转10进制3897251368就是注册码了。
总结下:
1。取CPUID四段,每段转换成10进制,合并在一起,取前10位,与固定字符"BZ"连接,就是机器码了。
2。注册码算法
@@:
movzx ecx,byte ptr ds:[ecx+edx-0x1] ; (ASCII "BZ2637613460")依次取每位
add ebx,ecx
mov ecx,ebx
add ecx,ecx
lea ecx,dword ptr ds:[ecx+ecx*2]
mov ebx,ecx
inc edx
dec eax
jnz @@
3。还有个小插曲,程序用OD载入调试,每次启动后机器码发生变化,做内存注册机的也是。哪位论坛友能继续跟踪下,呵呵。。
|