//
// LevelLeaderboard::loadLeaderboardFailed from 0x14042a850 to 0x14042a95a (266 bytes)
//
// 2 xrefs:
// > ??> @ 0x14078d8c8
// > ??> @ 0x140926abc
//
// 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 11:32:12 +0000
//
__int64 __fastcall LevelLeaderboard::loadLeaderboardFailed(__int64 a1, _BYTE *a2)
{
__int64 result; // rax
__int64 v4; // rax
__int64 v5; // rdx
__int64 v6; // rdx
__int128 v7; // [rsp+20h] [rbp-28h] BYREF
__int64 v8; // [rsp+30h] [rbp-18h]
__int64 v9; // [rsp+38h] [rbp-10h]
result = LevelLeaderboard::isCorrect(a1 - 664, a2);
if ( (_BYTE)result )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 48) + 336LL))(*(_QWORD *)(a1 + 48), 0);
v4 = GJAccountManager::sharedState();
if ( *(_DWORD *)(v4 + 360) - *(_DWORD *)(v4 + 364) <= 0 )
{
v7 = 0;
*(_QWORD *)&v7 = sub_14003D460(0x50u);
v8 = 71;
v9 = 79;
strcpy((char *)v7, "Create an account to\ncompare scores\nwith other players!");
TextArea::setString(*(__int64 **)(a1 + 56), (__int64)&v7);
LOBYTE(v6) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 56) + 336LL))(*(_QWORD *)(a1 + 56), v6);
}
LOBYTE(v5) = *(_DWORD *)(a1 + 24) != 3;
return (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 64) + 336LL))(*(_QWORD *)(a1 + 64), v5);
}
return result;
}