//
// SongSelectNode::onOpenCustomSong from 0x1400c7b20 to 0x1400c7ba0 (128 bytes)
//
// 3 xrefs:
// > SongSelectNode::init @ 0x1400c74aa
// > SongSelectNode::init @ 0x1400c7530
// > ??> @ 0x1406c822c
//
// 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
//
void SongSelectNode::onOpenCustomSong(SongSelectNode *a1, cocos2d::CCObject *a2)
{
GameManager *v3; // rcx
MusicDownloadManager *v4; // rcx
FLAlertLayerProtocol *v5; // rdx
void *v6; // [rsp+40h] [rbp+18h]
v3 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v6 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v3 = (GameManager *)qword_1406C2ED8;
}
if ( GameManager::getGameVariable(v3, "0016") )
{
SongSelectNode::showCustomSongSelect(a1);
}
else
{
MusicDownloadManager::sharedState();
v5 = &a1->FLAlertLayerProtocol;
if ( !a1 )
v5 = nullptr;
MusicDownloadManager::showTOS(v4, v5);
}
}