//
// MusicDownloadManager::removeMusicDownloadDelegate from 0x1404827e0 to 0x140482866 (134 bytes)
//
// 14 xrefs:
// > sub_140098E20 @ 0x140098f0a
// > AudioAssetsPopup::dAudioAssetsPopup @ 0x1400bde08
// > AudioAssetsPopup::onClose @ 0x1400be54f
// > CustomSFXWidget::dCustomSFXWidget @ 0x14015feba
// > CustomSongWidget::dCustomSongWidget @ 0x140168fda
// > EditorSoundConfigInfoLayer::dEditorSoundConfigInfoLayer @ 0x140192065
// > EditorSoundConfigInfoLayer::onClose @ 0x140198b04
// > EditorUI::dEditorUI @ 0x1401a94bf
// > MenuLayer::dMenuLayer @ 0x140471e8e
// > MusicBrowser::dMusicBrowser @ 0x140479ff4
// > NewsPopup::dNewsPopup @ 0x14049dae5
// > SetupSongTriggerPopup::dSetupSongTriggerPopup @ 0x1405f2446
// > SFXBrowser::dSFXBrowser @ 0x140616602
// > ??> @ 0x1409289d0
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:32:45 +0000
//
void __fastcall MusicDownloadManager::removeMusicDownloadDelegate(__int64 a1, __int64 a2)
{
unsigned int v4; // ebx
struct cocos2d::CCObject *v5; // rax
cocos2d::CCArray *v6; // rcx
v4 = 0;
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 336)) )
{
while ( 1 )
{
v5 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 336), v4);
v6 = *(cocos2d::CCArray **)(a1 + 336);
if ( *((_QWORD *)v5 + 40) == a2 )
break;
if ( ++v4 >= cocos2d::CCArray::count(v6) )
return;
}
cocos2d::CCArray::removeObjectAtIndex(v6, v4, 1);
}
}