//
// LeaderboardsLayer::loadLeaderboardFinished from 0x100458d74 to 0x100458e2c (184 bytes)
//
// 2 xrefs:
// > sub_100458F04 @ 0x100458f08
// > ??> @ 0x100967478
//
// 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 11:05:24 +0000
//
void __fastcall LeaderboardsLayer::loadLeaderboardFinished(__int64 a1, __int64 a2, char *__s)
{
char isCorrect; // w0
char v6; // w21
_DWORD *v7; // x0
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v9; // [xsp+1Fh] [xbp-21h]
sub_100009900(__p, __s);
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;
}
v7 = *(_DWORD **)(a1 + 432);
if ( v7 )
{
cocos2d::CCObject::release(v7);
*(_QWORD *)(a1 + 432) = 0;
}
*(_QWORD *)(a1 + 432) = a2;
cocos2d::CCObject::retain(a2);
LeaderboardsLayer::setupLevelBrowser((__int64 *)a1, *(_QWORD *)(a1 + 432));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 480) + 344LL))(*(_QWORD *)(a1 + 480), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 488) + 344LL))(*(_QWORD *)(a1 + 488), 0);
}