//
// PauseLayer::onResume from 0x1404dac50 to 0x1404dae26 (470 bytes)
//
// 8 xrefs:
// > PauseLayer::onPracticeMode @ 0x1404dab83
// > PauseLayer::onNormalMode @ 0x1404dac48
// > PauseLayer::onRestart @ 0x1404daebc
// > PauseLayer::onRestartFull @ 0x1404dafec
// > PauseLayer::handleAction @ 0x1404db8e5
// > PauseLayer::keyDown @ 0x1404db973
// > PauseLayer::customSetup @ 0x1404d6ed9
// > ??> @ 0x14092999c
//
// 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=3
__int64 __fastcall PauseLayer::onResume(struct cocos2d::CCObject *a1)
{
__int64 v2; // rcx
cocos2d::CCObject *QueuedStartPos; // rdi
char v4; // si
__int64 v5; // rax
cocos2d::CCTouchDispatcher *v6; // rax
__int64 result; // rax
__int64 v8; // rbx
_QWORD *v9; // rbx
cocos2d::CCObject *v10; // rcx
void *v11; // [rsp+30h] [rbp+8h]
void *v12; // [rsp+30h] [rbp+8h]
void *v13; // [rsp+30h] [rbp+8h]
QueuedStartPos = PauseLayer::getQueuedStartPos((__int64)a1);
if ( !*((_BYTE *)a1 + 616) )
goto LABEL_6;
if ( !qword_14090BFD0 )
{
v11 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
v2 = *(_QWORD *)(qword_14090BFD0 + 560);
if ( QueuedStartPos == *(cocos2d::CCObject **)(v2 + 12912) )
LABEL_6:
v4 = 0;
else
v4 = 1;
if ( *((_BYTE *)a1 + 545) )
{
*((_BYTE *)a1 + 545) = 0;
v5 = cocos2d::CCDirector::sharedDirector(v2);
v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1);
}
if ( !qword_14090BFD0 )
{
v12 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v12);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
PlayLayer::resume(*(_QWORD *)(qword_14090BFD0 + 560));
result = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)a1 + 528LL))(a1);
if ( v4 )
{
v8 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v13 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v8 = qword_14090BFD0;
}
v9 = *(_QWORD **)(v8 + 560);
if ( (cocos2d::CCObject *)v9[1614] == QueuedStartPos )
{
(*(void (__fastcall **)(_QWORD *))(*v9 + 1456LL))(v9);
}
else
{
if ( QueuedStartPos )
cocos2d::CCObject::retain(QueuedStartPos);
v10 = (cocos2d::CCObject *)v9[1614];
if ( v10 )
cocos2d::CCObject::release(v10);
v9[1614] = QueuedStartPos;
*((_BYTE *)v9 + 13096) = QueuedStartPos != nullptr;
PlayLayer::resetLevelFromStart(v9);
(*(void (__fastcall **)(_QWORD *))(*v9 + 1072LL))(v9);
GJBaseGameLayer::updateCamera((__int64)v9, 0.0);
PlayLayer::updateTestModeLabel(v9);
}
return PlayLayer::startMusic(v9);
}
return result;
}