//
// SongSelectNode::getSongFileName from 0x1400c7de0 to 0x1400c7e95 (181 bytes)
//
// 2 xrefs:
// > ??> @ 0x14054e8c8
// > ??> @ 0x1406c825c
//
// 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
//
// Hidden C++ exception states: #wind=1
_QWORD *__fastcall SongSelectNode::getSongFileName(__int64 a1, _QWORD *a2)
{
unsigned int v3; // edi
MusicDownloadManager *v4; // rax
_QWORD *v5; // rax
size_t v6; // r8
_BYTE v8[32]; // [rsp+30h] [rbp-38h] BYREF
v3 = *(_DWORD *)(a1 + 8);
if ( v3 )
{
v4 = MusicDownloadManager::sharedState();
v5 = (_QWORD *)MusicDownloadManager::pathForSong(v4, v8, v3);
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_14003A930(a2, v5, v6);
sub_14003A830((__int64)v8);
}
else
{
GJGameLevel::getAudioFileName(*(_QWORD *)(*(_QWORD *)(a1 + 88) + 384LL));
}
return a2;
}