//
// MusicDownloadManager::pathForSFX from 0x100590230 to 0x1005902ac (124 bytes)
//
// 19 xrefs:
// > GJBaseGameLayer::processSFXObjects @ 0x10011dbe3
// > RewardUnlockLayer::playRewardEffect @ 0x10021d040
// > GameManager::playSFXTrigger @ 0x100377556
// > SecretLayer5::onSubmit @ 0x10047b550
// > SecretLayer5::animateHead @ 0x10047c35a
// > SecretLayer5::showSuccessAnimation @ 0x10047ccad
// > SecretLayer5::showSuccessAnimation @ 0x10047cd08
// > SecretLayer5::showSuccessAnimation @ 0x10047cd80
// > SecretLayer5::showSuccessAnimation @ 0x10047cdf2
// > SecretLayer5::showFailAnimation @ 0x10047d311
// > SecretLayer5::showFailAnimation @ 0x10047d360
// > SecretLayer5::playWinSFX @ 0x10047d687
// > SetupSFXPopup::createSFXWidget @ 0x1004ba050
// > SetupSFXPopup::onClose @ 0x1004ba320
// > MusicDownloadManager::isSFXDownloaded @ 0x10058ffd8
// > MusicDownloadManager::onDownloadSFXCompleted @ 0x100594f68
// > MusicDownloadManager::deleteSFX @ 0x100596ae1
// > CustomSFXWidget::onPlayback @ 0x1005e3c8e
// > CustomSFXWidget::deleteSFX @ 0x1005e4690
//
// 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
//
std::string *__fastcall MusicDownloadManager::pathForSFX(std::string *this, double a2, __int64 a3, int a4)
{
const std::string::value_type *v5; // rsi
std::string::size_type v6; // rdx
size_t v8[2]; // [rsp+8h] [rbp-28h] BYREF
void *__p; // [rsp+18h] [rbp-18h]
MusicDownloadManager::pathForSFXFolder(this);
std::string::append(this, "s");
GameToolbox::intToString(v8, a4, a2);
if ( (v8[0] & 1) != 0 )
{
v5 = (const std::string::value_type *)__p;
v6 = v8[1];
}
else
{
v6 = LOBYTE(v8[0]) >> 1;
v5 = (char *)v8 + 1;
}
std::string::append(this, v5, v6);
if ( (v8[0] & 1) != 0 )
operator delete(__p);
std::string::append(this, ".ogg");
return this;
}