//
// SongSelectNode::onOpenCustomSong from 0x1001fc9f0 to 0x1001fca5a (106 bytes)
//
// 2 xrefs:
// > SongSelectNode::init @ 0x1001fc63f
// > SongSelectNode::init @ 0x1001fc6d0
//
// 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 12:26:50 +0000
//
__int64 __fastcall SongSelectNode::onOpenCustomSong(__int64 a1, __int64 a2, __int64 a3)
{
double v4; // xmm0_8
__int64 v5; // rax
__int64 v6; // rdi
char *v7; // rax
__int64 v9; // rax
*(_QWORD *)&v4 = GameManager::sharedState(a1, a2, a3).u64[0];
v6 = v5;
if ( (unsigned __int8)GameManager::getGameVariable(v5, "0016") )
{
v7 = CustomSongLayer::create(a1 + 336);
*((_QWORD *)v7 + 88) = a1 + 328;
return (*(__int64 (__fastcall **)(char *, double))(*(_QWORD *)v7 + 1312LL))(v7, v4);
}
else
{
v9 = MusicDownloadManager::sharedState(v6);
return MusicDownloadManager::showTOS(v9, a1 + 320, v4);
}
}