//
// EndLevelLayer::onRestartCheckpoint from 0x1004bb0c0 to 0x1004bb203 (323 bytes)
//
// 1 xrefs:
// > EndLevelLayer::customSetup @ 0x1004ba086
//
// This function is hookable on this platform (idp: pc, 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:31:03 +0000
//
void __fastcall EndLevelLayer::onRestartCheckpoint(__int64 a1, double a2)
{
__int64 v3; // rax
__int64 v4; // rax
__int64 v5; // rdi
__int64 v6; // rax
_OWORD *v7; // r14
__int64 v8; // rax
__int64 v9; // r14
void *v10[5]; // [rsp+8h] [rbp-28h] BYREF
if ( !*(_BYTE *)(a1 + 619) )
{
*(_BYTE *)(a1 + 619) = 1;
v3 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getGameVariable(v3, "0024") )
PlatformToolbox::hideCursor(a2);
v4 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::clearAllAudio(v4);
v5 = *(_QWORD *)(a1 + 608);
if ( *(_BYTE *)(v5 + 12544) == 1 && !*(_BYTE *)(v5 + 12545) )
sub_10008D8C0(a2);
v6 = FMODAudioEngine::sharedEngine();
strcpy((char *)v10, " playSound_01.ogg");
FMODAudioEngine::playEffect(v6, (__int64)v10, (__m128)0x3F800000u, 0.0, 0.30000001);
if ( ((__int64)v10[0] & 1) != 0 )
operator delete(v10[2]);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1320LL))(a1, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1000LL))(a1, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1088LL))(a1, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
v7 = cocos2d::CCDelayTime::create((__m128)0x3F000000u);
v8 = cocos2d::CCCallFunc::create(*(_QWORD *)(a1 + 608), 1609, 0);
v9 = sub_10039EB60((__int64)v7, v8, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 72LL))(v9, 16);
cocos2d::CCNode::runAction(*(_QWORD *)(a1 + 608), v9);
}
}