//
// IDEA_ecb_encrypt from 0x80a118 to 0x80a1bc (164 bytes)
//
// 2 xrefs:
// > sub_801034 @ 0x80107c
// > ??> @ 0x6332c
//
// 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 int __fastcall IDEA_ecb_encrypt(unsigned int *a1, _BYTE *a2, int *a3)
{
unsigned int v4; // r3
char v5; // r3
char v6; // r6
char v7; // r5
unsigned int v8; // lr
unsigned int v9; // r12
unsigned int result; // r0
unsigned int v11; // r1
unsigned int v12; // [sp+0h] [bp-8h] BYREF
unsigned int v13; // [sp+4h] [bp-4h]
v4 = _byteswap_ulong(a1[1]);
v12 = _byteswap_ulong(*a1);
v13 = v4;
IDEA_encrypt((int *)&v12, a3);
v5 = v13;
v6 = HIBYTE(v12);
v7 = BYTE2(v12);
v8 = v12 >> 8;
v9 = HIBYTE(v13);
result = HIWORD(v13);
v11 = v13 >> 8;
a2[3] = v12;
*a2 = v6;
a2[1] = v7;
a2[2] = v8;
a2[7] = v5;
a2[4] = v9;
a2[5] = result;
a2[6] = v11;
return result;
}