本帖最后由 dtooboss 于 2010-4-20 15:03 编辑 str = D7BE22686F691F63181F181D1F636F6C1D1E6219181DCD658B6C
1.1 步骤1
字符串的后面8字节和其余字节分别做下面计算,分别得到4字节DWORD和(strlen-8)/2字节序列
i = 0;
while (i < strlen){
if (str[i] > 0x39){
dst[i/2] = (str[i]-7) << 4;
}else{
dst[i/2] = str[i] << 4;
}
if (str[i+1] > 0x39){
dst[i/2] = dst[i] | (str[i+1] - 0x37);
}else{
dst[i/2] = dst[i] | (str[i+1] - 0x30);
}
i += 2;
}
得到dst4,dstmain
1.2 步骤2
DWORD dwCode = dst4 xor 0x83ACB78D ;
i = 0;
while (i < dstmain.size){
dstmain[i] = dstmain[i] XOR (dwCode[0] XOR 0xAF); //最终字符
dwCode = dwCode * 0x34F85F9;
dwCode = ( (dwCode + dstmain.size)*dstmain.size + 0xA13292 ) * dstmain.size;
i++;
}
|