//
// GameLevelManager::getLocalLevel from 0x140144800 to 0x140144864 (100 bytes)
//
// 3 xrefs:
// > GameLevelManager::onUploadLevelCompleted @ 0x14014d3e9
// > GameLevelManager::onUploadLevelCompleted @ 0x14014d415
// > ??> @ 0x1406ca530
//
// 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
//
GJGameLevel *GameLevelManager::getLocalLevel(GameLevelManager *a1, int a2)
{
unsigned int v3; // ebx
cocos2d::CCArray *m_localLevels; // rdi
GJGameLevel *result; // rax
v3 = 0;
m_localLevels = LocalLevelManager::sharedState()->m_localLevels;
if ( !cocos2d::CCArray::count(m_localLevels) )
return nullptr;
while ( 1 )
{
result = (GJGameLevel *)cocos2d::CCArray::objectAtIndex(m_localLevels, v3);
if ( result->m_M_ID == a2 )
break;
if ( ++v3 >= cocos2d::CCArray::count(m_localLevels) )
return nullptr;
}
return result;
}