Delphi程序增加破解难度-初级-[1]
将加密需要用到的变量全部改成Variant,这样就增加了算法分析的难度。举例(仅仅是例子):
var
S : String;
begin
S := kbGetAdapterAddress(0);//取网卡ID函数
if S = '00061BD35968' then
Caption := '正式版'
else
Caption := '试用版';
end;
编译后代码为(地址不固定):
0044DF8A |.8D55 FC lea edx, dword ptr ss:
0044DF8D |.33C0 xor eax, eax
0044DF8F |.E8 9CFCFFFF call 0044DC30
0044DF94 |.8B45 FC mov eax, dword ptr ss:
0044DF97 |.BA E8DF4400 mov edx, 0044DFE8 ;ASCII "00061BD35968"
0044DF9C |.E8 5366FBFF call 004045F4
0044DFA1 |.75 0E jnz short 0044DFB1
0044DFA3 |.BA 00E04400 mov edx, 0044E000
0044DFA8 |.8BC3 mov eax, ebx
0044DFAA |.E8 BDF0FDFF call 0042D06C
0044DFAF |.EB 0C jmp short 0044DFBD
0044DFB1 |>BA 10E04400 mov edx, 0044E010
0044DFB6 |.8BC3 mov eax, ebx
0044DFB8 |.E8 AFF0FDFF call 0042D06C
0044DFBD |>33C0 xor eax, eax
如果换成
var
S : Variant;
begin
S := kbGetAdapterAddress(0);
if S = '00061BD35968' then
Caption := '正式版'
else
Caption := '试用版';
end;
编译后代码就变成了
不管是比较还是赋值,都要调用TVariantManager的方法,算法虽然一样,但是增加了分析难度
0044E059 |.8D55 EC lea edx, dword ptr ss:
0044E05C |.33C0 xor eax, eax
0044E05E |.E8 CDFBFFFF call 0044DC30
0044E063 |.8B55 EC mov edx, dword ptr ss:
0044E066 |.8D45 F0 lea eax, dword ptr ss:
0044E069 |.E8 6670FBFF call 004050D4
0044E06E |.8D45 DC lea eax, dword ptr ss:
0044E071 |.BA DCE04400 mov edx, 0044E0DC ;ASCII "00061BD35968"
0044E076 |.E8 5970FBFF call 004050D4
0044E07B |.8D55 DC lea edx, dword ptr ss:
0044E07E |.8D45 F0 lea eax, dword ptr ss:
0044E081 |.E8 6E70FBFF call 004050F4
0044E086 |.75 0E jnz short 0044E096
0044E088 |.BA F4E04400 mov edx, 0044E0F4
0044E08D |.8BC3 mov eax, ebx
0044E08F |.E8 D8EFFDFF call 0042D06C
0044E094 |.EB 0C jmp short 0044E0A2
0044E096 |>BA 04E14400 mov edx, 0044E104
0044E09B |.8BC3 mov eax, ebx
0044E09D |.E8 CAEFFDFF call 0042D06C
0044E0A2 |>33C0 xor eax, eax
蓝色光芒发表于bbs.66h6.com,引用请注明出处 嘿嘿,沙发,学习Delphi程序
页:
[1]