//
// AppDelegate::pauseGame from 0x140083040 to 0x14008311a (218 bytes)
//
// 3 xrefs:
// > AppDelegate::applicationWillResignActive @ 0x140082de0
// > AppDelegate::applicationDidEnterBackground @ 0x140082dfe
// > ??> @ 0x1406c6a80
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=3
void AppDelegate::pauseGame(AppDelegate *a1)
{
__int64 v1; // rcx
__int64 v2; // rax
__int64 v3; // rdx
__int64 v4; // rcx
void *v5; // [rsp+30h] [rbp+8h]
void *v6; // [rsp+30h] [rbp+8h]
v1 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(a1) + 264);
if ( v1 && *(_DWORD *)(v1 + 28) == 5 )
{
v2 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v5 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v2 = qword_1406C2ED8;
}
v3 = *(_QWORD *)(v2 + 520);
if ( v3 && !*(_BYTE *)(v3 + 14717) && !*(_BYTE *)(cocos2d::CCApplication::sharedApplication(v1, v3) + 217) )
{
v4 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v6 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v4 = qword_1406C2ED8;
}
PlayLayer::pauseGame(*(PlayLayer **)(v4 + 520), 1);
}
}
}