//
// PauseLayer::onTryEdit from 0x1404db090 to 0x1404db246 (438 bytes)
//
// 2 xrefs:
// > PauseLayer::customSetup @ 0x1404d6d60
// > ??> @ 0x1409299c0
//
// This function is hookable on this platform (idp: pc, 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 11:33:04 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall PauseLayer::onTryEdit(__int64 a1)
{
__int64 v2; // rax
int v3; // ebx
__int64 v4; // rax
cocos2d::CCObject *v5; // rbx
__int128 v7; // [rsp+50h] [rbp-48h] BYREF
__int64 v8; // [rsp+60h] [rbp-38h]
__int64 v9; // [rsp+68h] [rbp-30h]
_BYTE v10[40]; // [rsp+70h] [rbp-28h] BYREF
void *v11; // [rsp+B0h] [rbp+18h]
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v11 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
if ( *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(v2 + 560) + 2168LL) + 1220LL) == 2 )
return PauseLayer::onEdit(a1);
v3 = a1 + 552;
if ( !a1 )
v3 = 0;
v7 = 0;
*(_QWORD *)&v7 = sub_14003D460(0x50u);
v8 = 69;
v9 = 79;
strcpy((char *)v7, "Are you sure you want to open the editor?\n(Read-Only)");
v4 = sub_14003F4F0((__int64)v10, (__int64)&v7);
v5 = FLAlertLayer::create(v3, (int)"Edit Level", v4, (__int64)"Cancel", (__int64)"Open", 1136525312, 0, 0, 1065353216);
sub_14003D310((__int64)&v7);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v5 + 64LL))(v5, 1);
return (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v5 + 1064LL))(v5);
}