//
// LeaderboardsLayer::isCorrect from 0x1403dcce0 to 0x1403dce29 (329 bytes)
//
// 3 xrefs:
// > LeaderboardsLayer::loadLeaderboardFinished @ 0x1403dcae5
// > LeaderboardsLayer::loadLeaderboardFailed @ 0x1403dcb9f
// > ??> @ 0x140924ce0
//
// 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:31:39 +0000
//
// Hidden C++ exception states: #wind=2
_BOOL8 __fastcall LeaderboardsLayer::isCorrect(__int64 a1, _QWORD *a2)
{
int v4; // esi
cocos2d::CCString *v5; // rax
const char *CString; // rax
size_t v7; // r8
bool v8; // di
void *v9; // rcx
void *v11; // [rsp+30h] [rbp-58h]
void *Block[2]; // [rsp+40h] [rbp-48h] BYREF
__int64 v13; // [rsp+50h] [rbp-38h]
unsigned __int64 v14; // [rsp+58h] [rbp-30h]
v4 = 0;
if ( *(_DWORD *)(a1 + 440) != 3 )
v4 = *(_DWORD *)(a1 + 444);
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v11 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v11);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
}
v5 = cocos2d::CCString::createWithFormat("lb_%i_%i", *(_DWORD *)(a1 + 440), v4);
CString = cocos2d::CCString::getCString(v5);
*(_OWORD *)Block = 0;
v13 = 0;
v14 = 0;
v7 = -1;
do
++v7;
while ( CString[v7] );
sub_14003D230(Block, CString, v7);
v8 = sub_14003D160(Block, a2) == 0;
if ( v14 > 0xF )
{
v9 = Block[0];
if ( v14 + 1 >= 0x1000 )
{
v9 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
}
sub_14003D310((__int64)a2);
return v8;
}