//
// PauseLayer::onRestartFull from 0x1404daf60 to 0x1404db087 (295 bytes)
//
// 2 xrefs:
// > PauseLayer::customSetup @ 0x1404d6de9
// > ??> @ 0x1409299b4
//
// 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
//
__int64 __fastcall PauseLayer::onRestartFull(struct cocos2d::CCObject *a1, __int64 a2)
{
__int64 v3; // rax
struct cocos2d::CCObject *v4; // rbx
__int64 v6; // rax
cocos2d::CCTouchDispatcher *v7; // rax
__int64 v8; // rcx
void *v9; // [rsp+30h] [rbp+8h]
void *v10; // [rsp+30h] [rbp+8h]
if ( *((_BYTE *)a1 + 616) )
{
v3 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v9 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v3 = qword_14090BFD0;
}
v4 = *(struct cocos2d::CCObject **)(*(_QWORD *)(v3 + 560) + 12912LL);
if ( PauseLayer::getQueuedStartPos((__int64)a1) != v4 )
return PauseLayer::onResume(a1);
}
if ( *((_BYTE *)a1 + 545) )
{
*((_BYTE *)a1 + 545) = 0;
v6 = cocos2d::CCDirector::sharedDirector(a1);
v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 144LL))(v6);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, a1);
}
v8 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v10 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v8 = qword_14090BFD0;
}
LOBYTE(a2) = 1;
PlayLayer::resumeAndRestart(*(_QWORD *)(v8 + 560), a2);
return (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)a1 + 528LL))(a1);
}