//
// MusicDownloadManager::onTryUpdateSFXLibraryCompleted from 0x1403428a0 to 0x1403429d4 (308 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::tryUpdateSFXLibrary @ 0x1403427ba
// > ??> @ 0x1406d57f8
//
// 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
//
// Hidden C++ exception states: #wind=2
void MusicDownloadManager::onTryUpdateSFXLibraryCompleted(
MusicDownloadManager *a1,
cocos2d::extension::CCHttpClient *a2,
cocos2d::extension::CCHttpResponse *a3)
{
void *v5; // rcx
const char *v6; // rcx
void *Block[2]; // [rsp+20h] [rbp-58h] BYREF
__int64 v8; // [rsp+30h] [rbp-48h]
unsigned __int64 v9; // [rsp+38h] [rbp-40h]
char *String[4]; // [rsp+40h] [rbp-38h] BYREF
Block[1] = nullptr;
v8 = 7;
v9 = 15;
Block[0] = (void *)0x6C5F7866735F76LL;
cocos2d::CCDictionary::removeObjectForKey(a1->m_activeDownloads, Block);
if ( v9 > 0xF )
{
v5 = Block[0];
if ( v9 + 1 >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v5);
}
if ( a3 && a3->_succeed )
{
GameToolbox::getResponse((__int64)String, (__int64)a3);
v6 = (const char *)String;
if ( String[3] > (char *)0xF )
v6 = String[0];
if ( atoi(v6) <= a1->m_sfxLibraryVersion )
MusicDownloadManager::musicActionFailed(a1, UpdateSFXLibrary);
else
MusicDownloadManager::downloadSFXLibrary(a1);
sub_14003A830((__int64)String);
}
else
{
MusicDownloadManager::musicActionFailed(a1, (GJMusicAction)3);
}
}