//
// GameLevelManager::createAndGetLevels from 0x844d44 to 0x844f44 (512 bytes)
//
// 2 xrefs:
// > GameLevelManager::onGetOnlineLevelsCompleted @ 0x8483e0
// > ??> @ 0x105118
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:55:20 +0000
//
cocos2d::CCArray *__fastcall GameLevelManager::createAndGetLevels(__int64 a1, char *a2)
{
cocos2d::CCArray *v3; // x23
char *v4; // x19
char v5; // t1
size_t v6; // x0
cocos2d::CCArray *v7; // x22
unsigned int i; // w21
cocos2d::CCString *v9; // x0
const char *CString; // x0
size_t v11; // x0
GJGameLevel *v12; // x0
cocos2d::CCObject *v13; // x1
char *v16; // [xsp+48h] [xbp+48h]
cocos2d::CCObject *v17; // [xsp+48h] [xbp+48h]
__int64 v18; // [xsp+58h] [xbp+58h] BYREF
size_t v19; // [xsp+60h] [xbp+60h]
void *v20; // [xsp+68h] [xbp+68h]
__int64 v21; // [xsp+70h] [xbp+70h] BYREF
size_t v22; // [xsp+78h] [xbp+78h]
void *v23; // [xsp+80h] [xbp+80h]
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(_stack_chk_guard);
v5 = *a2;
v4 = a2 + 1;
if ( (v5 & 1) != 0 )
v4 = *((char **)a2 + 2);
v21 = 0;
v22 = 0;
v23 = nullptr;
v6 = strlen(v4);
std::string::__init(&v21, v4, v6);
v7 = sub_80CFCC((unsigned __int8 *)&v21, "|");
if ( (v21 & 1) != 0 )
operator delete(v23);
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v7); ++i )
{
v9 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v7, i);
CString = (const char *)cocos2d::CCString::getCString(v9);
v18 = 0;
v19 = 0;
v20 = nullptr;
v16 = (char *)CString;
v11 = strlen(CString);
std::string::__init(&v18, v16, v11);
v21 = 0;
v22 = 0;
v23 = nullptr;
if ( (v18 & 1) != 0 )
{
std::string::__init(&v21, v20, v19);
}
else
{
v23 = v20;
v21 = v18;
v22 = v19;
}
v12 = (GJGameLevel *)GameLevelManager::responseToDict((__int64)&v21, 0);
v13 = (cocos2d::CCObject *)GJGameLevel::create(v12, (cocos2d::CCDictionary *)((char *)&dword_0 + 1));
if ( (v21 & 1) != 0 )
{
v17 = v13;
operator delete(v23);
v13 = v17;
}
if ( v13 )
cocos2d::CCArray::addObject(v3, v13);
if ( (v18 & 1) != 0 )
operator delete(v20);
}
return v3;
}