//
// EditorPauseLayer::onExport from 0x10027e670 to 0x10027e7c1 (337 bytes)
//
// 2 xrefs:
// > EditorPauseLayer::customSetup @ 0x10027d795
// > EditorPauseLayer::customSetup @ 0x10027dcfa
//
// 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:27:42 +0000
//
void __fastcall EditorPauseLayer::onExport(__int64 a1, double a2)
{
__int64 v2; // rax
__int64 v3; // rbx
__int64 v4; // rax
int v5; // eax
void **v6; // r14
__int64 v7; // rax
__int64 v8; // rax
_QWORD v9[2]; // [rsp+0h] [rbp-40h] BYREF
char *v10; // [rsp+10h] [rbp-30h] BYREF
char v11; // [rsp+18h] [rbp-28h] BYREF
char v12[39]; // [rsp+19h] [rbp-27h] BYREF
if ( !*(_BYTE *)(a1 + 568) )
{
v2 = LocalLevelManager::sharedState(a2);
sub_1004A5220(v2, 30.0);
LevelEditorLayer::saveLevel(*(_QWORD *)(a1 + 576));
v3 = sub_1007FE9A0(*(_QWORD *)(*(_QWORD *)(a1 + 576) + 1936LL));
v4 = LocalLevelManager::sharedState(30.0);
v5 = sub_1006CE060(v4, v3);
if ( v5 > 0 )
{
v11 = 30;
strcpy(v12, "Level exported!");
v6 = (void **)&v12[15];
v7 = FLAlertLayer::create_1(0, "Exported", &v11, "OK", 0, 300.0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);
if ( (v11 & 1) == 0 )
return;
goto LABEL_4;
}
if ( !v5 )
{
v6 = (void **)&v10;
v10 = (char *)operator new(0x1Au);
v9[0] = 27;
v9[1] = 23;
strcpy(v10, "Failed to export level.");
v8 = FLAlertLayer::create_1(0, "Error", v9, "OK", 0, 300.0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1312LL))(v8);
if ( (v9[0] & 1) != 0 )
LABEL_4:
operator delete(*v6);
}
}
}