//
// GameLevelManager::onUploadLevelControlsCompleted from 0x4c67a4 to 0x4c68ce (298 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4daa6a
//
// 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:31 +0000
//
int __fastcall GameLevelManager::onUploadLevelControlsCompleted(int a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
cocos2d::CCString *v6; // r0
const char *CString; // r9
size_t v8; // r0
const char *v9; // r0
const char *v10; // r4
_BOOL4 v11; // r8
int v12; // r0
void (*v13)(void); // r3
int v14; // r3
void (***v15)(void); // r0
int v17; // [sp+0h] [bp-28h] BYREF
int v18; // [sp+4h] [bp-24h]
int v19; // [sp+8h] [bp-20h]
int v20; // [sp+Ch] [bp-1Ch] BYREF
int v21; // [sp+10h] [bp-18h]
int v22; // [sp+14h] [bp-14h]
int v23[3]; // [sp+18h] [bp-10h] BYREF
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(*(_DWORD *)(a1 + 748), a3);
if ( v6 )
CString = (const char *)cocos2d::CCString::getCString(v6);
else
CString = (const char *)&unk_B6B226;
v17 = 0;
v18 = 0;
v19 = 0;
v8 = strlen(CString);
std::string::__init(&v17, CString, v8);
cocos2d::CCDictionary::removeObjectForKey(*(cocos2d::CCDictionary **)(a1 + 748));
v20 = 0;
v21 = 0;
v22 = 0;
sub_4C62E0(a3, "_", &v20);
if ( (unsigned int)(-1431655765 * ((v21 - v20) >> 2)) <= 1 )
{
v10 = nullptr;
}
else
{
if ( (byte_9[v20 + 3] & 1) != 0 )
v9 = *(const char **)((char *)&dword_14 + v20);
else
v9 = (const char *)(v20 + 13);
v10 = (const char *)atoi(v9);
}
memset(v23, 0, sizeof(v23));
std::string::__init(v23, "-1", 2u);
v11 = sub_4A9CC4(a2, (unsigned __int8 *)v23);
std::string::~string((int)v23);
if ( v11 )
{
v12 = *(_DWORD *)(a1 + 888);
if ( v12 )
{
v13 = *(void (**)(void))(*(_DWORD *)v12 + 4);
LABEL_20:
v13();
}
}
else
{
if ( (v17 & 1) != 0 )
v14 = v18;
else
v14 = (int)(unsigned __int8)v17 >> 1;
if ( v14 )
GameLevelManager::setLevelControlsTemplate((GameLevelManager *)a1, v10, (unsigned __int8 *)&v17, -1);
v15 = *(void (****)(void))(a1 + 888);
if ( v15 )
{
v13 = **v15;
goto LABEL_20;
}
}
std::__vector_base::~__vector_base((int)&v20);
return std::string::~string((int)&v17);
}