//
// EditLevelLayer::onExportLevel from 0x1001df8b0 to 0x1001df9ef (319 bytes)
//
// 1 xrefs:
// > EditLevelLayer::init @ 0x1001ddf74
//
// 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:26:27 +0000
//
void __fastcall EditLevelLayer::onExportLevel(__int64 a1, double a2)
{
__int64 v3; // rdi
__int64 v4; // r15
__int64 v5; // rbx
__int64 v6; // rax
int v7; // eax
void **v8; // r14
__int64 v9; // rax
__int64 v10; // rax
_WORD v11[8]; // [rsp+0h] [rbp-60h] BYREF
void *__p; // [rsp+10h] [rbp-50h]
_QWORD v13[2]; // [rsp+18h] [rbp-48h] BYREF
char *v14; // [rsp+28h] [rbp-38h] BYREF
char v15; // [rsp+30h] [rbp-30h] BYREF
char v16[47]; // [rsp+31h] [rbp-2Fh] BYREF
v3 = *(_QWORD *)(a1 + 472);
if ( v3 )
{
v4 = a1;
v5 = sub_1007FE9A0(v3);
v6 = LocalLevelManager::sharedState(a2);
v7 = sub_1006CE060(v6, v5);
if ( v7 <= 0 )
{
if ( !v7 )
{
v8 = (void **)&v14;
v14 = (char *)operator new(0x1Au);
v13[0] = 27;
v13[1] = 23;
strcpy(v14, "Failed to export level.");
v10 = sub_100493AB0(0, "Error", v13, "OK", 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 1312LL))(v10);
if ( (v13[0] & 1) != 0 )
LABEL_6:
operator delete(*v8);
}
}
else
{
v15 = 30;
strcpy(v16, "Level exported!");
v8 = (void **)&v16[15];
v11[0] = 0;
v9 = TextAlertPopup::create(&v15, 150, v11, 0.5, 0.60000002);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v4 + 464LL))(v4, v9, 100);
if ( (v11[0] & 1) != 0 )
operator delete(__p);
if ( (v15 & 1) != 0 )
goto LABEL_6;
}
}
}