//
// LevelLeaderboard::loadLeaderboardFailed from 0xa828d8 to 0xa82a4c (372 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'LevelLeaderboard::loadLeaderboardFailed @ 0xa82a50
// > ??> @ 0xf1d50
// > ??> @ 0x14977c8
//
// 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:00:32 +0000
//
__int64 __fastcall LevelLeaderboard::loadLeaderboardFailed(LevelLeaderboard *this, char *a2)
{
PlatformToolbox *v4; // x0
_BOOL8 isNetworkAvailable; // x0
__int64 *v6; // x22
__int64 v7; // x0
__int64 *v8; // x22
__int64 v9; // [xsp+30h] [xbp+30h] BYREF
__int64 v10; // [xsp+38h] [xbp+38h]
void *v11; // [xsp+40h] [xbp+40h]
if ( LevelLeaderboard::isCorrect(this, a2) )
{
v4 = (PlatformToolbox *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 89) + 344LL))(
*((_QWORD *)this + 89),
0);
isNetworkAvailable = PlatformToolbox::isNetworkAvailable(v4);
if ( isNetworkAvailable )
{
v7 = GJAccountManager::sharedState((GJAccountManager *)isNetworkAvailable);
if ( *(_DWORD *)(v7 + 352) - *(_DWORD *)(v7 + 356) > 0 )
{
LABEL_9:
(*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 91) + 344LL))(
*((_QWORD *)this + 91),
*((_DWORD *)this + 172) != 3);
return _stack_chk_guard;
}
v8 = *((__int64 **)this + 90);
v9 = 0;
v10 = 0;
v11 = nullptr;
std::string::__init(&v9, "Create an account to\ncompare scores\nwith other players!", 0x47u);
TextArea::setString(v8, (char *)&v9);
}
else
{
v6 = *((__int64 **)this + 90);
v9 = 0;
v10 = 0;
v11 = nullptr;
std::string::__init(&v9, "No Internet connection!", 0x1Fu);
TextArea::setString(v6, (char *)&v9);
}
if ( (v9 & 1) != 0 )
operator delete(v11);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 90) + 344LL))(*((_QWORD *)this + 90), 1);
goto LABEL_9;
}
return _stack_chk_guard;
}