//
// LocalLevelManager::getAllLevelsInDict from 0x1403303a0 to 0x1403304f5 (341 bytes)
//
// 3 xrefs:
// > GameLevelManager::createNewLevel @ 0x140144990
// > GameLevelManager::getNextLevelName @ 0x140144bd4
// > ??> @ 0x1406d500c
//
// 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
//
// Hidden C++ exception states: #wind=3
cocos2d::CCDictionary *LocalLevelManager::getAllLevelsInDict(LocalLevelManager *a1)
{
cocos2d::CCDictionary *v2; // rbp
unsigned int i; // ebx
struct cocos2d::CCObject *v4; // rdi
_QWORD *v5; // rdx
size_t v6; // r8
void *v7; // rcx
__int128 v9; // [rsp+28h] [rbp-60h] BYREF
__int64 v10; // [rsp+38h] [rbp-50h]
unsigned __int64 v11; // [rsp+40h] [rbp-48h]
_QWORD v12[4]; // [rsp+48h] [rbp-40h] BYREF
v2 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(a1);
for ( i = 0; i < cocos2d::CCArray::count(a1->m_localLevels); ++i )
{
v4 = cocos2d::CCArray::objectAtIndex(a1->m_localLevels, i);
sub_14003BDB0((__int64)v12, (__int64)&v4[6].m_uID);
v5 = v12;
if ( v12[3] > 0xFu )
v5 = (_QWORD *)v12[0];
v9 = 0;
v10 = 0;
v11 = 0;
v6 = -1;
do
++v6;
while ( *((_BYTE *)v5 + v6) );
sub_14003A930(&v9, v5, v6);
sub_14003A830((__int64)v12);
if ( v10 )
cocos2d::CCDictionary::setObject(v2, v4, &v9);
if ( v11 > 0xF )
{
v7 = (void *)v9;
if ( v11 + 1 >= 0x1000 )
{
v7 = *(void **)(v9 - 8);
if ( (unsigned __int64)(v9 - (_QWORD)v7 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v7);
}
}
return v2;
}