//
// LocalLevelManager::tryLoadMainLevelString from 0x43359c to 0x433664 (200 bytes)
//
// 1 xrefs:
// > LocalLevelManager::getMainLevelString @ 0x433686
//
// 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
//
void LocalLevelManager::tryLoadMainLevelString(LocalLevelManager *a1, int a2)
{
std::unordered_map *p_m_mainLevels; // r8
cocos2d::CCFileUtils *v3; // r10
cocos2d::CCString *v4; // r0
char *CString; // r0
cocos2d::CCString *v6; // r0
char *v7; // r0
_DWORD *v8; // r0
char *v9; // [sp+4h] [bp-1Ch] BYREF
int v10; // [sp+10h] [bp-10h] BYREF
cocos2d::CCString *v11; // [sp+14h] [bp-Ch] BYREF
int v12; // [sp+18h] [bp-8h] BYREF
p_m_mainLevels = &a1->m_mainLevels;
v9 = (char *)a2;
if ( !sub_4329A4(&a1->m_mainLevels._M_h._M_buckets, a2) )
{
v3 = cocos2d::CCFileUtils::sharedFileUtils();
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"levels/%i.txt", v9);
CString = (char *)cocos2d::CCString::getCString(v4);
sub_776584((int)&v10, CString);
((void (__fastcall *)(cocos2d::CCString **, cocos2d::CCFileUtils *, int, _DWORD))v3->createCCArrayWithContentsOfFile)(
&v11,
v3,
v10,
0);
v6 = cocos2d::CCString::createWithContentsOfFile((const char *)v11);
if ( v6 )
{
v7 = (char *)cocos2d::CCString::getCString(v6);
sub_776584((int)&v12, v7);
if ( *(_DWORD *)(v12 - 12) )
{
v8 = std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[](
p_m_mainLevels,
(unsigned int *)&v9);
sub_775D40(v8, &v12);
}
sub_774008(&v12);
}
sub_774008(&v11);
sub_774008(&v10);
}
}