//
// MusicDownloadManager::pathForSFXFolder from 0x1001d5938 to 0x1001d5a34 (252 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::pathForSFX @ 0x1001d5888
// > sub_1001DEF68 @ 0x1001defac
// > sub_1001DF084 @ 0x1001df0b0
//
// 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:00:25 +0000
//
double __usercall MusicDownloadManager::pathForSFXFolder@(__int64 a1@, int a2@, __int64 a3@)
{
double result; // d0
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x0
__int128 v11; // [xsp+8h] [xbp-38h] BYREF
__int64 v12; // [xsp+18h] [xbp-28h]
sub_100009900((_QWORD *)a3, "");
LODWORD(v11) = a2;
if ( sub_100019268((_QWORD *)(a1 + 528), (int *)&v11) )
{
std::string::append((std::string *)a3, "sfx/");
}
else
{
v7 = GameManager::sharedState(0);
GameManager::getGameVariable(v7, "0033");
if ( (_DWORD)v8 )
{
v9 = cocos2d::CCFileUtils::sharedFileUtils(v8);
(*(void (__fastcall **)(__int128 *__return_ptr))(*(_QWORD *)v9 + 152LL))(&v11);
if ( *(char *)(a3 + 23) < 0 )
operator delete(*(void **)a3);
*(_OWORD *)a3 = v11;
*(_QWORD *)(a3 + 16) = v12;
std::string::append((std::string *)a3, "Resources\\");
}
else
{
v10 = cocos2d::CCFileUtils::sharedFileUtils(v8);
(*(void (__fastcall **)(__int128 *__return_ptr))(*(_QWORD *)v10 + 144LL))(&v11);
if ( *(char *)(a3 + 23) < 0 )
operator delete(*(void **)a3);
result = *(double *)&v11;
*(_OWORD *)a3 = v11;
*(_QWORD *)(a3 + 16) = v12;
}
}
return result;
}