//
// MusicDownloadManager::pathForSongFolder from 0x45979c to 0x45984c (176 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::pathForSong @ 0x459872
// > MusicDownloadManager::parseMusicLibrary @ 0x45cd6c
// > MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x45d50e
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
MusicDownloadManager *__fastcall MusicDownloadManager::pathForSongFolder(
MusicDownloadManager *this,
MusicDownloadManager *a2,
int a3,
int a4)
{
MusicDownloadManager *v7; // r0
char *v8; // r1
GameManager *v9; // r0
cocos2d::CCFileUtils *v10; // r0
cocos2d::CCFileUtils *v11; // r0
MusicDownloadManager *v13; // [sp+4h] [bp-Ch] BYREF
_DWORD v14[2]; // [sp+8h] [bp-8h] BYREF
v13 = a2;
v14[0] = a3;
v14[1] = a4;
sub_776584((int)this, (char *)&unk_939830);
if ( MusicDownloadManager::isResourceSong(a2, a3) )
{
v7 = this;
v8 = "songs/";
}
else
{
v9 = GameManager::sharedState();
if ( !GameManager::getGameVariable(v9, "0033") )
{
v11 = cocos2d::CCFileUtils::sharedFileUtils();
((void (__fastcall *)(_DWORD *, cocos2d::CCFileUtils *))v11->init)(v14, v11);
sub_774794(this, v14);
sub_774008(v14);
return this;
}
v10 = cocos2d::CCFileUtils::sharedFileUtils();
v10->isAbsolutePath((cocos2d::CCFileUtils *)&v13, (const std::string *)v10);
sub_774794(this, &v13);
sub_774008(&v13);
v7 = this;
v8 = "Resources\\";
}
sub_774544((int)v7, v8);
return this;
}