//
// PauseLayer::onRestart from 0x1404dae30 to 0x1404daf57 (295 bytes)
//
// 2 xrefs:
// > PauseLayer::customSetup @ 0x1404d6f3d
// > ??> @ 0x1409299a8
//
// 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 11:33:04 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall PauseLayer::onRestart(struct cocos2d::CCObject *a1)
{
__int64 v2; // rax
struct cocos2d::CCObject *v3; // rbx
__int64 v5; // rax
cocos2d::CCTouchDispatcher *v6; // rax
__int64 v7; // rcx
void *v8; // [rsp+30h] [rbp+8h]
void *v9; // [rsp+30h] [rbp+8h]
if ( *((_BYTE *)a1 + 616) )
{
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v8 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
v3 = *(struct cocos2d::CCObject **)(*(_QWORD *)(v2 + 560) + 12912LL);
if ( PauseLayer::getQueuedStartPos((__int64)a1) != v3 )
return PauseLayer::onResume(a1);
}
if ( *((_BYTE *)a1 + 545) )
{
*((_BYTE *)a1 + 545) = 0;
v5 = cocos2d::CCDirector::sharedDirector(a1);
v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1);
}
v7 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v9 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v7 = qword_14090BFD0;
}
PlayLayer::resumeAndRestart(*(_QWORD *)(v7 + 560), 0);
return (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)a1 + 528LL))(a1);
}