//
// sub_E1A840 from 0xe1a840 to 0xe1a994 (340 bytes)
//
// 1 xrefs:
// > sub_E1A994 @ 0xe1aacc
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:09:43 +0000
//
void **__fastcall sub_E1A840(int a1, __int64 a2, const char *a3, unsigned __int16 a4)
{
void **result; // x0
void **v8; // x19
char *v9; // x0
char *v10; // x21
void *v11; // x5
char *v12; // x3
int v13; // w0
void **v14; // x20
result = (void **)off_154A3C0(0x40u);
v8 = result;
if ( result )
{
v9 = off_154A3D8(a3);
v10 = v9;
if ( v9 )
{
if ( a1 == 2 )
{
v12 = (char *)(v8 + 4);
*((_DWORD *)v8 + 8) = *(_DWORD *)a2;
v13 = 4;
goto LABEL_6;
}
if ( a1 == 10 )
{
v11 = *(void **)(a2 + 8);
v12 = (char *)(v8 + 4);
v13 = 16;
v8[4] = *(void **)a2;
v8[5] = v11;
LABEL_6:
v8[6] = v12;
v8[3] = v8 + 6;
*v8 = v10;
*((_DWORD *)v8 + 5) = v13;
*((_DWORD *)v8 + 4) = (__int16)a1;
v8[1] = nullptr;
v8[7] = nullptr;
v14 = sub_E1A614((__int64)v8, a4);
off_154A3C8(v10);
off_154A3C8(v8);
return v14;
}
off_154A3C8(v9);
off_154A3C8(v8);
return nullptr;
}
else
{
off_154A3C8(v8);
return nullptr;
}
}
return result;
}