//
// LocalLevelManager::getLevelsInNameGroups from 0x910e88 to 0x911020 (408 bytes)
//
// 2 xrefs:
// > LocalLevelManager::dataLoaded @ 0x914908
// > ??> @ 0x6dde0
//
// 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:57:16 +0000
//
__int64 __fastcall LocalLevelManager::getLevelsInNameGroups(cocos2d::CCArray **this)
{
unsigned int v2; // w21
__int64 v3; // x25
__int64 v4; // x0
cocos2d::CCObject *v5; // x20
__int64 v6; // x23
__int64 v7; // x1
cocos2d::CCObject *v8; // x22
cocos2d::CCArray *v9; // x0
__int64 v11; // x0
__int64 v12; // x1
__int64 v13; // [xsp+50h] [xbp+50h] BYREF
__int64 v14; // [xsp+58h] [xbp+58h]
void *v15; // [xsp+60h] [xbp+60h]
v2 = 0;
v3 = cocos2d::CCDictionary::create(_stack_chk_guard);
while ( v2 < (unsigned int)cocos2d::CCArray::count(*(this + 45)) )
{
v4 = cocos2d::CCArray::objectAtIndex(*(this + 45), v2);
v13 = 0;
v14 = 0;
v5 = (cocos2d::CCObject *)v4;
v15 = nullptr;
v6 = v4 + 344;
if ( (*(_BYTE *)(v4 + 344) & 1) != 0 )
{
std::string::__init(&v13, *(void **)(v4 + 360), *(_QWORD *)(v4 + 352));
}
else
{
v7 = *(_QWORD *)(v4 + 352);
v13 = *(_QWORD *)v6;
v14 = v7;
v15 = *(void **)(v4 + 360);
}
v8 = (cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey(v3, &v13);
v9 = (cocos2d::CCArray *)(unsigned __int8)v13;
if ( (v13 & 1) != 0 )
{
operator delete(v15);
if ( !v8 )
{
LABEL_9:
v11 = cocos2d::CCArray::create(v9);
v13 = 0;
v14 = 0;
v8 = (cocos2d::CCObject *)v11;
v15 = nullptr;
if ( (*((_BYTE *)v5 + 344) & 1) != 0 )
{
std::string::__init(&v13, *(void **)(v6 + 16), *(_QWORD *)(v6 + 8));
}
else
{
v12 = *(_QWORD *)(v6 + 8);
v13 = *(_QWORD *)v6;
v14 = v12;
v15 = *(void **)(v6 + 16);
}
cocos2d::CCDictionary::setObject(v3, v8);
if ( (v13 & 1) != 0 )
operator delete(v15);
}
}
else if ( !v8 )
{
goto LABEL_9;
}
++v2;
cocos2d::CCArray::addObject(v8, v5);
}
return v3;
}