//
// MusicDownloadManager::downloadMusicLibrary from 0x459e58 to 0x459f4c (244 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::onTryUpdateMusicLibraryCompleted @ 0x459f9e
// > MusicBrowser::trySetupMusicBrowser @ 0x581cae
//
// 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
//
void MusicDownloadManager::downloadMusicLibrary(MusicDownloadManager *a1)
{
cocos2d::CCObject *Request; // r5
_BYTE v3[4]; // [sp+10h] [bp-20h] BYREF
_BYTE v4[4]; // [sp+14h] [bp-1Ch] BYREF
int v5; // [sp+18h] [bp-18h] BYREF
char *v6; // [sp+1Ch] [bp-14h] BYREF
char *v7[3]; // [sp+20h] [bp-10h] BYREF
if ( *((_DWORD *)a1->m_customContentURL.m_data.m_data - 3) )
{
if ( !MusicDownloadManager::isDLActive(a1, "dl_music_l") )
{
a1->m_downloadingMusicLibrary = 1;
sub_776584((int)v3, "/music/musiclibrary_02.dat");
sub_775C20(&v5);
MusicDownloadManager::generateCustomContentURL((int)v4, (int)a1, &v5);
sub_774008(&v5);
sub_775C20(&v6);
sub_776584((int)v7, (char *)&unk_939830);
v7[2] = nullptr;
v7[1] = (char *)MusicDownloadManager::onDownloadMusicLibraryCompleted;
Request = (cocos2d::CCObject *)MusicDownloadManager::ProcessHttpGetRequest(
a1,
&v6,
v7,
(int)MusicDownloadManager::onDownloadMusicLibraryCompleted,
0,
0,
0);
sub_774008(v7);
sub_774008(&v6);
MusicDownloadManager::addDLToActive(a1, "dl_music_l", Request);
sub_774008(v4);
sub_774008(v3);
}
}
}