//
// LevelLeaderboard::loadLeaderboardFailed from 0x931dec to 0x931fd8 (492 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'LevelLeaderboard::loadLeaderboardFailed @ 0x931fdc
// > ??> @ 0xb9508
// > ??> @ 0x11b0b88
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void LevelLeaderboard::loadLeaderboardFailed(LevelLeaderboard *a1, const char *a2)
{
TextArea *v3; // x22
char *v4; // x2
char *v5; // x0
GJAccountManager *v6; // x0
TextArea *m_noInternet; // x22
unsigned int *v8; // x2
int v9; // w1
unsigned int *v10; // x2
char *v11; // [xsp+40h] [xbp+40h] BYREF
if ( LevelLeaderboard::isCorrect(a1, a2) )
{
a1->m_circle->setVisible(a1->m_circle, 0);
if ( PlatformToolbox::isNetworkAvailable() )
{
v6 = GJAccountManager::sharedState();
if ( v6->m_accountID - v6->m_unkInt1 > 0 )
goto LABEL_6;
m_noInternet = a1->m_noInternet;
sub_D153B8((int)&v11, "Create an account to\ncompare scores\nwith other players!");
TextArea::setString((__int64)m_noInternet, (const void **)&v11);
v4 = v11;
v5 = v11 - 24;
if ( v11 - 24 == (char *)&qword_124B6B0 )
{
LABEL_4:
a1->m_noInternet->setVisible(a1->m_noInternet, 1);
LABEL_6:
a1->m_refreshBtn->setVisible(a1->m_refreshBtn, a1->m_type != Local);
return;
}
if ( &pthread_create )
{
v8 = (unsigned int *)(v11 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
goto LABEL_11;
}
}
else
{
v3 = a1->m_noInternet;
sub_D153B8((int)&v11, "No Internet connection!");
TextArea::setString((__int64)v3, (const void **)&v11);
v4 = v11;
v5 = v11 - 24;
if ( v11 - 24 == (char *)&qword_124B6B0 )
goto LABEL_4;
if ( &pthread_create )
{
v10 = (unsigned int *)(v11 - 8);
do
v9 = __ldaxr(v10);
while ( __stlxr(v9 - 1, v10) );
goto LABEL_11;
}
}
v9 = *((_DWORD *)v4 - 2);
*((_DWORD *)v4 - 2) = v9 - 1;
LABEL_11:
if ( v9 <= 0 )
operator delete(v5);
goto LABEL_4;
}
}