//
// EndLevelLayer::onReplay from 0x8fb098 to 0x8fb1ec (340 bytes)
//
// 4 xrefs:
// > EndLevelLayer::keyDown @ 0x8fb224
// > ??> @ 0xc6898
// > EndLevelLayer::customSetup @ 0x8fc4d8
// > ??> @ 0x1545cd0
//
// 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:03 +0000
//
__int64 __fastcall EndLevelLayer::onReplay(EndLevelLayer *this, cocos2d::CCObject *a2)
{
GameManager *v4; // x0
PlatformToolbox *GameVariable; // x0
FMOD::ChannelControl **v6; // x0
FMODAudioEngine *v7; // x0
__int64 v8; // x22
__int64 v9[2]; // [xsp+30h] [xbp+30h] BYREF
void *v10; // [xsp+40h] [xbp+40h]
if ( !*((_BYTE *)this + 619) )
{
*((_BYTE *)this + 619) = (unsigned __int8)&dword_0 + 1;
v4 = (GameManager *)GameManager::sharedState((GameManager *)((char *)&dword_0 + 1));
GameVariable = (PlatformToolbox *)(unsigned __int8)GameManager::getGameVariable(v4, "0024");
if ( !(_BYTE)GameVariable )
PlatformToolbox::hideCursor(GameVariable);
v6 = (FMOD::ChannelControl **)FMODAudioEngine::sharedEngine(GameVariable);
v7 = (FMODAudioEngine *)FMODAudioEngine::clearAllAudio(v6);
v8 = FMODAudioEngine::sharedEngine(v7);
v9[0] = 0;
v9[1] = 0;
v10 = nullptr;
std::string::__init(v9, "playSound_01.ogg", 0x10u);
FMODAudioEngine::playEffect(v8, (char *)v9, 1.0, 0.0, 0.3);
if ( (v9[0] & 1) != 0 )
operator delete(v10);
(*(void (__fastcall **)(EndLevelLayer *, _QWORD))(*(_QWORD *)this + 1320LL))(this, 0);
(*(void (__fastcall **)(EndLevelLayer *, _QWORD))(*(_QWORD *)this + 1000LL))(this, 0);
(*(void (__fastcall **)(EndLevelLayer *, _QWORD))(*(_QWORD *)this + 1088LL))(this, 0);
(*(void (__fastcall **)(EndLevelLayer *, _QWORD))(*(_QWORD *)this + 1072LL))(this, 0);
PlayLayer::delayedFullReset(*((PlayLayer **)this + 76));
}
return _stack_chk_guard;
}