//
// sub_1002A8A10 from 0x1002a8a10 to 0x1002a8a82 (114 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008fb0f0
//
// 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_1002A8A10(__int64 a1, __int64 a2)
{
__int64 result; // rax
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a2 + 1056LL))(a2, 0);
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 512LL))(a2, 1);
if ( *(_QWORD *)(a1 + 64) == a2 )
{
*(_QWORD *)(a1 + 64) = 0;
if ( *(_BYTE *)(a1 + 24) == 1 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 640) + 1056LL))(a1 - 640, 0);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)(a1 - 640) + 512LL))(a1 - 640, 1);
}
}
return result;
}