//
// IDEA_ecb_encrypt from 0xdb1280 to 0xdb1334 (180 bytes)
//
// 2 xrefs:
// > sub_DA7AC8 @ 0xda7b20
// > ??> @ 0x7d538
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
unsigned __int64 __fastcall IDEA_ecb_encrypt(unsigned __int8 *a1, _BYTE *a2, unsigned int *a3)
{
__int64 v5; // x8
unsigned __int64 v6; // x2
__int64 v7; // x6
__int64 v8; // x3
int v9; // w1
unsigned __int64 v10; // x0
unsigned __int64 v11; // x3
unsigned __int64 v12; // x2
unsigned __int64 result; // x0
unsigned __int64 v14; // [xsp+20h] [xbp+20h] BYREF
unsigned __int64 v15; // [xsp+28h] [xbp+28h]
v5 = a1[4];
v6 = (unsigned __int64)a1[5] << 16;
v7 = a1[7];
v8 = a1[6];
v14 = ((unsigned __int64)a1[1] << 16) | ((unsigned __int64)*a1 << 24) | a1[3] | ((unsigned __int64)a1[2] << 8);
v15 = v6 | (v5 << 24) | v7 | (v8 << 8);
IDEA_encrypt(&v14, a3);
v9 = v14;
v10 = v15;
a2[3] = v14;
a2[7] = v10;
v11 = v10 >> 24;
v12 = v10 >> 16;
*a2 = HIBYTE(v9);
a2[1] = BYTE2(v9);
result = v10 >> 8;
a2[2] = BYTE1(v9);
a2[4] = v11;
a2[5] = v12;
a2[6] = result;
return result;
}