//
// PlayLayer::pauseGame from 0x6f71e8 to 0x6f7314 (300 bytes)
//
// 3 xrefs:
// > AppDelegate::pauseGame @ 0x6e6c04
// > UILayer::doPause @ 0x6ef3a0
// > ??> @ 0x83e48
//
// This function is hookable on this platform (idp: arm, 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 12:51:51 +0000
//
__int64 __fastcall PlayLayer::pauseGame(UILayer **this, unsigned __int8 a2)
{
unsigned int v3; // w20
__int64 result; // x0
UILayer *v5; // x1
cocos2d::CCDirector *v6; // x0
PlatformToolbox *v7; // x0
GameManager *v8; // x0
bool v9; // w1
__int64 v10; // x0
__int64 v11; // [xsp+38h] [xbp+38h]
v3 = a2;
result = (unsigned __int8)PlayLayer::canPauseGame((PlayLayer *)this);
if ( (_BYTE)result )
{
result = *(unsigned __int8 *)(AppDelegate::get((AppDelegate *)result) + 17);
if ( !(_DWORD)result )
{
v5 = *this;
*((_BYTE *)this + 1982) = 1;
(*((void (__fastcall **)(UILayer **, float))v5 + 184))(this, 1.0);
*((_BYTE *)this + 14751) = 1;
PlayLayer::dtFlushCells((PlayLayer *)this);
PlayLayer::dtCommitPlaytime((PlayLayer *)this);
*(this + 1833) = nullptr;
*(this + 1834) = nullptr;
*(this + 1835) = nullptr;
*((double *)this + 1840) = PlayLayer::getTempMilliTime((PlayLayer *)this);
v7 = (PlatformToolbox *)cocos2d::CCDirector::sharedDirector(v6);
*((_BYTE *)v7 + 178) = 0;
PlatformToolbox::showCursor(v7);
GJBaseGameLayer::processQueuedButtons((GJBaseGameLayer *)this, 0.0, 1);
PlayLayer::releaseAllPlayerButtons(this);
v8 = (GameManager *)GJBaseGameLayer::pauseAudio((GJBaseGameLayer *)this);
GameManager::sharedState(v8);
PlayLayer::releaseAllPlayerButtons(this);
UILayer::resetAllButtons(*(this + 1661));
UILayer::toggleMenuVisibility(*(this + 1661), 0);
v11 = PauseLayer::create((PauseLayer *)v3, v9);
v10 = (*((__int64 (__fastcall **)(UILayer **))*this + 64))(this);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v10 + 464LL))(v10, v11, 10);
return (*((__int64 (__fastcall **)(UILayer **))*this + 90))(this);
}
}
return result;
}