//
// LevelBrowserLayer::showExportResult from 0x7f7120 to 0x7f735c (572 bytes)
//
// 2 xrefs:
// > LevelBrowserLayer::onExportSelected @ 0x7f7414
// > ??> @ 0xaed18
//
// This function is hookable on this platform (idp: arm, 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:54:38 +0000
//
__int64 __fastcall LevelBrowserLayer::showExportResult(LevelBrowserLayer *this, const char *a2)
{
cocos2d::CCString *v3; // x0
char *CString; // x0
__int64 v5; // x1
void (__fastcall *v6)(LevelBrowserLayer *, __int64, __int64); // x23
__int64 v7; // x0
__int64 v9; // x0
__int64 v10; // [xsp+40h] [xbp+40h] BYREF
size_t v11; // [xsp+48h] [xbp+48h]
void *v12; // [xsp+50h] [xbp+50h]
__int64 v13; // [xsp+58h] [xbp+58h] BYREF
size_t v14; // [xsp+60h] [xbp+60h]
void *v15; // [xsp+68h] [xbp+68h]
__int64 v16; // [xsp+70h] [xbp+70h] BYREF
__int64 v17; // [xsp+78h] [xbp+78h]
void *v18; // [xsp+80h] [xbp+80h]
if ( (int)a2 <= 0 )
{
if ( !(_DWORD)a2 )
{
v16 = 0;
v17 = 0;
v18 = nullptr;
std::string::__init(&v16, "Failed to export levels.", 0x18u);
v9 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Error", (char *)&v16, (ButtonSprite *)"OK", nullptr);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 1312LL))(v9);
if ( (v16 & 1) != 0 )
operator delete(v18);
}
}
else
{
v10 = 0;
v11 = 0;
v12 = nullptr;
if ( (_DWORD)a2 == 1 )
{
std::string::assign(&v10, "Level exported!");
}
else
{
v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i levels exported!", a2);
CString = (char *)cocos2d::CCString::getCString(v3);
std::string::assign(&v10, CString);
}
v5 = *(_QWORD *)this;
v13 = 0;
v14 = 0;
v15 = nullptr;
v6 = *(void (__fastcall **)(LevelBrowserLayer *, __int64, __int64))(v5 + 464);
if ( (v10 & 1) != 0 )
{
std::string::__init(&v13, v12, v11);
}
else
{
v15 = v12;
v13 = v10;
v14 = v11;
}
v16 = 0;
v17 = 0;
v18 = nullptr;
std::string::__init(&v16, &byte_11B8890, 0);
v7 = TextAlertPopup::create(&v13, 150, &v16, 0.5, 0.6);
v6(this, v7, 100);
if ( (v16 & 1) != 0 )
operator delete(v18);
if ( (v13 & 1) != 0 )
operator delete(v15);
if ( (v10 & 1) != 0 )
operator delete(v12);
}
return _stack_chk_guard;
}