//
// MusicDownloadManager::downloadSFXLibrary from 0x45a21c to 0x45a310 (244 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::onTryUpdateSFXLibraryCompleted @ 0x45a362
// > SFXBrowser::trySetupSFXBrowser @ 0x5836c2
// > AudioAssetsBrowser::trySetupAudioBrowser @ 0x59b7f0
//
// 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::downloadSFXLibrary(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_sfx_l") )
{
a1->m_requestedSfxLibraryDownloaded = 1;
sub_776584((int)v3, "/sfx/sfxlibrary.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::onDownloadSFXLibraryCompleted;
Request = (cocos2d::CCObject *)MusicDownloadManager::ProcessHttpGetRequest(
a1,
&v6,
v7,
(int)MusicDownloadManager::onDownloadSFXLibraryCompleted,
0,
0,
0);
sub_774008(v7);
sub_774008(&v6);
MusicDownloadManager::addDLToActive(a1, "dl_sfx_l", Request);
sub_774008(v4);
sub_774008(v3);
}
}
}