//
// GameLevelManager::onUploadLevelListCompleted from 0x84589c to 0x845980 (228 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x85b3bc
// > ??> @ 0x98050
//
// 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 12:55:20 +0000
//
__int64 __fastcall GameLevelManager::onUploadLevelListCompleted(__int64 a1, __int64 a2, __int64 a3)
{
const char *v5; // x0
int v6; // w1
const char *v7; // x0
__int64 result; // x0
unsigned int v9; // w20
__int64 v10; // x0
__int64 v11; // x1
__int64 v12; // x21
GameLevelManager *v13; // x0
__int64 (__fastcall *v14)(__int64, __int64, _QWORD); // x19
__int64 LocalLevelList; // x0
int v17; // [xsp+38h] [xbp+38h]
std::__tree::__erase_unique((__int64 **)(a1 + 720), a3);
v5 = (const char *)(a3 + 1);
if ( (*(_BYTE *)a3 & 1) != 0 )
v5 = *(const char **)(a3 + 16);
v6 = atoi(v5);
v7 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v7 = *(const char **)(a2 + 16);
v17 = v6;
result = atoi(v7);
v9 = result;
if ( (int)result <= 0 )
{
v12 = *(_QWORD *)(a1 + 1280);
if ( v12 )
{
v13 = (GameLevelManager *)a1;
v14 = *(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v12 + 8LL);
LocalLevelList = GameLevelManager::getLocalLevelList(v13, v17);
return v14(v12, LocalLevelList, v9);
}
}
else
{
v10 = GameLevelManager::getLocalLevelList((GameLevelManager *)a1, v17);
v11 = v10;
if ( v10 )
{
*(_DWORD *)(v10 + 344) = v9;
*(_BYTE *)(v10 + 395) = 1;
}
result = *(_QWORD *)(a1 + 1280);
if ( result )
return (**(__int64 (__fastcall ***)(__int64, __int64))result)(result, v11);
}
return result;
}