//
// GJLocalLevelScoreCell::loadFromScore from 0x43135c to 0x431556 (506 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x4341ba
//
// 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:48:15 +0000
//
int __fastcall GJLocalLevelScoreCell::loadFromScore(GJLocalLevelScoreCell *this, GJLocalScore *a2)
{
int v4; // r3
int *v5; // r7
int v6; // r0
int v7; // r1
cocos2d::CCLabelBMFont *v8; // r2
int v9; // r0
int v10; // r1
cocos2d::CCLabelBMFont *v11; // r2
const char *v12; // r7
size_t v13; // r0
const char *v14; // r1
cocos2d::CCSprite *v15; // r0
int v16; // r8
void (__fastcall *v17)(int, _BYTE *); // r10
const char *v18; // r2
cocos2d::CCLabelBMFont *v19; // r0
cocos2d::CCLabelBMFont *v20; // r8
void (__fastcall *v21)(cocos2d::CCLabelBMFont *, _BYTE *); // r10
void (__fastcall *v22)(cocos2d::CCLabelBMFont *, _BYTE *); // r10
_BYTE v24[8]; // [sp+4h] [bp-3Ch] BYREF
int v25; // [sp+Ch] [bp-34h] BYREF
int v26; // [sp+10h] [bp-30h]
cocos2d::CCLabelBMFont *v27; // [sp+14h] [bp-2Ch]
int v28; // [sp+18h] [bp-28h] BYREF
int v29; // [sp+1Ch] [bp-24h]
cocos2d::CCLabelBMFont *v30; // [sp+20h] [bp-20h]
int v31; // [sp+24h] [bp-1Ch] BYREF
int v32; // [sp+28h] [bp-18h]
cocos2d::CCLabelBMFont *v33; // [sp+2Ch] [bp-14h]
int v34[2]; // [sp+30h] [bp-10h] BYREF
cocos2d::CCSprite *v35; // [sp+38h] [bp-8h]
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1);
*((_DWORD *)this + 105) = a2;
v25 = 0;
v26 = 0;
v27 = nullptr;
std::string::__init(&v25, &unk_B6B226, 0);
v4 = *((_DWORD *)this + 105);
if ( *(_DWORD *)(v4 + 56) )
{
v5 = &v31;
GameToolbox::pointsToString((GameToolbox *)&v31, *(_DWORD *)(v4 + 52));
if ( (v25 & 1) != 0 )
{
*(_BYTE *)v27 = 0;
v26 = 0;
}
else
{
LOWORD(v25) = 0;
}
std::string::reserve(&v25, 0);
v9 = v31;
v10 = v32;
v11 = v33;
v31 = 0;
v32 = 0;
v33 = nullptr;
v25 = v9;
v26 = v10;
v27 = v11;
}
else
{
v5 = &v28;
GameToolbox::msToTimeString((GameToolbox *)&v28, *(_DWORD *)(v4 + 52), 1);
if ( (v25 & 1) != 0 )
{
*(_BYTE *)v27 = 0;
v26 = 0;
}
else
{
LOWORD(v25) = 0;
}
std::string::reserve(&v25, 0);
v6 = v28;
v7 = v29;
v8 = v30;
v28 = 0;
v29 = 0;
v30 = nullptr;
v25 = v6;
v26 = v7;
v27 = v8;
}
std::string::~string((int)v5);
if ( *(_DWORD *)(*((_DWORD *)this + 105) + 56) == 1 )
v12 = "GJ_pointsIcon_001.png";
else
v12 = "GJ_timeIcon_001.png";
v34[0] = 0;
v34[1] = 0;
v35 = nullptr;
v13 = strlen(v12);
std::string::__init(v34, v12, v13);
if ( (v34[0] & 1) != 0 )
v15 = v35;
else
v15 = (cocos2d::CCSprite *)((char *)v34 + 1);
v16 = cocos2d::CCSprite::createWithSpriteFrameName(v15, v14);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 80))(v16, 1057803469);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v16, 20);
v17 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v16 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, 20.0, *((float *)this + 101) * 0.5);
v17(v16, v24);
if ( (v25 & 1) != 0 )
v19 = v27;
else
v19 = (cocos2d::CCLabelBMFont *)((char *)&v25 + 1);
v20 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v19, "bigFont.fnt", v18);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 103) + 232))(
*((_DWORD *)this + 103),
v20,
2);
v21 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v20 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, 0.0, 0.5);
v21(v20, v24);
cocos2d::CCLabelBMFont::limitLabelWidth(v20, 200.0, 0.46, 0.0);
v22 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v20 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, 40.0, (float)(*((float *)this + 101) * 0.5) + 0.5);
v22(v20, v24);
std::string::~string((int)v34);
return std::string::~string((int)&v25);
}