//
// MusicDownloadManager::pathForSong from 0x96cdd4 to 0x96cee0 (268 bytes)
//
// 18 xrefs:
// > FindBPMLayer::playMusic @ 0x6e7be0
// > GameManager::getMenuMusicFile @ 0x718d60
// > GameManager::getPracticeMusicFile @ 0x718ed8
// > CustomSongCell::onDelete @ 0x735974
// > GJGameLevel::getAudioFileName @ 0x805444
// > CustomSongWidget::updatePlaybackBtn @ 0x8683f8
// > CustomSongWidget::onPlayback @ 0x869208
// > CustomSongWidget::onPlayback @ 0x869258
// > CustomSongWidget::deleteSong @ 0x86acfc
// > MusicDownloadManager::deleteSong @ 0x96cf04
// > MusicDownloadManager::isSongDownloaded @ 0x96cff0
// > MusicDownloadManager::onDownloadSongCompleted @ 0x96d2a4
// > SongSelectNode::getSongFileName @ 0x97f1e4
// > GJBaseGameLayer::activateSongTrigger @ 0x9bf544
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x9e1d7c
// > SetupSongTriggerPopup::onPlayback @ 0xaea154
// > SetupSongTriggerPopup::updateSongTimeSlider @ 0xaea658
// > ??> @ 0x59aa0
//
// 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::pathForSong@(
__int64 *__return_ptr a1@,
MusicDownloadManager *this@,
int a3@)
{
char *v5; // x1
size_t v6; // x2
unsigned __int64 v8[2]; // [xsp+30h] [xbp+30h] BYREF
void *v9; // [xsp+40h] [xbp+40h]
MusicDownloadManager::pathForSongFolder(this, a3, (__int64)a1);
GameToolbox::intToString(v8, (GameToolbox *)(unsigned int)a3);
if ( (v8[0] & 1) != 0 )
{
v5 = (char *)v9;
v6 = v8[1];
}
else
{
v6 = LOBYTE(v8[0]) >> 1;
v5 = (char *)v8 + 1;
}
std::string::append((__int64)a1, v5, v6);
if ( (v8[0] & 1) != 0 )
operator delete(v9);
if ( a3 <= 10000000 )
std::string::append((__int64)a1, ".mp3", 4u);
else
std::string::append((__int64)a1, ".ogg", 4u);
return a1;
}