//
// MusicDownloadManager::songStateChanged from 0x1404828f0 to 0x14048294a (90 bytes)
//
// 6 xrefs:
// > sub_14005C7A0 @ 0x14005c841
// > FindBPMLayer::onClose @ 0x1401353a7
// > CustomSongWidget::onSelect @ 0x14016bcc0
// > CustomSongWidget::onPlayback @ 0x14016c11a
// > SetupSongTriggerPopup::onPlayback @ 0x1405f3778
// > ??> @ 0x1409289e8
//
// 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
//
unsigned int __fastcall MusicDownloadManager::songStateChanged(__int64 a1)
{
unsigned int v2; // ebx
unsigned int result; // eax
struct cocos2d::CCObject *v4; // rax
v2 = 0;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 336));
if ( result )
{
do
{
v4 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 336), v2);
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)v4 + 40) + 40LL))(*((_QWORD *)v4 + 40));
++v2;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 336));
}
while ( v2 < result );
}
return result;
}