//
// sub_1005EA688 from 0x1005ea688 to 0x1005ea71c (148 bytes)
//
// 1 xrefs:
// > sub_1005E8008 @ 0x1005e8274
//
// 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 11:09:45 +0000
//
__int64 __fastcall sub_1005EA688(__int64 a1, __int64 a2, unsigned __int64 a3)
{
__int64 v5; // x0
__int64 result; // x0
void (__fastcall *v7)(_QWORD, __int64, _QWORD, __int64); // x8
int v8; // [xsp+Ch] [xbp-14h] BYREF
v5 = *(_QWORD *)(a1 + 96);
if ( !*(_QWORD *)(v5 + 368) && (*(_BYTE *)(v5 + 45) & 4) == 0 )
return 14;
*(_DWORD *)(a1 + 64) = a3;
result = sub_100585CA4(v5, a2, a3, 2);
if ( !(_DWORD)result )
{
if ( !(unsigned int)sub_100585FE0(*(_QWORD *)(a1 + 96), &v8, 2) )
*(_DWORD *)(a1 + 64) = v8;
v7 = *(void (__fastcall **)(_QWORD, __int64, _QWORD, __int64))(a1 + 336);
if ( v7 )
v7(*(_QWORD *)(a1 + 344), a2, *(unsigned int *)(a1 + 64), 2);
return 0;
}
return result;
}