吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 7786|回复: 14
收起左侧

[原创] Cute Flv Video Converter V1.40算法分析+Delphi注册机源码

[复制链接]
playboysen 发表于 2009-1-4 22:54
【破文标题】Cute Flv Video Converter V1.40算法分析+Delphi注册机源码
【破文作者】Playboysen
【作者邮箱】playboysen#126.com
破解工具】PEiD,OD
【破解平台】Windows XP
【软件大小】2.37 MB
【软件授权】国外软件/视频转换
【软件语言】英文
【原版下载】hxxp://www.videotool.net/download/flvvideoconverter.exe
【保护方式】用户名 注册码
【软件简介】Cute FLV Video Converter is a easyt-to-use video converter software. It can convert many video formats, e.g.DivX, XviD, MOV, MPEG-4,MPEG, WMV, H.263,AVI,WMV,ASF to FLV Movie Video format.
【破解声明】一点心得,愿与大家分享 o(∩_∩)o 版权所有,转载注明作者!
【破解内容】
        
     好长时间没有动手了,前段时间心血来潮玩了半个月脚本。
     这两天牛年之初,决定重返软件安全版闹一闹,没别的,图个热闹喜庆(*^__^*) 嘻嘻……

     踩点可知,程序VC++编写,无壳,未注册启动有Nag框,注册后不再显示,输入假码有错误提示。OD载入,下断点bp MessageBoxW或者查找字符串很容易可找到关键处
