【文章标题】: LibXL 算法分析(附注册机)
【文章作者】: GCCG
【软件名称】: LibXL
【下载地址】: http://www.libxl.com
【加壳方式】: 无加壳
【编写语言】: Visual C++
【使用工具】: OllyDbg
【操作平台】: windows
【软件介绍】: LibXL is a library that can read and write Excel files. It doesn't require Microsoft Excel and .NET framework, combines an easy to use and powerful features.
第29个字符串 d 0x64 + 0x779 = 0x7DD -> ESI
第31个字符串 o 0x6F-0x69 = 0x6 -> EDI
第27个字符串 j 0x6A
ESI + EDI - 0x779 = 0x6A
if ESI <= 0x7DD then
if ESI < 0x7DC then
[ebx+0x9F8]= 0x1 失败
else
[ebx+0x99C]= 0 成功
end if
else
if ESI < 0x7DF then
[ebx+0x9F8]= 0x1 失败
else
if ESI != 0x7DF then
[ebx+0x99C]= 0 成功
else
if EDI < 0x3 then
[ebx+0x9F8]= 0x1 失败
else
[ebx+0x99C]= 0 成功
end if
end if
end if
end if
function GetRegCode(byval hWnd as dword, byref edtstr as asciiz) as STRING
local i as LONG
local oMD5 as iMD5
Dim bReg(32) as BYTE
local sName as asciiz * 260
local szMd5 as ASCIIZ * 40
local szChar as ASCIZ * 10
dim p as byte ptr
dim pRegCode as ASCIIZ ptr
if CheckIsDBCS(edtstr) = 1 THEN
MessageBox hWnd, "用户名不能包含中文。", "提示!", %MB_OK or %MB_ICONEXCLAMATION
END IF
for i = len(edtstr) to 1 step -1
sName = sName & Mid$(edtstr, i, 1)
NEXT
oMD5 = class "MD5"
szMd5 = LCASE$(oMD5.calc(sName))
ARRAY ASSIGN bReg() = &H32,&H00,&H32,&H00,&H32,&H00,&H30,&H00,&H30,&H00,&H63,&H00,&H65,&H00,&H30,&H00,&H36,&H00,&H62,&H00,&H36,&H00,&H36,&H00,&H61,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00
p = varptr(szMd5)
for i = 1 to 31
bReg(i) = @p
p=p+1
i=i+1
NEXT
szChar = GetThreeChar()
p = varptr(szChar)
bReg(26) = @p
p = p+1
bReg(28) = @p
p = p+1
bReg(30) = @p
pRegCode = varptr(bReg(0))
function = "windows-" & @pRegCode
END FUNCTION
function GetThreeChar() as STRING
local char27 as ASCIIZ * 2
local char29 as ASCIIZ * 2
local char31 as ASCIIZ * 2
char29 = Get29()
char31 = Get31(char29)
char27 = chr$(ASC(char29) + ASC(char31) - 105)
function = char27 & char29 & char31
END FUNCTION
function Get29() as string
local char29 as ASCIIZ * 2
randomize
char29 = chr$(int(rnd*24 + 99))
if asc(char29) = 101 THEN ' e
Get29()
END IF
function = char29
END FUNCTION
function Get31(byref char as asciiz) as STRING
local char31 as ASCIIZ * 2
randomize
char31 = chr$(int(rnd*26 + 202- ASC(char)))
if ASC(char) <> 102 THEN
if ASC(char31) >= 97 and ASC(char31) < 123 THEN
function = char31
else
Get31(char)
END IF
else
if ASC(char31) >= 108 and ASC(char31) < 123 THEN
function = char31
else
Get31(char)
END IF
END IF
END FUNCTION