//
// LocalLevelManager::getAllLevelsInDict from 0x1001c8a58 to 0x1001c8b5c (260 bytes)
//
// 2 xrefs:
// > GameLevelManager::createNewLevel @ 0x1000925d8
// > GameLevelManager::getNextLevelName @ 0x1000927e4
//
// 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
//
cocos2d::CCDictionary *__fastcall LocalLevelManager::getAllLevelsInDict(LocalLevelManager *a1)
{
cocos2d::CCDictionary *v2; // x20
__int64 v3; // x21
__int64 v4; // x0
__int64 v5; // x22
char *v6; // x1
unsigned __int64 v7; // x9
unsigned __int8 v8; // w8
void *__p[2]; // [xsp+0h] [xbp-60h] BYREF
__int64 v11; // [xsp+10h] [xbp-50h]
void *v12[2]; // [xsp+18h] [xbp-48h] BYREF
unsigned __int8 v13; // [xsp+2Fh] [xbp-31h]
v2 = cocos2d::CCDictionary::create();
if ( (unsigned int)sub_10024A36C(a1->m_localLevels) )
{
v3 = 0;
do
{
v4 = sub_10024A388(a1->m_localLevels, v3);
v5 = v4;
if ( *(char *)(v4 + 367) < 0 )
{
sub_1000097D0(__p, *(void **)(v4 + 344), *(_QWORD *)(v4 + 352));
}
else
{
*(_OWORD *)__p = *(_OWORD *)(v4 + 344);
v11 = *(_QWORD *)(v4 + 360);
}
if ( v11 >= 0 )
v6 = (char *)__p;
else
v6 = (char *)__p[0];
sub_100009900(v12, v6);
if ( SHIBYTE(v11) < 0 )
operator delete(__p[0]);
v7 = v13;
v8 = v13;
if ( (v13 & 0x80u) != 0 )
v7 = (unsigned __int64)v12[1];
if ( v7 )
{
cocos2d::CCDictionary::setObject_1(v2, v5, v12);
v8 = v13;
}
if ( (v8 & 0x80) != 0 )
operator delete(v12[0]);
v3 = (unsigned int)(v3 + 1);
}
while ( (unsigned int)v3 < (unsigned int)sub_10024A36C(a1->m_localLevels) );
}
return v2;
}