//
// LevelLeaderboard::getLocalScores from 0x614854 to 0x61494e (250 bytes)
//
// 1 xrefs:
// > LevelLeaderboard::loadScores @ 0x6150a4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:54 +0000
//
cocos2d::CCArray *__fastcall LevelLeaderboard::getLocalScores(LevelLeaderboard *this)
{
cocos2d::CCArray *v2; // r0
int v3; // r1
unsigned __int8 *v4; // r1
int v5; // r3
int v6; // r3
cocos2d::CCArray *v7; // r9
int v8; // r0
int v9; // r2
GJLocalScore **v10; // r6
GJLocalScore *v11; // r7
GJLocalScore *v12; // t1
cocos2d::CCObject *v13; // r8
int v14; // r11
GameManager *v15; // r0
GJLocalScore **v17; // [sp+4h] [bp-18h]
void *v18; // [sp+8h] [bp-14h] BYREF
GJLocalScore **v19; // [sp+Ch] [bp-10h]
int v20; // [sp+10h] [bp-Ch]
v2 = (cocos2d::CCArray *)cocos2d::CCArray::create(this);
v3 = *((_DWORD *)this + 132);
if ( *((_DWORD *)this + 134) == 1 )
v4 = (unsigned __int8 *)(v3 + 1112);
else
v4 = (unsigned __int8 *)(v3 + 1100);
v5 = *v4;
if ( (v5 & 1) != 0 )
v6 = *((_DWORD *)v4 + 1);
else
v6 = v5 >> 1;
v7 = v2;
if ( v6 )
{
v8 = *((_DWORD *)this + 132);
v18 = nullptr;
v19 = nullptr;
v20 = 0;
GJGameLevel::scoreStringToVector(v8, v4, &v18);
v10 = (GJLocalScore **)v18;
v17 = v19;
while ( v10 != v17 )
{
v12 = *v10++;
v11 = v12;
v13 = GJLocalScore::create(v12, *((_DWORD *)this + 134), v9);
v14 = *(_DWORD *)(*((_DWORD *)this + 132) + 956);
v15 = (GameManager *)GameManager::sharedState(v13);
if ( v14 == *((_DWORD *)v15 + 323) )
{
if ( !*((_DWORD *)this + 134)
&& (v15 = (GameManager *)GameManager::sharedState(v15), v11 == *((GJLocalScore **)v15 + 324))
|| *((_DWORD *)this + 134) == 1 && v11 == *(GJLocalScore **)(GameManager::sharedState(v15) + 1300) )
{
*((_BYTE *)v13 + 60) = 1;
}
}
cocos2d::CCArray::addObject(v7, v13);
}
if ( v18 )
{
v19 -= (unsigned int)((char *)v19 - (_BYTE *)v18) >> 2;
operator delete(v18);
}
}
return v7;
}