//
// PauseLayer::onTryEdit from 0x14037e550 to 0x14037e6ff (431 bytes)
//
// 2 xrefs:
// > PauseLayer::customSetup @ 0x14037cbf0
// > ??> @ 0x1406d5db0
//
// 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
//
// Hidden C++ exception states: #wind=2
void PauseLayer::onTryEdit(PauseLayer *a1, cocos2d::CCObject *a2)
{
__int64 v3; // rax
int v4; // ebx
__int64 v5; // rax
FLAlertLayer *v6; // 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]
v3 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v11 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v3 = qword_1406C2ED8;
}
if ( *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(v3 + 520) + 2168LL) + 1108LL) == 2 )
{
PauseLayer::onEdit(a1, a2);
}
else
{
v4 = (_DWORD)a1 + 552;
if ( !a1 )
v4 = 0;
v7 = 0;
*(_QWORD *)&v7 = sub_14003AA10(0x50u);
v8 = 69;
v9 = 79;
strcpy((char *)v7, "Are you sure you want to open the editor?\n(Read-Only)");
v5 = sub_14003BDB0((__int64)v10, (__int64)&v7);
v6 = FLAlertLayer::create(
v4,
(int)"Edit Level",
v5,
(__int64)"Cancel",
(__int64)"Open",
1136525312,
0,
0,
1065353216);
sub_14003A830((__int64)&v7);
v6->setTag(v6, 1);
v6->show(v6);
}
}