//
// PlayLayer::pauseGame from 0x4025b0 to 0x402688 (216 bytes)
//
// 2 xrefs:
// > AppDelegate::pauseGame @ 0x3f6e8e
// > UILayer::doPause @ 0x3fcde6
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:25 +0000
//
unsigned __int8 *__fastcall PlayLayer::pauseGame(GJUINode **this, PauseLayer *a2)
{
unsigned __int8 *result; // r0
int v5; // r5
GJUINode *v6; // r3
double TempMilliTime; // r0
PlatformToolbox *v8; // r0
GameManager *v9; // r0
bool v10; // r1
int v11; // r5
int v12; // r0
result = (unsigned __int8 *)PlayLayer::canPauseGame((PlayLayer *)this);
if ( result )
{
result = (unsigned __int8 *)AppDelegate::get((AppDelegate *)result);
v5 = result[9];
if ( !result[9] )
{
v6 = *this;
*((_BYTE *)this + 1438) = 1;
(*((void (__fastcall **)(GJUINode **, int))v6 + 184))(this, 1065353216);
*((_BYTE *)this + 12207) = 1;
PlayLayer::dtFlushCells((PlayLayer *)this);
PlayLayer::dtCommitPlaytime((PlayLayer *)this);
*((_QWORD *)this + 1515) = 0;
*((_QWORD *)this + 1516) = 0;
*((_QWORD *)this + 1517) = 0;
TempMilliTime = PlayLayer::getTempMilliTime((PlayLayer *)this, 0);
*((double *)this + 1522) = TempMilliTime;
v8 = (PlatformToolbox *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(TempMilliTime));
*((_BYTE *)v8 + 142) = v5;
PlatformToolbox::showCursor(v8);
GJBaseGameLayer::processQueuedButtons((GJBaseGameLayer *)this, 0.0, 1);
PlayLayer::releaseAllPlayerButtons(this);
v9 = (GameManager *)GJBaseGameLayer::pauseAudio((GJBaseGameLayer *)this);
GameManager::sharedState(v9);
PlayLayer::releaseAllPlayerButtons(this);
UILayer::resetAllButtons(*(this + 2810));
UILayer::toggleMenuVisibility(*(this + 2810), v5);
v11 = PauseLayer::create(a2, v10);
v12 = (*((int (__fastcall **)(GJUINode **))*this + 64))(this);
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)v12 + 232))(v12, v11, 10);
return (unsigned __int8 *)(*((int (__fastcall **)(GJUINode **))*this + 90))(this);
}
}
return result;
}