//
// AudioAssetsBrowser::trySetupAudioBrowser from 0x1001d2208 to 0x1001d2290 (136 bytes)
//
// 2 xrefs:
// > AudioAssetsBrowser::musicActionFinished @ 0x1001d2290
// > sub_1001D2294 @ 0x1001d2298
//
// 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 __fastcall AudioAssetsBrowser::trySetupAudioBrowser(AudioAssetsBrowser *a1)
{
cocos2d::CCDictionary *m_sfxObjects; // x21
MusicDownloadManager *v3; // x0
std::size_t size; // x20
MusicDownloadManager *v5; // x0
MusicDownloadManager *v6; // x0
m_sfxObjects = MusicDownloadManager::sharedState()->m_sfxObjects;
v3 = MusicDownloadManager::sharedState();
size = (unsigned __int8)v3->m_customContentURL.m_data.m_short.shortStorage.__elems_[22];
if ( m_sfxObjects )
{
if ( (size & 0x80) != 0 )
{
if ( v3->m_customContentURL.m_data.m_long.size )
goto LABEL_4;
}
else if ( v3->m_customContentURL.m_data.m_short.shortStorage.__elems_[22] )
{
LABEL_4:
AudioAssetsBrowser::setupList(a1);
return;
}
v6 = MusicDownloadManager::sharedState();
MusicDownloadManager::getCustomContentURL(v6);
goto LABEL_4;
}
if ( (size & 0x80) != 0 )
size = v3->m_customContentURL.m_data.m_long.size;
v5 = MusicDownloadManager::sharedState();
if ( size )
MusicDownloadManager::downloadSFXLibrary(v5);
else
MusicDownloadManager::getCustomContentURL(v5);
}