//
// LevelBadgePopup::loadLevelsFailed from 0xc7146c to 0xc71648 (476 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'LevelBadgePopup::loadLevelsFailed @ 0xc71650
// > ??> @ 0xe4eb0
// > ??> @ 0x14edb68
//
// 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 13:05:30 +0000
//
__int64 __fastcall LevelBadgePopup::loadLevelsFailed(LevelBadgePopup *this, char *a2)
{
GameLevelManager *v4; // x0
size_t v5; // x0
size_t v6; // x4
cocos2d::CCNode **v8; // x0
__int64 v9; // x21
void (__fastcall *v10)(__int64, __int64, __int64); // x24
const char *v11; // x1
size_t v12; // x0
__int64 v13; // x0
char *v14; // [xsp+48h] [xbp+48h]
__int64 v15[2]; // [xsp+58h] [xbp+58h] BYREF
void *v16; // [xsp+68h] [xbp+68h]
__int64 v17[2]; // [xsp+70h] [xbp+70h] BYREF
void *v18; // [xsp+80h] [xbp+80h]
v4 = (GameLevelManager *)_stack_chk_guard;
if ( !a2 )
goto LABEL_7;
v5 = strlen(a2);
v6 = *((_BYTE *)this + 696) >> 1;
if ( (*((_BYTE *)this + 696) & 1) != 0 )
v6 = *((_QWORD *)this + 88);
if ( v6 == v5 )
{
v4 = (GameLevelManager *)std::string::compare((__int64)this + 696, 0, 0xFFFFFFFFFFFFFFFFLL, a2, v6);
if ( !(_DWORD)v4 )
{
LABEL_7:
if ( *(LevelBadgePopup **)(GameLevelManager::sharedState(v4) + 1224) == (LevelBadgePopup *)((char *)this + 664) )
*(_QWORD *)(GameLevelManager::sharedState((LevelBadgePopup *)((char *)this + 664)) + 1224) = 0;
v8 = *((cocos2d::CCNode ***)this + 90);
if ( v8 )
{
v8 = (cocos2d::CCNode **)LoadingCircle::fadeAndRemove(v8);
*((_QWORD *)this + 90) = 0;
}
v9 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v8) + 272);
v10 = *(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v9 + 464LL);
if ( *((_BYTE *)this + 676) )
v11 = "List not found";
else
v11 = "Level not found";
v14 = (char *)v11;
v15[0] = 0;
v15[1] = 0;
v16 = nullptr;
v12 = strlen(v11);
std::string::__init(v15, v14, v12);
v17[0] = 0;
v17[1] = 0;
v18 = nullptr;
std::string::__init(v17, &byte_11B8890, 0);
v13 = TextAlertPopup::create((char *)v15, 150, (char *)v17, 0.5, 0.6);
v10(v9, v13, 1000);
if ( (v17[0] & 1) != 0 )
operator delete(v18);
if ( (v15[0] & 1) != 0 )
operator delete(v16);
LevelBadgePopup::onClose(this, nullptr);
}
}
return _stack_chk_guard;
}