//
// MusicDownloadManager::pathForSongFolder from 0x1001d565c to 0x1001d5758 (252 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::pathForSong @ 0x1001d4bdc
// > MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x1001dbb8c
// > MusicDownloadManager::parseMusicLibrary @ 0x1001dbcc0
//
// 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::pathForSongFolder@(__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 + 568), (int *)&v11) )
{
std::string::append((std::string *)a3, "songs/");
}
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;
}