//
// LeaderboardsLayer::loadLeaderboardFinished from 0x1003b1d94 to 0x1003b1e4c (184 bytes)
//
// 2 xrefs:
// > sub_1003B1F24 @ 0x1003b1f28
// > ??> @ 0x10080e558
//
// 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 __fastcall LeaderboardsLayer::loadLeaderboardFinished(LeaderboardsLayer *a1, cocos2d::CCArray *a2, const char *a3)
{
char isCorrect; // w0
char v6; // w21
cocos2d::CCArray *m_userScores; // x0
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v9; // [xsp+1Fh] [xbp-21h]
sub_100009900(__p, (char *)a3);
isCorrect = LeaderboardsLayer::isCorrect(a1, __p);
v6 = isCorrect;
if ( v9 < 0 )
{
operator delete(__p[0]);
if ( (v6 & 1) == 0 )
return;
}
else if ( (isCorrect & 1) == 0 )
{
return;
}
m_userScores = a1->m_userScores;
if ( m_userScores )
{
cocos2d::CCObject::release(m_userScores);
a1->m_userScores = nullptr;
}
a1->m_userScores = a2;
cocos2d::CCObject::retain(a2);
LeaderboardsLayer::setupLevelBrowser(a1, a1->m_userScores);
((void (__fastcall *)(LoadingCircle *, _QWORD))a1->m_circle->setVisible)(a1->m_circle, 0);
((void (__fastcall *)(TextArea *, _QWORD))a1->m_noInternet->setVisible)(a1->m_noInternet, 0);
}