//
// GJGameLevel::getAudioFileName from 0x140264790 to 0x140264882 (242 bytes)
//
// 11 xrefs:
// > SongSelectNode::getSongFileName @ 0x140168f0d
// > EditLevelLayer::playStep2 @ 0x14017b462
// > EditLevelLayer::onEdit @ 0x14017b8b6
// > EditorPauseLayer::playStep2 @ 0x1401826a3
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034e019
// > LevelInfoLayer::playStep2 @ 0x140422332
// > LevelInfoLayer::onEdit @ 0x140422ae1
// > LevelPage::playStep2 @ 0x140447122
// > PlayLayer::setupHasCompleted @ 0x140504e79
// > PlayLayer::prepareMusic @ 0x14051ada1
// > ??> @ 0x14091c88c
//
// This function is hookable on this platform (idp: pc, 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:28:49 +0000
//
// Hidden C++ exception states: #wind=2
_QWORD *__fastcall GJGameLevel::getAudioFileName(__int64 a1, _QWORD *a2)
{
__int64 v4; // rcx
_QWORD *v5; // rax
size_t v6; // r8
void *v8; // [rsp+28h] [rbp-40h]
_BYTE v9[32]; // [rsp+30h] [rbp-38h] BYREF
if ( *(_DWORD *)(a1 + 680) )
{
v4 = qword_14090C070;
if ( !qword_14090C070 )
{
v8 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v4 = qword_14090C070;
}
v5 = (_QWORD *)MusicDownloadManager::pathForSong(v4, v9, *(unsigned int *)(a1 + 680));
if ( v5[3] > 0xFu )
v5 = (_QWORD *)*v5;
*(_OWORD *)a2 = 0;
a2[2] = 0;
a2[3] = 0;
v6 = -1;
do
++v6;
while ( *((_BYTE *)v5 + v6) );
sub_14003D230(a2, v5, v6);
sub_14003D310((__int64)v9);
}
else
{
LevelTools::getAudioFileName(a2, *(unsigned int *)(a1 + 676));
}
return a2;
}