//
// GameLevelManager::onUploadLevelListCompleted from 0x3ce768 to 0x3ce7da (114 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x3d7630
//
// 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
//
int (__fastcall ***__fastcall GameLevelManager::onUploadLevelListCompleted(
int a1,
const char **a2,
const char **a3))(_DWORD, GJLevelList *)
{
int v6; // r7
int (__fastcall ***result)(_DWORD, GJLevelList *); // r0
int (__fastcall ***v8)(_DWORD, _DWORD); // r6
int v9; // r5
int (__fastcall *v10)(int, GJLevelList *, int (__fastcall ***)(_DWORD, _DWORD)); // r8
GJLevelList *v11; // r0
GJLevelList *LocalLevelList; // r0
GJLevelList *v13; // r1
std::_Rb_tree,std::less,std::allocator>::erase(
(_DWORD *)(a1 + 264),
(int)a3);
v6 = atoi(*a3);
result = (int (__fastcall ***)(_DWORD, GJLevelList *))atoi(*a2);
v8 = (int (__fastcall ***)(_DWORD, _DWORD))result;
if ( (int)result >= 0 )
{
LocalLevelList = GameLevelManager::getLocalLevelList((GameLevelManager *)a1, v6);
v13 = LocalLevelList;
if ( LocalLevelList )
{
LocalLevelList->m_listID = (int)v8;
LocalLevelList->m_uploaded = 1;
}
result = *(int (__fastcall ****)(_DWORD, GJLevelList *))(a1 + 512);
if ( result )
return (int (__fastcall ***)(_DWORD, GJLevelList *))(**result)(result, v13);
}
else
{
v9 = *(_DWORD *)(a1 + 512);
if ( v9 )
{
v10 = *(int (__fastcall **)(int, GJLevelList *, int (__fastcall ***)(_DWORD, _DWORD)))(*(_DWORD *)v9 + 4);
v11 = GameLevelManager::getLocalLevelList((GameLevelManager *)a1, v6);
return (int (__fastcall ***)(_DWORD, GJLevelList *))v10(v9, v11, v8);
}
}
return result;
}