//
// sub_1002A67F0 from 0x1002a67f0 to 0x1002a6896 (166 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008fa9c0
//
// 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_1002A67F0(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // r14
__int64 v4; // rax
GameLevelManager *v5; // rax
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a2 + 1056LL))(a2, 0);
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 512LL))(a2, 1);
if ( *(_QWORD *)(a1 + 48) == a2 )
{
*(_QWORD *)(a1 + 48) = 0;
if ( *(_BYTE *)(a1 + 16) == 1 )
{
v3 = a1 - 640;
v4 = *(_QWORD *)(a1 + 24);
if ( v4 )
{
if ( !*(_BYTE *)(v4 + 376) )
{
v5 = GameLevelManager::sharedState();
GameLevelManager::readFriendRequest(v5, *(_DWORD *)(*(_QWORD *)(a1 + 24) + 316LL));
*(_BYTE *)(*(_QWORD *)(a1 + 24) + 376LL) = 1;
}
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 1056LL))(a1 - 640, 0);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 512LL))(a1 - 640, 1);
}
}
return result;
}