//
// MusicDownloadManager::init from 0x10058af00 to 0x10058aff0 (240 bytes)
//
// 20 xrefs:
// > MusicDownloadManager::sharedState @ 0x10058a07a
// > MusicDownloadManager::downloadSong @ 0x10058eec5
// > MusicDownloadManager::getSFXFolderObjectForID @ 0x1005967cd
// > MusicDownloadManager::getSFXFolderObjectForID @ 0x1005968fd
// > SongInfoObject::create_1 @ 0x100596fb9
// > SongInfoObject::init @ 0x1005972bb
// > SongInfoObject::getArtistNames @ 0x10059832b
// > SongInfoObject::getTagsString @ 0x100598a73
// > MusicSearchResult::createTagFilterObjects @ 0x1005992f7
// > MusicSearchResult::createArtistFilterObjects @ 0x100599467
// > MusicSearchResult::applyTagFilters @ 0x10059964b
// > MusicSearchResult::applyArtistFilters @ 0x1005998ad
// > MusicSearchResult::updateFutureCount @ 0x100599aea
// > MusicSearchResult::updateFutureCount @ 0x100599c32
// > MusicSearchResult::updateFutureCount @ 0x100599d9d
// > MusicSearchResult::updateObjects_1 @ 0x100599f8b
// > SFXSearchResult::updateObjects @ 0x10059aa12
// > SFXSearchResult::updateObjects @ 0x10059abc3
// > SFXSearchResult::updateObjects @ 0x10059ad08
// > ??> @ 0x1009701a8
//
// 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
//
bool __fastcall MusicDownloadManager::init(MusicDownloadManager *a1)
{
__int64 v1; // rsi
bool result; // al
bool v4; // r15
cocos2d::CCDictionary *v5; // rax
cocos2d::CCDictionary *v6; // rdi
cocos2d::CCArray *v7; // rax
_OWORD __dst[65]; // [rsp+0h] [rbp-430h] BYREF
_QWORD v9[4]; // [rsp+410h] [rbp-20h] BYREF
result = cocos2d::CCNode::init(a1);
if ( result )
{
v4 = result;
v5 = cocos2d::CCDictionary::create();
a1->m_activeDownloads = v5;
v6 = v5;
cocos2d::CCObject::retain(v5);
v7 = (cocos2d::CCArray *)sub_10071F9E0(v6, v1);
a1->m_musicDownloadDelegates = v7;
cocos2d::CCObject::retain(v7);
memcpy(__dst, &unk_10081ED64, sizeof(__dst));
sub_10059C2F0(&a1->m_resourceSfxUnorderedSet, __dst, v9);
__dst[1] = xmmword_10081F184;
__dst[0] = xmmword_10081F174;
LODWORD(__dst[2]) = 10006555;
sub_10059C2F0(&a1->m_resourceSongUnorderedSet, __dst, (char *)&__dst[2] + 4);
return v4;
}
return result;
}