//
// MusicDownloadManager::removeDLFromActive from 0x14033f090 to 0x14033f13b (171 bytes)
//
// 6 xrefs:
// > CustomSFXWidget::onCancelDownload @ 0x1400c19f8
// > CustomSongWidget::onCancelDownload @ 0x1400caaf8
// > MusicDownloadManager::onGetSongInfoCompleted @ 0x14033d915
// > MusicDownloadManager::onDownloadSongCompleted @ 0x14033ed7a
// > MusicDownloadManager::onDownloadSFXCompleted @ 0x1403424f4
// > ??> @ 0x1406d56b4
//
// 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::removeDLFromActive(MusicDownloadManager *a1, const char *a2)
{
size_t v3; // r8
void *v4; // rcx
void *Block[2]; // [rsp+20h] [rbp-38h] BYREF
__int128 v6; // [rsp+30h] [rbp-28h]
*(_OWORD *)Block = 0;
v6 = 0;
v3 = -1;
do
++v3;
while ( a2[v3] );
sub_14003A930(Block, a2, v3);
cocos2d::CCDictionary::removeObjectForKey(a1->m_activeDownloads, Block);
if ( *((_QWORD *)&v6 + 1) > 0xFu )
{
v4 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v6 + 1) + 1LL) >= 0x1000 )
{
v4 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v4 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v4);
}
}