//
// PauseLayer::onTryEdit from 0x1003c1020 to 0x1003c1114 (244 bytes)
//
// 1 xrefs:
// > PauseLayer::customSetup @ 0x1003bfb1d
//
// 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 12:29:33 +0000
//
__int64 __fastcall PauseLayer::onTryEdit(__int64 a1)
{
__int64 v2; // rbx
_QWORD v3[2]; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
if ( *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(GameManager::sharedState() + 544) + 1936LL) + 1140LL) == 2 )
return PauseLayer::onEdit(a1);
__p = operator new(0x48u);
v3[0] = 73;
v3[1] = 69;
strcpy((char *)__p, "Are you sure you want to open the editor?\n(Read-Only)");
v2 = FLAlertLayer::create_1(a1 + 552, "Edit Level", v3, "Cancel", "Open", 380.0);
if ( (v3[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 72LL))(v2, 1);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 1312LL))(v2);
}