//
// sub_1004AC844 from 0x1004ac844 to 0x1004ac8f8 (180 bytes)
//
// 1 xrefs:
// > ??> @ 0x100828438
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1004AC844(__int64 a1, __int64 a2, __int64 a3)
{
__int64 (__fastcall *v4)(__int64, __int64, __int64, _QWORD); // x9
__int64 result; // x0
v4 = *(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(a1 + 504);
if ( !v4
&& (v4 = *(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(*(_QWORD *)(a1 + 408) + 70120LL)) == nullptr
|| (result = v4(a2, a3, a1 + 552, *(_QWORD *)(a1 + 560)), !(_DWORD)result) )
{
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 64LL))(a1, 0);
if ( (_DWORD)result == 14 )
{
result = 0;
*(_DWORD *)(a1 + 404) &= ~1u;
}
}
*(_QWORD *)(a1 + 496) = 0;
if ( *(_QWORD *)(a1 + 536) || !*(_QWORD *)(a1 + 520) && *(_QWORD *)(*(_QWORD *)(a1 + 408) + 70152LL) )
return sub_1004B5D08(a1 + 496);
return result;
}