//
// MusicDownloadManager::pathForSongFolder from 0x96cc64 to 0x96cdd4 (368 bytes)
//
// 4 xrefs:
// > MusicDownloadManager::pathForSong @ 0x96ce00
// > MusicDownloadManager::parseMusicLibrary @ 0x976ab8
// > MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x978ccc
// > ??> @ 0xcd090
//
// 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 12:57:39 +0000
//
__int64 __usercall MusicDownloadManager::pathForSongFolder@(
MusicDownloadManager *this@,
int a2@,
__int64 a3@)
{
__int64 v4; // x2
_BOOL8 isResourceSong; // x0
GameManager *v7; // x0
cocos2d::CCFileUtils *GameVariable; // x0
__int64 v9; // x0
__int64 v10; // x4
__int64 v11; // x5
__int64 v12; // x0
__int64 v13; // x1
_QWORD v14[3]; // [xsp+38h] [xbp+38h] BYREF
_QWORD v15[4]; // [xsp+50h] [xbp+50h] BYREF
*(_QWORD *)(a3 + 8) = 0;
*(_QWORD *)(a3 + 16) = 0;
v4 = _stack_chk_guard;
*(_QWORD *)a3 = 0;
v15[3] = v4;
isResourceSong = MusicDownloadManager::isResourceSong(this, a2);
if ( isResourceSong )
{
std::string::append(a3, "songs/", 6u);
}
else
{
v7 = (GameManager *)GameManager::sharedState((GameManager *)isResourceSong);
GameVariable = (cocos2d::CCFileUtils *)(unsigned __int8)GameManager::getGameVariable(v7, "0033");
if ( (_BYTE)GameVariable )
{
v9 = cocos2d::CCFileUtils::sharedFileUtils(GameVariable);
(*(void (__fastcall **)(_QWORD *__return_ptr))(*(_QWORD *)v9 + 152LL))(v14);
if ( (*(_BYTE *)a3 & 1) != 0 )
{
**(_BYTE **)(a3 + 16) = 0;
*(_QWORD *)(a3 + 8) = 0;
}
else
{
*(_BYTE *)(a3 + 1) = 0;
*(_BYTE *)a3 = 0;
}
std::string::reserve((__int64 *)a3, 0);
v10 = v14[0];
v11 = v14[1];
*(_QWORD *)(a3 + 16) = v14[2];
*(_QWORD *)a3 = v10;
*(_QWORD *)(a3 + 8) = v11;
std::string::append(a3, "Resources\\", 0xAu);
}
else
{
v12 = cocos2d::CCFileUtils::sharedFileUtils(GameVariable);
(*(void (__fastcall **)(_QWORD *__return_ptr))(*(_QWORD *)v12 + 144LL))(v15);
if ( (*(_BYTE *)a3 & 1) != 0 )
{
**(_BYTE **)(a3 + 16) = 0;
*(_QWORD *)(a3 + 8) = 0;
}
else
{
*(_BYTE *)(a3 + 1) = 0;
*(_BYTE *)a3 = 0;
}
std::string::reserve((__int64 *)a3, 0);
*(_QWORD *)(a3 + 16) = v15[2];
v13 = v15[1];
*(_QWORD *)a3 = v15[0];
*(_QWORD *)(a3 + 8) = v13;
}
}
return a3;
}