//
// MusicDownloadManager::getAllMusicObjects from 0x10065e2b0 to 0x10065e365 (181 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:34:55 +0000
//
__int64 __fastcall MusicDownloadManager::getAllMusicObjects(__int64 a1, int a2)
{
unsigned int v3; // eax
__int64 v4; // rbx
__int64 v5; // rax
__int64 v6; // r12
__int64 v7; // r15
__int64 v8; // rsi
__int64 v9; // rsi
v3 = cocos2d::CCDictionary::count(*(_QWORD *)(a1 + 440));
v4 = sub_1007FEC20(v3);
v5 = *(_QWORD *)(a1 + 440);
if ( v5 )
{
v6 = *(_QWORD *)(v5 + 56);
if ( v6 )
{
v7 = *(_QWORD *)(v6 + 288);
if ( a2 == -1 )
{
sub_1007FEBF0(v4, *(_QWORD *)(v6 + 264));
while ( v7 )
{
v8 = *(_QWORD *)(v7 + 264);
v7 = *(_QWORD *)(v7 + 288);
sub_1007FEBF0(v4, v8);
}
}
else
{
while ( 1 )
{
v9 = *(_QWORD *)(v6 + 264);
v6 = v7;
if ( *(_DWORD *)(v9 + 400) == a2 )
sub_1007FEBF0(v4, v9);
if ( !v7 )
break;
v7 = *(_QWORD *)(v7 + 288);
}
}
}
}
return v4;
}