//
// MusicDownloadManager::getAllMusicArtists from 0x10065e6e0 to 0x10065e7de (254 bytes)
//
// 2 xrefs:
// > sub_1006670A0 @ 0x1006670be
// > MusicSearchResult::updateObjects_1 @ 0x10066850c
//
// 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::getAllMusicArtists(__int64 a1, __int64 a2)
{
unsigned int v2; // eax
__int64 v3; // rbx
__int64 v4; // rax
__int64 v5; // r13
__int64 v6; // rax
int v7; // r12d
char *v8; // r12
std::string v10[2]; // [rsp+0h] [rbp-40h] BYREF
v2 = cocos2d::CCDictionary::count(*(_QWORD *)(a1 + 448));
v3 = sub_1007FEC20(v2);
v4 = *(_QWORD *)(a1 + 448);
if ( v4 )
{
v5 = *(_QWORD *)(v4 + 56);
while ( v5 )
{
v6 = *(_QWORD *)(v5 + 264);
v5 = *(_QWORD *)(v5 + 288);
v7 = *(_DWORD *)(v6 + 56);
if ( (*(_BYTE *)(v6 + 64) & 1) != 0 )
sub_10001AD30(v10, *(const void **)(v6 + 80), *(_QWORD *)(v6 + 72));
else
v10[0] = *(std::string *)(v6 + 64);
v8 = OptionsObject::create(v7, 0, v10, a2);
if ( (*(_BYTE *)&v10[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(v10[0].__r_.__value_.__l.__data_);
sub_1007FEBF0(v3, v8);
}
}
if ( (unsigned int)sub_1007FEF90(v3) >= 2 )
qsort(
*(void **)(*(_QWORD *)(v3 + 56) + 16LL),
**(unsigned int **)(v3 + 56),
8u,
(int (__cdecl *)(const void *, const void *))sub_1006499E0);
return v3;
}