//
// PauseLayer::onEdit from 0x1404db250 to 0x1404db443 (499 bytes)
//
// 3 xrefs:
// > PauseLayer::onTryEdit @ 0x1404db241
// > PauseLayer::FLAlert_Clicked @ 0x1404db728
// > ??> @ 0x1409299cc
//
// 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=6
struct cocos2d::CCAction *__fastcall PauseLayer::onEdit(cocos2d::CCNode *a1)
{
__int64 v2; // rdx
__int64 v3; // rcx
struct cocos2d::CCAction *result; // rax
__int64 v5; // rax
__int64 v6; // rcx
__int64 v7; // rcx
__int64 v8; // rcx
__int64 v9; // rbx
struct cocos2d::CCFiniteTimeAction *v10; // rax
struct cocos2d::CCAction *v11; // rax
void *v12; // [rsp+38h] [rbp+10h]
void *v13; // [rsp+38h] [rbp+10h]
void *v14; // [rsp+38h] [rbp+10h]
void *v15; // [rsp+38h] [rbp+10h]
void *v16; // [rsp+38h] [rbp+10h]
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v12 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v12);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
v3 = *(_QWORD *)(*(_QWORD *)(v2 + 560) + 2168LL);
if ( *(_DWORD *)(v3 + 1220) == 2
|| (result = (struct cocos2d::CCAction *)(unsigned int)(*(_DWORD *)(v2 + 1064) - *(_DWORD *)(v2 + 1068)),
*(_DWORD *)(v2 + 1064) - *(_DWORD *)(v2 + 1068) > 0) )
{
v5 = cocos2d::CCDirector::sharedDirector(v3);
*(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 112LL))(v5) + 56) = 1065353216;
v6 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v13 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v6 = qword_14090BFD0;
}
cocos2d::CCNode::stopActionByTag(*(cocos2d::CCNode **)(v6 + 560), 31);
v7 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v14 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v7 = qword_14090BFD0;
}
cocos2d::CCNode::stopAllActions(*(cocos2d::CCNode **)(v7 + 560));
v8 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v15 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v8 = qword_14090BFD0;
}
cocos2d::CCNode::unscheduleAllSelectors(*(cocos2d::CCNode **)(v8 + 560));
if ( !qword_14090BFD0 )
{
v16 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
GJBaseGameLayer::resetAudio();
v9 = cocos2d::CCCallFunc::create(a1, PauseLayer::goEdit);
v10 = cocos2d::CCDelayTime::create(0.0);
v11 = cocos2d::CCSequence::create(v10, v9, 0);
return cocos2d::CCNode::runAction(a1, v11);
}
return result;
}