//
// GameLevelManager::onUploadLevelListCompleted from 0x4d0f42 to 0x4d0fc4 (130 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4db03a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:50:47 +0000
//
int (__fastcall ***__fastcall GameLevelManager::onUploadLevelListCompleted(int a1, int a2, int a3))(_DWORD, int)
{
const char *v6; // r0
int v7; // r7
const char *v8; // r0
int (__fastcall ***result)(_DWORD, int); // r0
int (__fastcall ***v10)(_DWORD, _DWORD); // r5
int v11; // r4
int (__fastcall *v12)(int, int, int (__fastcall ***)(_DWORD, _DWORD)); // r8
int v13; // r0
int LocalLevelList; // r0
int v15; // r1
std::__tree::__erase_unique((int **)(a1 + 524), (unsigned __int8 *)a3);
if ( (*(_BYTE *)a3 & 1) != 0 )
v6 = *(const char **)(a3 + 8);
else
v6 = (const char *)(a3 + 1);
v7 = atoi(v6);
if ( (*(_BYTE *)a2 & 1) != 0 )
v8 = *(const char **)(a2 + 8);
else
v8 = (const char *)(a2 + 1);
result = (int (__fastcall ***)(_DWORD, int))atoi(v8);
v10 = result;
if ( (int)result > 0 )
{
LocalLevelList = GameLevelManager::getLocalLevelList((GameLevelManager *)a1, v7);
v15 = LocalLevelList;
if ( LocalLevelList )
{
*(_DWORD *)(LocalLevelList + 276) = v10;
*(_BYTE *)(LocalLevelList + 327) = 1;
}
result = *(int (__fastcall ****)(_DWORD, int))(a1 + 848);
if ( result )
return (int (__fastcall ***)(_DWORD, int))(**result)(result, v15);
}
else
{
v11 = *(_DWORD *)(a1 + 848);
if ( v11 )
{
v12 = *(int (__fastcall **)(int, int, int (__fastcall ***)(_DWORD, _DWORD)))(*(_DWORD *)v11 + 4);
v13 = GameLevelManager::getLocalLevelList((GameLevelManager *)a1, v7);
return (int (__fastcall ***)(_DWORD, int))v12(v11, v13, v10);
}
}
return result;
}