//
// GameLevelManager::onGetContentStatusCompleted from 0x4c1d40 to 0x4c1e76 (310 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4dafaa
//
// 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:24 +0000
//
int (__fastcall ***__fastcall GameLevelManager::onGetContentStatusCompleted(
int a1,
unsigned __int8 *a2,
int a3,
int a4))(_DWORD)
{
const char *v6; // r1
_BOOL4 v7; // r8
int (__fastcall ***result)(_DWORD); // r0
cocos2d::CCArray *v9; // r5
cocos2d::CCString *v10; // r0
cocos2d::CCString *v11; // r0
cocos2d::CCString *v12; // r0
cocos2d::CCString *v13; // r0
cocos2d::CCString *v14; // r0
int v15; // [sp+0h] [bp-10h] BYREF
unsigned __int8 *v16; // [sp+4h] [bp-Ch]
int v17; // [sp+8h] [bp-8h]
int v18; // [sp+Ch] [bp-4h]
v15 = a1;
v16 = a2;
v17 = a3;
v18 = a4;
if ( (*(_BYTE *)a3 & 1) != 0 )
v6 = *(const char **)(a3 + 8);
else
v6 = (const char *)(a3 + 1);
GameLevelManager::removeDLFromActive((GameLevelManager *)a1, v6);
*(_BYTE *)(a1 + 648) = 1;
v15 = 0;
v16 = nullptr;
v17 = 0;
std::string::__init(&v15, "-1", 2u);
v7 = sub_4A9CC4(a2, (unsigned __int8 *)&v15);
result = (int (__fastcall ***)(_DWORD))std::string::~string((int)&v15);
if ( !v7 )
{
v9 = sub_4C1A88(a2, ",");
if ( cocos2d::CCArray::count(v9) )
{
v10 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v9, 0);
*(_DWORD *)(a1 + 628) = cocos2d::CCString::intValue(v10);
}
if ( cocos2d::CCArray::count(v9) > 1u )
{
v11 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v9, 1u);
*(_DWORD *)(a1 + 632) = cocos2d::CCString::intValue(v11);
}
if ( cocos2d::CCArray::count(v9) > 2u )
{
v12 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v9, 2u);
*(_DWORD *)(a1 + 636) = cocos2d::CCString::intValue(v12);
}
if ( cocos2d::CCArray::count(v9) > 3u )
{
v13 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v9, 3u);
*(_DWORD *)(a1 + 640) = cocos2d::CCString::intValue(v13);
}
if ( cocos2d::CCArray::count(v9) > 4u )
{
v14 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v9, 4u);
*(_DWORD *)(a1 + 644) = cocos2d::CCString::intValue(v14);
}
if ( !*(_BYTE *)(a1 + 668) && cocos2d::CCArray::count(v9) > 3u )
{
*(_DWORD *)(a1 + 652) = *(_DWORD *)(a1 + 628);
*(_DWORD *)(a1 + 656) = *(_DWORD *)(a1 + 632);
*(_DWORD *)(a1 + 660) = *(_DWORD *)(a1 + 636);
*(_DWORD *)(a1 + 664) = *(_DWORD *)(a1 + 640);
*(_BYTE *)(a1 + 668) = 1;
}
result = *(int (__fastcall ****)(_DWORD))(a1 + 928);
if ( result )
return (int (__fastcall ***)(_DWORD))(**result)(result);
}
return result;
}