//
// GameLevelManager::getAllUsedSongIDs from 0x3c4e7c to 0x3c4f32 (182 bytes)
//
// 1 xrefs:
// > MusicDownloadManager::clearUnusedSongs @ 0x459b56
//
// 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 *GameLevelManager::getAllUsedSongIDs(GameLevelManager *a1)
{
cocos2d::CCDictionary *v2; // r0
cocos2d::CCDictionary *m_onlineLevels; // r3
cocos2d::CCDictionary *v4; // r5
unsigned int v5; // r4
cocos2d::CCArray *m_localLevels; // r7
cocos2d::CCDictElement *m_pElements; // r3
cocos2d::CCDictElement *next; // r4
cocos2d::CCObject *m_pObject; // r6
cocos2d::CCDictElement *v10; // r2
intptr_t m_uOrderOfArrival; // r1
int v12; // r0
int v13; // r6
intptr_t v14; // r1
cocos2d::CCNode *v15; // r0
cocos2d::CCNode *v16; // r0
v2 = cocos2d::CCDictionary::create();
m_onlineLevels = a1->m_onlineLevels;
v4 = v2;
if ( m_onlineLevels )
{
m_pElements = m_onlineLevels->m_pElements;
if ( m_pElements )
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
else
next = nullptr;
while ( m_pElements )
{
m_pObject = m_pElements->m_pObject;
if ( !BYTE1(m_pObject[13].m_unknown5) )
{
m_uOrderOfArrival = m_pObject[6].m_uOrderOfArrival;
if ( m_uOrderOfArrival > 0 && !cocos2d::CCDictionary::objectForKey(v4, m_uOrderOfArrival) )
{
v15 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(v4, v15, m_pObject[6].m_uOrderOfArrival);
}
}
if ( next )
v10 = (cocos2d::CCDictElement *)next->hh.next;
else
v10 = nullptr;
m_pElements = next;
next = v10;
}
}
v5 = 0;
m_localLevels = LocalLevelManager::sharedState()->m_localLevels;
while ( v5 < cocos2d::CCArray::count(m_localLevels) )
{
v12 = cocos2d::CCArray::objectAtIndex(m_localLevels, v5);
v13 = v12;
if ( !*(_BYTE *)(v12 + 725) )
{
v14 = *(_DWORD *)(v12 + 356);
if ( v14 > 0 && !cocos2d::CCDictionary::objectForKey(v4, v14) )
{
v16 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(v4, v16, *(_DWORD *)(v13 + 356));
}
}
++v5;
}
return v4;
}