//
// AppDelegate::pauseGame from 0x1400989f0 to 0x140098ad0 (224 bytes)
//
// 3 xrefs:
// > AppDelegate::applicationWillResignActive @ 0x1400985b0
// > AppDelegate::applicationDidEnterBackground @ 0x140098643
// > ??> @ 0x140912d58
//
// 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:26:03 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall AppDelegate::pauseGame(__int64 a1)
{
__int64 result; // rax
__int64 v2; // rcx
__int64 v3; // rdx
__int64 v4; // rdx
__int64 v5; // rcx
void *v6; // [rsp+30h] [rbp+8h]
void *v7; // [rsp+30h] [rbp+8h]
result = cocos2d::CCDirector::sharedDirector(a1);
v2 = *(_QWORD *)(result + 272);
if ( v2 && *(_DWORD *)(v2 + 28) == 5 )
{
result = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v6 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
result = qword_14090BFD0;
}
v3 = *(_QWORD *)(result + 560);
if ( v3 )
{
if ( !*(_BYTE *)(v3 + 15317) )
{
result = cocos2d::CCApplication::sharedApplication();
if ( !*(_BYTE *)(result + 225) )
{
v5 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v7 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v5 = qword_14090BFD0;
}
LOBYTE(v4) = 1;
return PlayLayer::pauseGame(*(_QWORD *)(v5 + 560), v4);
}
}
}
}
return result;
}