//
// LevelBadgePopup::loadLevelsFailed from 0x10093c020 to 0x10093c1a4 (388 bytes)
//
// 2 xrefs:
// > sub_10093C1E0 @ 0x10093c1ec
// > ??> @ 0x100bc3d48
//
// 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:38:29 +0000
//
int __fastcall LevelBadgePopup::loadLevelsFailed(__int64 a1, const char *a2)
{
size_t v3; // rax
unsigned int v4; // ecx
const void *v5; // rdi
__int64 v6; // rdi
__int64 v7; // r14
__int64 v8; // r15
const char *v9; // rsi
char *v10; // rax
__int128 v12; // [rsp+8h] [rbp-48h] BYREF
void *v13; // [rsp+18h] [rbp-38h]
__int128 v14; // [rsp+20h] [rbp-30h] BYREF
void *__p; // [rsp+30h] [rbp-20h]
if ( a2 )
{
v3 = strlen(a2);
v4 = *(unsigned __int8 *)(a1 + 696);
if ( (v4 & 1) != 0 )
{
if ( v3 != *(_QWORD *)(a1 + 704) )
return v3;
if ( v3 == -1 )
sub_100056810();
v5 = *(const void **)(a1 + 712);
}
else
{
if ( v3 != v4 >> 1 )
return v3;
v5 = (const void *)(a1 + 697);
}
LODWORD(v3) = memcmp(v5, a2, v3);
if ( (_DWORD)v3 )
return v3;
}
if ( *(_QWORD *)(GameLevelManager::sharedState() + 1224) == a1 + 664 )
*(_QWORD *)(GameLevelManager::sharedState() + 1224) = 0;
v6 = *(_QWORD *)(a1 + 720);
if ( v6 )
{
LoadingCircle::fadeAndRemove(v6);
*(_QWORD *)(a1 + 720) = 0;
}
v7 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector() + 272);
v8 = *(unsigned __int8 *)(a1 + 676);
v9 = "Level not found";
if ( *(_BYTE *)(a1 + 676) )
v9 = "List not found";
LOBYTE(v12) = 2 * (v8 ^ 0xF);
memcpy((char *)&v12 + 1, v9, v8 ^ 0xF);
((_BYTE *)&v12 - v8)[16] = 0;
LOWORD(v14) = 0;
v10 = TextAlertPopup::create(&v12, 0x96u, &v14, 0.5, 0.60000002);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v7 + 464LL))(v7, v10, 1000);
if ( (v14 & 1) != 0 )
operator delete(__p);
if ( (v12 & 1) != 0 )
operator delete(v13);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
LODWORD(v3) = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
return v3;
}