//
// EndLevelLayer::onRestartCheckpoint from 0x1004c20e0 to 0x1004c2205 (293 bytes)
//
// 1 xrefs:
// > EndLevelLayer::customSetup @ 0x1004c1126
//
// 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::onRestartCheckpoint(EndLevelLayer *a1, cocos2d::CCObject *a2)
{
GameManager *v2; // rax
FMODAudioEngine *v3; // rax
FMODAudioEngine *v4; // rax
cocos2d::CCDelayTime *v5; // r14
cocos2d::CCCallFunc *v6; // rax
cocos2d::CCSequence *v7; // r14
void *v8[5]; // [rsp+8h] [rbp-28h] BYREF
if ( !a1->m_exiting )
{
a1->m_exiting = 1;
v2 = GameManager::sharedState();
if ( !GameManager::getGameVariable(v2, "0024") )
PlatformToolbox::hideCursor();
v3 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::clearAllAudio(v3);
v4 = FMODAudioEngine::sharedEngine();
strcpy((char *)v8, " playSound_01.ogg");
FMODAudioEngine::playEffect((__int64)v4, (__int64)v8, (__m128)0x3F800000u, 0.0, 0.30000001);
if ( ((__int64)v8[0] & 1) != 0 )
operator delete(v8[2]);
((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);
v5 = cocos2d::CCDelayTime::create(0.5);
v6 = cocos2d::CCCallFunc::create(a1->m_playLayer, (cocos2d::SEL_CallFunc)0x611uLL);
v7 = sub_1003B5760(v5, v6, 0);
((void (__fastcall *)(cocos2d::CCSequence *, __int64))v7->setTag)(v7, 16);
cocos2d::CCNode::runAction(a1->m_playLayer, v7);
}
}