//
// MusicDownloadManager::getAllMusicObjects from 0x1005944a0 to 0x100594555 (181 bytes)
//
// 0 xrefs:
//
// 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::CCArray *__fastcall MusicDownloadManager::getAllMusicObjects(MusicDownloadManager *a1, GJSongType a2)
{
unsigned int v3; // eax
cocos2d::CCArray *v4; // rbx
cocos2d::CCDictionary *m_musicObjects; // rax
cocos2d::CCDictElement *m_pElements; // r12
cocos2d::CCDictElement *next; // r15
cocos2d::CCObject *m_pObject; // rsi
cocos2d::CCObject *v9; // rsi
v3 = cocos2d::CCDictionary::count(a1->m_musicObjects);
v4 = (cocos2d::CCArray *)sub_10071FD00(v3);
m_musicObjects = a1->m_musicObjects;
if ( m_musicObjects )
{
m_pElements = m_musicObjects->m_pElements;
if ( m_pElements )
{
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
if ( a2 == Music )
{
sub_10071FCD0(v4, m_pElements->m_pObject);
while ( next )
{
m_pObject = next->m_pObject;
next = (cocos2d::CCDictElement *)next->hh.next;
sub_10071FCD0(v4, m_pObject);
}
}
else
{
while ( 1 )
{
v9 = m_pElements->m_pObject;
m_pElements = next;
if ( v9[8].m_uAutoReleaseCount == a2 )
sub_10071FCD0(v4, v9);
if ( !next )
break;
next = (cocos2d::CCDictElement *)next->hh.next;
}
}
}
}
return v4;
}