//
// sub_10064EC70 from 0x10064ec70 to 0x10064ed80 (272 bytes)
//
// 21 xrefs:
// > ??> @ 0x1009add00
// > ??> @ 0x1009adde8
// > ??> @ 0x1009aded0
// > ??> @ 0x1009ae1a8
// > ??> @ 0x1009ae290
// > ??> @ 0x1009ae378
// > ??> @ 0x1009ae488
// > ??> @ 0x1009ae570
// > ??> @ 0x1009ae658
// > ??> @ 0x1009ae768
// > ??> @ 0x1009ae850
// > ??> @ 0x1009ae938
// > ??> @ 0x1009aea40
// > ??> @ 0x1009aeb28
// > ??> @ 0x1009aec10
// > ??> @ 0x1009aecf8
// > ??> @ 0x1009aede0
// > ??> @ 0x1009aeec8
// > ??> @ 0x1009aefb0
// > ??> @ 0x1009af098
// > ??> @ 0x1009af180
//
// 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:10:48 +0000
//
__int64 __fastcall sub_10064EC70(__int64 a1, __int64 a2, __int64 a3)
{
_DWORD *v6; // x8
__int64 result; // x0
__int64 v8; // x8
*__error() = 0;
v6 = *(_DWORD **)(a1 + 128);
if ( v6[119] && !v6[65] && !v6[71] )
{
if ( (sub_100664E84(a1) & 0x3000) != 0 )
{
v6 = *(_DWORD **)(a1 + 128);
}
else
{
*(_DWORD *)(a1 + 72) = 12292;
v6 = *(_DWORD **)(a1 + 128);
v6[119] = 0;
++v6[121];
++v6[120];
}
}
v6[122] = 1;
result = (*(__int64 (__fastcall **)(__int64, __int64, __int64, __int64, __int64))(*(_QWORD *)(a1 + 8) + 104LL))(
a1,
23,
a2,
a3,
1);
v8 = *(_QWORD *)(a1 + 128);
if ( (_DWORD)result == -1 && *(_DWORD *)(v8 + 488) == 2 )
{
++*(_DWORD *)(a1 + 44);
result = (*(__int64 (__fastcall **)(__int64, __int64, __int64, __int64, __int64))(*(_QWORD *)(a1 + 8) + 104LL))(
a1,
23,
a2,
a3,
1);
--*(_DWORD *)(a1 + 44);
}
else
{
*(_DWORD *)(v8 + 488) = 0;
}
return result;
}