//
// GameLevelManager::onUpdateDescriptionCompleted from 0x3c2f74 to 0x3c303a (198 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x3d7278
//
// 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 GameLevelManager::onUpdateDescriptionCompleted(int a1, int a2, char **a3, int a4)
{
char *v4; // r6
cocos2d::CCDictionary *v6; // r10
cocos2d::CCArray *v8; // r6
cocos2d::CCString *v9; // r0
const char *CString; // r0
int v11; // r6
_BOOL4 v12; // r7
int result; // r0
_DWORD v14[2]; // [sp+8h] [bp+4h] BYREF
v14[0] = a3;
v14[1] = a4;
v4 = *a3;
v6 = *(cocos2d::CCDictionary **)(a1 + 448);
sub_776584((int)v14, *a3);
cocos2d::CCDictionary::removeObjectForKey(v6);
sub_774008(v14);
sub_776584((int)v14, v4);
v8 = sub_3BE530((cocos2d::CCArray *)v14, "_");
sub_774008(v14);
if ( cocos2d::CCArray::count(v8) <= 1u )
{
v11 = 0;
}
else
{
v9 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v8, 1u);
CString = cocos2d::CCString::getCString(v9);
v11 = atoi(CString);
}
sub_776584((int)v14, "-1");
v12 = sub_3BE0D8(a2, (int)v14);
sub_774008(v14);
result = *(_DWORD *)(a1 + 536);
if ( v12 )
{
if ( result )
return (*(int (__fastcall **)(int, int))(*(_DWORD *)result + 4))(result, v11);
}
else if ( result )
{
return (**(int (__fastcall ***)(int, int))result)(result, v11);
}
return result;
}