0040EDFD   .  6A 01         push 1
0040EDFF   .  E8 340F0000   call <jmp.&MFC42.#6334_CWnd::UpdateData>       ;取注册码
......
0040EE61   .  E8 C2090000   call <jmp.&MFC42.#858_CString::operator=>
0040EE66   .  8B17          mov edx,dword ptr ds:[edi]                     ;用户名放入
0040EE68   .  8B42 F8       mov eax,dword ptr ds:[edx-8]                   ;用户名长度放入
0040EE6B   .  85C0          test eax,eax
0040EE6D   .  75 2B         jnz short FlvVideo.0040EE9A                    ;检验用户名长度
0040EE6F   .  6A 40         push 40
0040EE71   .  68 4C7D4100   push 00417D4C                         ;warning
0040EE76   .  68 247E4100   push 00417E24                         ;please enter registration name!
0040EE7B   .  8BCE          mov ecx,esi
0040EE7D   .  E8 D20D0000   call <jmp.&MFC42.#4224_CWnd::MessageBoxA>
0040EE82   .  68 03040000   push 403
0040EE87   .  8BCE          mov ecx,esi
0040EE89   .  E8 D00C0000   call <jmp.&MFC42.#3092_CWnd::GetDlgItem>
0040EE8E   .  8BC8          mov ecx,eax
0040EE90   .  E8 3F0C0000   call <jmp.&MFC42.#5981_CWnd::SetFocus>
0040EE95   .  E9 DE000000   jmp FlvVideo.0040EF78
0040EE9A   >  8B45 00       mov eax,dword ptr ss:[ebp]                     ;同上,检验注册码长度
0040EE9D   .  8B48 F8       mov ecx,dword ptr ds:[eax-8]
0040EEA0   .  85C9          test ecx,ecx
0040EEA2   .  75 2B         jnz short FlvVideo.0040EECF
0040EEA4   .  6A 40         push 40
0040EEA6   .  68 4C7D4100   push 00417D4C                         ;warning
0040EEAB   .  68 047E4100   push 00417E04                         ;please enter registration code!
......
0040EEEE   .  8D4C24 1C     lea ecx,dword ptr ss:[esp+1C]
0040EEF2   .  C64424 30 00  mov byte ptr ss:[esp+30],0
0040EEF7   .  E8 C4010000   call FlvVideo.0040F0C0                         ;看堆栈,用户名和注册码入栈可知此应为关键call,F7进入
0040EEFC   .  84C0          test al,al
0040EEFE   .  74 65         je short FlvVideo.0040EF65                     ;关键跳
0040EF00   .  8D4C24 14     lea ecx,dword ptr ss:[esp+14]
0040EF04   .  E8 A7010000   call FlvVideo.0040F0B0
跟入0040EEF7关键call,分析算法
0040F0C0  /$  6A FF         push -1
0040F0C2  |.  68 70144100   push FlvVideo.00411470                         ;SE 句柄安装
0040F0C7  |.  64:A1 0000000>mov eax,dword ptr fs:[0]
0040F0CD  |.  50            push eax
0040F0CE  |.  64:8925 00000>mov dword ptr fs:[0],esp
0040F0D5  |.  51            push ecx
0040F0D6  |.  53            push ebx
0040F0D7  |.  55            push ebp
0040F0D8  |.  56            push esi
0040F0D9  |.  57            push edi
0040F0DA  |.  8BE9          mov ebp,ecx
0040F0DC  |.  8B7C24 28     mov edi,dword ptr ss:[esp+28]                  ;注册码放入edi供下面检验使用
0040F0E0  |.  33DB          xor ebx,ebx
0040F0E2  |.  33C9          xor ecx,ecx
0040F0E4  |.  C74424 1C 010>mov dword ptr ss:[esp+1C],1
0040F0EC  |.  8B57 F8       mov edx,dword ptr ds:[edi-8]                   ;用户名放入edx
0040F0EF  |.  3BD3          cmp edx,ebx
0040F0F1  |.  7E 18         jle short FlvVideo.0040F10B
0040F0F3  |>  8A0439        /mov al,byte ptr ds:[ecx+edi]                  ;所输入注册码必须是数字
0040F0F6  |.  3C 30         |cmp al,30
0040F0F8  |.  0F8C 8F000000 |jl FlvVideo.0040F18D
0040F0FE  |.  3C 39         |cmp al,39
0040F100  |.  0F8F 87000000 |jg FlvVideo.0040F18D
0040F106  |.  41            |inc ecx
0040F107  |.  3BCA          |cmp ecx,edx
0040F109  |.^ 7C E8         \jl short FlvVideo.0040F0F3
0040F10B  |>  8B7424 24     mov esi,dword ptr ss:[esp+24]                  ;用户名放入
0040F10F  |.  8B56 F8       mov edx,dword ptr ds:[esi-8]                   ;用户名长度放入
0040F112  |.  3BD3          cmp edx,ebx
0040F114  |.  74 77         je short FlvVideo.0040F18D
0040F116  |.  33C0          xor eax,eax
0040F118  |.  33C9          xor ecx,ecx
0040F11A  |.  3BD3          cmp edx,ebx
0040F11C  |.  7E 0D         jle short FlvVideo.0040F12B
0040F11E  |>  0FBE1C31      /movsx ebx,byte ptr ds:[ecx+esi]               ;用户名逐位相加,值放入eax,设为K
0040F122  |.  03C3          |add eax,ebx
0040F124  |.  41            |inc ecx
0040F125  |.  3BCA          |cmp ecx,edx
0040F127  |.^ 7C F5         \jl short FlvVideo.0040F11E
0040F129  |.  33DB          xor ebx,ebx                                    ; 提醒:下面参与运算的所有数值都是十六进制数值
0040F12B  |>  8D0CC0        lea ecx,dword ptr ds:[eax+eax*8]               ; 9*K
0040F12E  |.  57            push edi                                       ; /atol函数,大概功能是StrtoInt,此处edi是其唯一的参数(注意下面几行运算并不是atol的参数)
0040F12F  |.  8D0C88        lea ecx,dword ptr ds:[eax+ecx*4]               ; 9K*4+K
0040F132  |.  8D0C49        lea ecx,dword ptr ds:[ecx+ecx*2]               ; |(9K*4+K)*3
0040F135  |.  8D1489        lea edx,dword ptr ds:[ecx+ecx*4]               ; |(((9K*4+K)*3)*5
0040F138  |.  8D0450        lea eax,dword ptr ds:[eax+edx*2]               ; |((((9K*4+K)*3)*5)*2+K
0040F13B  |.  8D34C5 040248>lea esi,dword ptr ds:[eax*8+5480204]           ; |((((9K*4+K)*3)*5)*2+K)*8+5480204 == ESI
0040F142  |.  FF15 9C254100 call dword ptr ds:[<&MSVCRT.atol>]             ; \atol
0040F148  |.  83C4 04       add esp,4
0040F14B  |.  3BC6          cmp eax,esi                                    ;比较假码和运算值(真码)
0040F14D  |.  75 3E         jnz short FlvVideo.0040F18D
0040F14F  |.  51            push ecx
这里我必须要提醒大家一下,上面参与运算的所有数值都是十六进制数值,一定要注意,举个例子:
9K*4+K=24K+K=25K(不是37K,你可以用计算器计算一下9h*4h是不是等于24h)

我在写注册机的时候就很不幸地陷入了自己粗心留下的陷阱,困惑了好长时间!
知道了这一点,其实算法就很简单了
((((9K*4+K)*3)*5)*2+K)*8+5480204
=22B8*K+5480204

我们来看一下Delphi注册机的源码实现部分,我就偷个懒,直接用我自己的注册机模板套一下(http://www.unpack.cn/viewthread. ... B%D7%A2%B2%E1%BB%FA
提醒大家,如果你遇到一些算法还原成高级语言时觉得比较繁琐,建议学会灵活运用嵌入汇编来编程:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Menus, jpeg, ExtCtrls, Buttons;

type
  TForm1 = class(TForm)
    img1: TImage;
    grp1: TGroupBox;
    lbl1: TLabel;
    Edit1: TEdit;
    lbl3: TLabel;
    btn1: TBitBtn;
    btn2: TBitBtn;
    lbl2: TLabel;
    Edit2: TEdit;
    procedure Edit1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure btn2Click(Sender: TObject);
    procedure btn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
const
   xm : array[1..7996] of Byte = (
     $45,$78,$74,$65,$6E,$64,$65,$64,$20,$4D,$6F,$64,$75,$6C,$65,$3A,
......
     $39,$38,$20,$3D,$5D,$02,$00,$00,$28,$00,$00,$00 );

implementation

uses Unit2, Unit3;
{$I XMobj\ufmod.inc *** uFMOD API: WINMM version}
{$R *.dfm}

procedure TForm1.Edit1Click(Sender: TObject);
begin
Edit1.Clear;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
uFMOD_PlaySong(@xm,Length(xm),XM_MEMORY);
end;

procedure TForm1.btn2Click(Sender: TObject);
begin
form3.show;
end;

procedure TForm1.btn1Click(Sender: TObject);
var
User:string;
Len,RegCode:Integer;
begin
  User:=Form1.Edit1.Text;
  Len:=Length(User);
  asm
      pushad                 //保存各寄存器值,免得麻烦
      mov esi,User           //用户名放入esi
      mov edx,Len            //用户名长度放入edx
      xor eax,eax
      xor ecx,ecx            //ecx计数
    @loop:
        movsx   ebx, byte ptr [ecx+esi]
        add     eax, ebx
        inc     ecx
        cmp     ecx, edx
        jl      @loop
      mov RegCode,eax        //计算出用户名各字符之和
      popad
  end;
  Form1.Edit2.Text:=IntToStr($022B8*RegCode+$05480204);
end;

end.
经测试,完全支持中文用户名注册!
此网站还有其余十余款类似软件,大家可自行下载练习。

由本文,我们看到了一个简单算法可能给程序带来的致命打击,偷懒害死人哪~~~

[ 本帖最后由 playboysen 于 2009-1-4 22:56 编辑 ]

注册机源码.rar

265.98 KB, 下载次数: 41, 下载积分: 吾爱币 -1 CB

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

洞庭风 发表于 2009-1-4 22:57
高人啊!可惜自己目前还停留在破解层面上,汗一个:L
Hmily 发表于 2009-1-4 23:48
a8839777 发表于 2009-1-5 06:32
uyhj 发表于 2009-1-5 12:11
很不错的教程:D
萧萧黄叶 发表于 2009-1-5 12:24
高人,看一看你的注册机模板。
iawen 发表于 2009-1-5 12:43
算法多产啊,来顶一下,哈
大大连连 发表于 2009-1-5 13:07
精品文章,感谢了,希望多多此类文章!
estelle 发表于 2009-1-5 13:24
我挺你 不错的教程
hl7506 发表于 2009-1-5 13:41
目前还停留在破解层面上
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-21 06:39

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表