//
// IDEA_ecb_encrypt from 0xa1ed18 to 0xa1edbc (164 bytes)
//
// 2 xrefs:
// > sub_A15C34 @ 0xa15c7c
// > ??> @ 0x7cdac
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:07:54 +0000
//
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;
}