-
-
[旧帖]
这段IDA反编译的数据解密代码是否有现成的C算法?
0.00雪花
-
发表于:
2016-2-14 16:33
3783
-
[旧帖] 这段IDA反编译的数据解密代码是否有现成的C算法?
0.00雪花
用IDA反编译的一段数据解密代码,想问问大家有没有见过,如果有现成的C算法实现就不用分析了,节约点时间。
以下是主要部分代码。
LOWORD(d3) = *(_BYTE *)(data + 3);
HIWORD(v7) = HIWORD(data);
LOWORD(d0) = *(_BYTE *)data;
LOWORD(d2) = *(_BYTE *)(data + 2);
LOWORD(d1) = *(_BYTE *)(data + 1);
v8 = d2 + (d3 << 8);
LOWORD(d2) = *(_BYTE *)(data + 5);
v9 = d0 + (d1 << 8);
LOWORD(d0) = *(_BYTE *)(data + 4);
v10 = d0 + (d2 << 8);
LOWORD(d0) = *(_BYTE *)(data + 7);
LOWORD(v7) = *(_BYTE *)(data + 6);
v20 = *(_DWORD *)(a3 + 8);
v11 = v7 + (d0 << 8);
LOWORD(v18) = v8;
HIWORD(v15) = HIWORD(v9);
LOWORD(v17) = v10;
v16 = v20 + 120;
LOWORD(v19) = v7 + ((_WORD)d0 << 8);
v21 = 15;
v29 = v9;
HIWORD(v23) = HIWORD(v8);
HIWORD(v24) = HIWORD(v10);
HIWORD(v25) = HIWORD(v11);
v26 = 15;
v27 = *(_DWORD *)(a3 + 8);
v28 = v20 + 120;
while ( 1 )
{
if ( v21 == 4 || v21 == 10 )
{
v12 = v19 - *(_WORD *)(v20 + 2 * (v10 & 0x3F));
LOWORD(v24) = v17 - *(_WORD *)(v20 + 2 * (v8 & 0x3F));
LOWORD(v21) = v17 - *(_WORD *)(v20 + 2 * (v8 & 0x3F));
LOWORD(v23) = v18 - *(_WORD *)(v27 + 2 * (v9 & 0x3F));
v8 = v23;
LOWORD(v20) = v18 - *(_WORD *)(v27 + 2 * (v9 & 0x3F));
LOWORD(v29) = v29 - *(_WORD *)(v27 + 2 * (v12 & 0x3F));
v9 = v29;
v10 = v24;
LOWORD(v25) = v12;
v11 = v25;
HIWORD(v15) = HIWORD(v29);
}
else
{
v12 = v19;
LOWORD(v21) = v17;
LOWORD(v20) = v18;
}
LOWORD(v21) = (unsigned __int16)v21 >> 3;
LOWORD(v16) = v12 >> 5;
LOWORD(v20) = (unsigned __int16)v20 >> 2;
v19 = (v16 | (v11 << 11)) - (v9 & ~v10) - (v8 & v10);
LOWORD(v19) = v19 - *(_WORD *)(v28 + 6);
v11 = v19;
v17 = (v21 | (v10 << 13)) - (v19 & ~v8) - (v8 & v9);
LOWORD(v17) = v17 - *(_WORD *)(v28 - 8 + 12);
v10 = v17;
v16 = v28 - 8;
LOWORD(v15) = (unsigned __int16)v29 >> 1;
v18 = (v20 | (v8 << 14)) - (v17 & ~v9) - (v9 & v19);
LOWORD(v18) = v18 - *(_WORD *)(v28 - 8 + 10);
v8 = v18;
v22 = (v15 | (v9 << 15)) - (v18 & ~v19) - (v17 & v19);
LOWORD(v22) = v22 - *(_WORD *)v28;
v13 = v26-- - 1 < 0;
v9 = v22;
HIWORD(v25) = HIWORD(v19);
v28 -= 8;
HIWORD(v24) = HIWORD(v17);
HIWORD(v23) = HIWORD(v18);
HIWORD(v15) = HIWORD(v22);
v29 = v22;
if ( v13 )
break;
v20 = *(_DWORD *)(a3 + 8);
v21 = v26;
}
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)