//
// sub_E040C0 from 0xe040c0 to 0xe04134 (116 bytes)
//
// 2 xrefs:
// > sub_DF16E0 @ 0xdf17e0
// > sub_DF1848 @ 0xdf18e0
//
// 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:33 +0000
//
__int64 __fastcall sub_E040C0(char *a1, __int64 a2, char *a3, __int64 *a4)
{
__int64 v4; // x6
__int64 v5; // x7
__int64 v6; // x4
__int64 v7; // x5
__int64 result; // x0
_QWORD v9[5]; // [xsp+20h] [xbp+20h] BYREF
char *v10; // [xsp+48h] [xbp+48h] BYREF
__int64 v11; // [xsp+50h] [xbp+50h]
__int64 v12; // [xsp+58h] [xbp+58h]
v4 = *a4;
v5 = a4[1];
v6 = a4[2];
v7 = a4[3];
v10 = a1;
v12 = a2;
v11 = 0;
v9[0] = v4;
v9[1] = v5;
v9[2] = v6;
v9[3] = v7;
result = sub_E0317C(&v10, a3, v9);
if ( (_DWORD)result != -1 && v12 )
{
if ( v12 == v11 )
*(v10 - 1) = 0;
else
*v10 = 0;
}
return result;
}