//
// MusicDownloadManager::getAllMusicObjects from 0x56be8e to 0x56beea (92 bytes)
//
// 1 xrefs:
// > MusicDownloadManager::getAllMusicObjectsSorted @ 0x574ea8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:52:33 +0000
//
cocos2d::CCArray *__fastcall MusicDownloadManager::getAllMusicObjects(int a1, int a2)
{
cocos2d::CCArray *v4; // r0
unsigned int v5; // r1
cocos2d::CCArray *v6; // r0
int v7; // r3
cocos2d::CCArray *v8; // r5
int v9; // r3
int v10; // r4
int v11; // r2
v4 = (cocos2d::CCArray *)cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(a1 + 332));
v6 = (cocos2d::CCArray *)cocos2d::CCArray::createWithCapacity(v4, v5);
v7 = *(_DWORD *)(a1 + 332);
v8 = v6;
if ( v7 )
{
v9 = *(_DWORD *)(v7 + 52);
if ( v9 )
v10 = *(_DWORD *)(v9 + 272);
else
v10 = 0;
while ( v9 )
{
if ( a2 == -1 || *(_DWORD *)(*(_DWORD *)(v9 + 260) + 312) == a2 )
cocos2d::CCArray::addObject(v8, *(cocos2d::CCObject **)(v9 + 260));
if ( v10 )
v11 = *(_DWORD *)(v10 + 272);
else
v11 = 0;
v9 = v10;
v10 = v11;
}
}
return v8;
}