//
// PauseLayer::tryQuit from 0x1003d73c0 to 0x1003d749b (219 bytes)
//
// 4 xrefs:
// > PauseLayer::keyDown @ 0x1003d7b11
// > PauseLayer::keyBackClicked @ 0x1003d7be9
// > sub_1003D7BF0 @ 0x1003d7c10
// > PauseLayer::customSetup @ 0x1003d6152
//
// 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
//
void __fastcall PauseLayer::tryQuit(PauseLayer *a1, cocos2d::CCObject *a2)
{
GameManager *v2; // rax
__int64 v3; // rbx
_QWORD v4[2]; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
v2 = GameManager::sharedState();
if ( GameManager::getGameVariable(v2, "0167") )
{
__p = operator new(0x28u);
v4[0] = 41;
v4[1] = 38;
strcpy((char *)__p, "Are you sure you want to exit?");
v3 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Exit Level", v4, "Cancel", "Exit", 300.0);
if ( (v4[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 72LL))(v3, 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 1288LL))(v3);
}
else
{
PauseLayer::onQuit(a1, (cocos2d::CCObject *)"0167");
}
}