//
// PauseLayer::tryQuit from 0x1001433d0 to 0x100143490 (192 bytes)
//
// 4 xrefs:
// > PauseLayer::keyDown @ 0x100143864
// > PauseLayer::keyBackClicked @ 0x1001438c4
// > sub_1001438C8 @ 0x1001438e8
// > PauseLayer::customSetup @ 0x1001421f8
//
// 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 *v3; // x0
cocos2d::CCObject *v4; // x1
__int64 v5; // x19
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v7; // [xsp+1Fh] [xbp-11h]
v3 = GameManager::sharedState();
if ( GameManager::getGameVariable(v3, "0167") )
{
sub_100009900(__p, "Are you sure you want to exit?");
v5 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Exit Level", __p, "Cancel", "Exit", 300.0);
if ( v7 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 72LL))(v5, 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 1288LL))(v5);
}
else
{
PauseLayer::onQuit(a1, v4);
}
}