//
// sub_1004CBA00 from 0x1004cba00 to 0x1004cbabc (188 bytes)
//
// 1 xrefs:
// > sub_1004D8EEC @ 0x1004d8f54
//
// 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:25 +0000
//
void __fastcall sub_1004CBA00(__int64 a1)
{
unsigned int *v1; // x19
unsigned int *v2; // x21
__int64 v3; // x20
std::string::size_type size; // x8
__int64 v5; // x0
__int64 v6; // x0
std::string __p; // [xsp+0h] [xbp-50h] BYREF
unsigned int *v8; // [xsp+18h] [xbp-38h] BYREF
unsigned int *v9; // [xsp+20h] [xbp-30h]
sub_1004CB92C(a1, &v8);
v1 = v8;
v2 = v9;
if ( v8 != v9 )
{
do
{
v3 = *v1;
MusicDownloadManager::sharedState();
MusicDownloadManager::pathForSFX(v3, &__p);
size = HIBYTE(__p.__r_.__value_.__r.__words[2]);
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = __p.__r_.__value_.__l.__size_;
if ( !size
|| (v5 = cocos2d::CCFileUtils::sharedFileUtils(),
((*(__int64 (__fastcall **)(__int64, std::string *))(*(_QWORD *)v5 + 160LL))(v5, &__p) & 1) == 0) )
{
v6 = MusicDownloadManager::sharedState();
MusicDownloadManager::downloadSFX(v6, v3);
}
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
++v1;
}
while ( v1 != v2 );
v1 = v8;
}
if ( v1 )
{
v9 = v1;
operator delete(v1);
}
}