我想從可執行文件中獲取加密方法。我已解包並開始使用IDA Pro進行分析。推送在程序中的偏移量?
我遇到了一個我無法以任何方式理解的代碼。以下是asm代碼塊。
___:00A11B6F 008 mov eax, [ebp+DecryptedBytes]
___:00A11B72 008 push eax
___:00A11B73 00C push 100h
___:00A11B78 010 push offset CI_StrCmp
___:00A11B7D 014 mov ecx, [ebp+LengthValueOfBytes]
___:00A11B80 014 push ecx
___:00A11B81 018 mov edx, [ebp+Bytes]
___:00A11B84 018 add edx, 4
___:00A11B87 018 push edx
___:00A11B88 01C call rijndaelDecrypt
而且僞的是這樣的:
*(_DWORD *)DecryptResult = rijndaelDecrypt(Bytes + 4, LengthValueOfBytes, (int)CI_StrCmp, 0x100u, DecryptedBytes);
CI_StrCmp是不區分大小寫字符串比較器功能。 rijndaelDecrypt函數讀取該參數的16個字節。我認爲這是一個關鍵。
以下是rijndaelDecrypt函數。
void *__cdecl rijndaelDecrypt(int Bytes, unsigned int Length, int Key, unsigned int BitSize, int a5)
{
void *DecryptedBytes; // [email protected]
void *result; // [email protected]
unsigned int v7; // [sp+Ch] [bp-118h]@2
unsigned int v8; // [sp+10h] [bp-114h]@2
unsigned int v9; // [sp+14h] [bp-110h]@2
unsigned int v10; // [sp+18h] [bp-10Ch]@2
char v11; // [sp+1Ch] [bp-108h]@1
DecryptedBytes = malloc_2(Length);
memset(&v11, 0, 0x108u);
if ((signed int)BitSize >= 16)
{
v7 = *(_DWORD *)Key;
v8 = *(_DWORD *)(Key + 4);
v9 = *(_DWORD *)(Key + 8);
v10 = *(_DWORD *)(Key + 12);
}
else
{
v7 = 0x12121212u;
v8 = 0x12121212u;
v9 = 0x12121212u;
v10 = 0x12121212u;
memcpy(&v7, (const void *)Key, BitSize);
}
if (rijndaelSetupDecrypt((int)&v7, 16, (int)&v11) == 1)
{
sub_A125B0(Bytes, Length, DecryptedBytes, (int)&v11, a5);
result = DecryptedBytes;
}
else
{
result = 0;
}
return result;
}
我的問題是將程序的偏移量發送到另一個程序的含義是什麼。對我來說完全是無稽之談。
p.s.對不起,我的英語不好。
Nop。 3.參數必須是字節數組,並且數組的長度必須等於或大於16。 – turksauron 2013-02-27 20:45:39