//
// LevelBrowserLayer::showExportResult from 0x1004877e0 to 0x100487966 (390 bytes)
//
// 1 xrefs:
// > LevelBrowserLayer::onExportSelected @ 0x100482c5d
//
// 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:30:43 +0000
//
void __fastcall LevelBrowserLayer::showExportResult(__int64 a1, int a2)
{
__int64 v2; // rax
const std::string::value_type *CString; // rax
char *v4; // rax
std::string::pointer v5; // rdi
__int64 v6; // rax
__int128 v7; // [rsp+0h] [rbp-70h] BYREF
void *__p; // [rsp+10h] [rbp-60h]
_QWORD v9[2]; // [rsp+18h] [rbp-58h] BYREF
char *v10; // [rsp+28h] [rbp-48h]
__int128 v11; // [rsp+30h] [rbp-40h] BYREF
void *data; // [rsp+40h] [rbp-30h]
std::string v13; // [rsp+50h] [rbp-20h] BYREF
if ( a2 <= 0 )
{
if ( !a2 )
{
v10 = (char *)operator new(0x20u);
v9[0] = 33;
v9[1] = 24;
strcpy(v10, "Failed to export levels.");
v6 = sub_100493AB0(0, "Error", v9, "OK", 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);
if ( (v9[0] & 1) != 0 )
{
v5 = v10;
goto LABEL_17;
}
}
return;
}
memset(&v13, 0, sizeof(v13));
if ( a2 == 1 )
{
std::string::assign(&v13, "Level exported!");
}
else
{
v2 = sub_10088E820("%i levels exported!", v7);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v2);
std::string::assign(&v13, CString);
}
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(&v11, v13.__r_.__value_.__l.__data_, v13.__r_.__value_.__l.__size_);
}
else
{
data = v13.__r_.__value_.__l.__data_;
v11 = *(_OWORD *)&v13.__r_.__value_.__l.0;
}
LOWORD(v7) = 0;
v4 = TextAlertPopup::create(&v11, 0x96u, &v7, 0.5, 0.60000002);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v4, 100);
if ( (v7 & 1) != 0 )
{
operator delete(__p);
if ( (v11 & 1) == 0 )
{
LABEL_12:
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_16;
return;
}
}
else if ( (v11 & 1) == 0 )
{
goto LABEL_12;
}
operator delete(data);
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
{
LABEL_16:
v5 = v13.__r_.__value_.__l.__data_;
LABEL_17:
operator delete(v5);
}
}