//
// EndLevelLayer::onReplay from 0x1002f7218 to 0x1002f7308 (240 bytes)
//
// 2 xrefs:
// > EndLevelLayer::keyDown @ 0x1002f8ba0
// > EndLevelLayer::customSetup @ 0x1002f645c
//
// 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 __fastcall EndLevelLayer::onReplay(EndLevelLayer *a1, cocos2d::CCObject *a2)
{
GameManager *v3; // x0
FMODAudioEngine *v4; // x0
FMODAudioEngine *v5; // x20
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v7; // [xsp+1Fh] [xbp-11h]
if ( !a1->m_exiting )
{
a1->m_exiting = 1;
v3 = GameManager::sharedState();
if ( !GameManager::getGameVariable(v3, "0024") )
PlatformToolbox::hideCursor();
v4 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::clearAllAudio(v4);
v5 = FMODAudioEngine::sharedEngine();
sub_100009900(__p, "playSound_01.ogg");
FMODAudioEngine::playEffect((__int64)v5, (__int64)__p, 1.0, 0.0, 0.3);
if ( v7 < 0 )
operator delete(__p[0]);
((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->exitLayer)(a1, 0);
((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->setTouchEnabled)(a1, 0);
((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->setKeyboardEnabled)(a1, 0);
((void (__fastcall *)(EndLevelLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);
PlayLayer::delayedFullReset(a1->m_playLayer);
}
}