//
// sub_1004D368C from 0x1004d368c to 0x1004d3784 (248 bytes)
//
// 3 xrefs:
// > sub_1004D3630 @ 0x1004d365c
// > EditorSoundConfigInfoLayer::musicActionFinished @ 0x1004d37ec
// > sub_1004D37F4 @ 0x1004d3814
//
// This function is hookable on this platform (idp: arm, 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:06:30 +0000
//
void __fastcall sub_1004D368C(__int64 a1)
{
__int64 v2; // x8
unsigned __int64 v3; // x20
__int64 v4; // x0
void *v5; // x0
char *CString; // x0
_QWORD *v7; // x0
void *__p[2]; // [xsp+8h] [xbp-58h] BYREF
char v9; // [xsp+1Fh] [xbp-41h]
void *v10[2]; // [xsp+20h] [xbp-40h] BYREF
char v11; // [xsp+37h] [xbp-29h]
char *v12; // [xsp+38h] [xbp-28h] BYREF
int *v13; // [xsp+40h] [xbp-20h]
sub_1004D3494(a1, (int **)&v12);
v2 = (char *)v13 - v12;
if ( v13 != (int *)v12 )
{
v3 = 0;
do
{
v4 = MusicDownloadManager::sharedState();
MusicDownloadManager::downloadSFX(v4, *(unsigned int *)&v12[4 * v3++]);
v2 = (char *)v13 - v12;
}
while ( v3 < ((char *)v13 - v12) >> 2 );
}
v5 = sub_1003065B0("Downloading %i SFX", v2 >> 2);
CString = (char *)cocos2d::CCString::getCString((__int64)v5);
sub_100009900(v10, CString);
sub_100009900(__p, "");
v7 = TextAlertPopup::create((__int64)v10, 150, (__int64)__p, 0.5, 0.6);
(*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v7, 100);
if ( v9 < 0 )
operator delete(__p[0]);
if ( v11 < 0 )
operator delete(v10[0]);
if ( v12 )
{
v13 = (int *)v12;
operator delete(v12);
}
}