//
// SongInfoLayer::onMenuMusic from 0x903fc4 to 0x90405c (152 bytes)
//
// 3 xrefs:
// > ??> @ 0xce0c8
// > SongInfoLayer::init @ 0x904f08
// > ??> @ 0x1546120
//
// This function is hookable on this platform (idp: arm, 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:57:08 +0000
//
__int64 __fastcall SongInfoLayer::onMenuMusic(SongInfoLayer *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
__int64 result; // x0
GameManager *v5; // x0
GameManager *v6; // x0
GameManager *v7; // x0
v3 = GameStatsManager::sharedState(this);
if ( !(unsigned __int8)GameStatsManager::isItemUnlocked(v3, 0xCu, 0x10u) )
return SongInfoLayer::showCustomMusicUnlockInfo(this);
result = *((unsigned int *)this + 178);
if ( (int)result > 0 )
{
v5 = (GameManager *)*(unsigned int *)(GameManager::sharedState((GameManager *)result) + 1140);
if ( (_DWORD)v5 == *((_DWORD *)this + 178) )
{
v6 = (GameManager *)GameManager::sharedState(v5);
*((_DWORD *)v6 + 285) = 0;
}
else
{
v6 = (GameManager *)GameManager::sharedState(v5);
*((_DWORD *)v6 + 285) = *((_DWORD *)this + 178);
}
v7 = (GameManager *)GameManager::sharedState(v6);
return GameManager::fadeInMenuMusic(v7);
}
return result;
}