//
// GJLevelScoreCell::loadFromScore from 0x431580 to 0x431c34 (1716 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x4341a8
//
// 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 GJLevelScoreCell::loadFromScore(GJLevelScoreCell *this, GJUserScore *a2)
{
int v4; // r1
SimplePlayer *v5; // r11
int (__fastcall *v6)(SimplePlayer *, _DWORD *); // r5
GameManager *v7; // r0
int (__fastcall *v8)(SimplePlayer *, _DWORD *); // r7
GameManager *v9; // r0
int v10; // r0
GameManager *v11; // r0
GameManager *v12; // r0
int v13; // r0
int v14; // r3
char v15; // r3
cocos2d::CCMenuItem *v16; // r1
const cocos2d::CCPoint *v17; // r8
const char *v18; // r1
cocos2d::CCString *v19; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v21; // r2
cocos2d::CCLabelBMFont *v22; // r5
char *v23; // r1
const char *v24; // r1
cocos2d::CCSprite *v25; // r0
int v26; // r5
const char *v27; // r2
cocos2d::CCLabelBMFont *v28; // r0
cocos2d::CCLabelBMFont *v29; // r6
float v30; // r1
float v31; // r2
float v32; // s19
float v33; // s18
int v34; // r9
void (__fastcall *v35)(int, _BYTE *); // r11
float v36; // s17
float v37; // r0
int v38; // r0
void (__fastcall *v39)(int, _BYTE *); // r3
int v40; // r3
const char *v41; // r11
int v42; // r3
int *v43; // r6
int v44; // r0
int v45; // r1
cocos2d::CCLabelBMFont *v46; // r2
int v47; // r0
int v48; // r1
cocos2d::CCLabelBMFont *v49; // r2
cocos2d::CCString *v50; // r0
char *v51; // r0
cocos2d::CCLabelBMFont *v52; // r0
cocos2d::CCLabelBMFont *v53; // r6
int v54; // r3
void (__fastcall *v55)(cocos2d::CCLabelBMFont *, _BYTE *); // r9
void (__fastcall *v56)(cocos2d::CCLabelBMFont *, _BYTE *); // r9
void (__fastcall *v57)(cocos2d::CCLabelBMFont *, _BYTE *); // r11
void (__fastcall *v58)(cocos2d::CCLabelBMFont *, _BYTE *); // r11
const char *v59; // r1
int i; // r10
int v61; // r9
cocos2d::CCLabelBMFont *v62; // r1
cocos2d::CCString *v63; // r0
cocos2d::CCLabelBMFont *v64; // r0
const char *v65; // r2
cocos2d::CCLabelBMFont *v66; // r6
void (__fastcall *v67)(cocos2d::CCLabelBMFont *, _BYTE *); // r9
void (__fastcall *v68)(cocos2d::CCLabelBMFont *, _BYTE *); // r9
int v70; // [sp+Ch] [bp-80h]
int v71; // [sp+Ch] [bp-80h]
void (__fastcall *v72)(int, _BYTE *); // [sp+10h] [bp-7Ch]
int v73; // [sp+14h] [bp-78h]
_BYTE v74[8]; // [sp+24h] [bp-68h] BYREF
_BYTE v75[8]; // [sp+2Ch] [bp-60h] BYREF
_BYTE v76[8]; // [sp+34h] [bp-58h] BYREF
_BYTE v77[8]; // [sp+3Ch] [bp-50h] BYREF
_BYTE v78[8]; // [sp+44h] [bp-48h] BYREF
_DWORD v79[2]; // [sp+4Ch] [bp-40h] BYREF
int v80; // [sp+54h] [bp-38h] BYREF
int v81; // [sp+58h] [bp-34h]
cocos2d::CCLabelBMFont *v82; // [sp+5Ch] [bp-30h]
int v83; // [sp+60h] [bp-2Ch] BYREF
int v84; // [sp+64h] [bp-28h]
cocos2d::CCLabelBMFont *v85; // [sp+68h] [bp-24h]
int v86; // [sp+6Ch] [bp-20h] BYREF
int v87; // [sp+70h] [bp-1Ch]
cocos2d::CCLabelBMFont *v88; // [sp+74h] [bp-18h]
int v89[2]; // [sp+78h] [bp-14h] BYREF
cocos2d::CCLabelBMFont *v90; // [sp+80h] [bp-Ch]
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1);
*((_DWORD *)this + 105) = a2;
v5 = (SimplePlayer *)SimplePlayer::create((SimplePlayer *)((char *)&dword_0 + 1), v4);
(*(void (__fastcall **)(_DWORD, SimplePlayer *, int))(**((_DWORD **)this + 103) + 232))(
*((_DWORD *)this + 103),
v5,
1);
(*(void (__fastcall **)(SimplePlayer *, int))(*(_DWORD *)v5 + 80))(v5, 1061997773);
v6 = *(int (__fastcall **)(SimplePlayer *, _DWORD *))(*(_DWORD *)v5 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, 60.0, (float)(*((float *)this + 101) * 0.5) + 0.0);
v7 = (GameManager *)v6(v5, v79);
v8 = *(int (__fastcall **)(SimplePlayer *, _DWORD *))(*(_DWORD *)v5 + 480);
v9 = (GameManager *)GameManager::sharedState(v7);
v10 = GameManager::colorForIdx(v9, *(_DWORD *)(*((_DWORD *)this + 105) + 336));
LOWORD(v79[0]) = v10;
BYTE2(v79[0]) = BYTE2(v10);
v11 = (GameManager *)v8(v5, v79);
v12 = (GameManager *)GameManager::sharedState(v11);
v13 = GameManager::colorForIdx(v12, *(_DWORD *)(*((_DWORD *)this + 105) + 340));
LOWORD(v79[0]) = v13;
BYTE2(v79[0]) = BYTE2(v13);
SimplePlayer::setSecondColor(v5, v79);
SimplePlayer::tryEnableCustomGlowColor(v5, *(_DWORD *)(*((_DWORD *)this + 105) + 344));
v14 = *((_DWORD *)this + 105);
if ( *(_DWORD *)(v14 + 348) == 2 )
v15 = 1;
else
v15 = *(_BYTE *)(v14 + 504);
*((_BYTE *)v5 + 540) = v15;
SimplePlayer::updatePlayerFrame(
v5,
*(_DWORD *)(*((_DWORD *)this + 105) + 332),
*(_DWORD *)(*((_DWORD *)this + 105) + 352));
SimplePlayer::updateColors(v5);
v17 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(nullptr, v16);
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *))(**((_DWORD **)this + 103) + 228))(
*((_DWORD *)this + 103),
v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v74, 22.0, *((float *)this + 101) * 0.5);
v18 = *(const char **)(*((_DWORD *)this + 105) + 316);
if ( (int)v18 <= 3 )
{
v89[0] = 0;
v89[1] = 0;
v90 = nullptr;
if ( v18 == (_BYTE *)&dword_0 + 1 )
{
v23 = "rankIcon_top10_001.png";
}
else if ( v18 == (_BYTE *)&dword_0 + 2 )
{
v23 = "rankIcon_top50_001.png";
}
else
{
v23 = "rankIcon_top100_001.png";
}
std::string::assign(v89, v23);
if ( (v89[0] & 1) != 0 )
v25 = v90;
else
v25 = (cocos2d::CCSprite *)((char *)v89 + 1);
v26 = cocos2d::CCSprite::createWithSpriteFrameName(v25, v24);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v26);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v26 + 92))(v26, v74);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v26 + 80))(v26, 1061997773);
std::string::~string((int)v89);
}
else
{
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v18);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v19);
v22 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v21);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *))(**((_DWORD **)this + 103) + 228))(
*((_DWORD *)this + 103),
v22);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v22 + 92))(v22, v74);
cocos2d::CCLabelBMFont::limitLabelWidth(v22, 20.0, 0.75, 0.0);
}
std::string::basic_string(v89, *((_DWORD *)this + 105) + 264);
if ( (v89[0] & 1) != 0 )
v28 = v90;
else
v28 = (cocos2d::CCLabelBMFont *)((char *)v89 + 1);
v29 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v28, "goldFont.fnt", v27);
std::string::~string((int)v89);
if ( *(_DWORD *)(*((_DWORD *)this + 105) + 620) == 1 )
{
v30 = 100.0;
v31 = 0.7;
}
else
{
v30 = 130.0;
v31 = 0.8;
}
cocos2d::CCLabelBMFont::limitLabelWidth(v29, v30, v31, 0.0);
v79[0] = GJLevelScoreCell::onViewProfile;
v79[1] = 0;
v70 = CCMenuItemSpriteExtra::create((int)v29, 0, (int)this, (int)GJLevelScoreCell::onViewProfile, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v17 + 228))(v17, v70);
v32 = *(float *)(*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v29 + 164))(v29);
v33 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v29 + 84))(v29));
v34 = (*(int (__fastcall **)(SimplePlayer *))(*(_DWORD *)v5 + 96))(v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, 30.0, 0.0);
cocos2d::CCPoint::operator+(v75, v34, v78);
v35 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v70 + 92);
v36 = *(float *)(*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v29 + 164))(v29);
v37 = (*(float (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v29 + 84))(v29);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v76, (float)(v36 * 0.5) * v37, 0.0);
cocos2d::CCPoint::operator+(v77, v75, v76);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v78, v17);
v35(v70, v78);
if ( GJUserScore::isCurrentUser(*((GJUserScore **)this + 105)) )
{
v38 = *((_DWORD *)this + 102);
v39 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v38 + 608);
v78[0] = -26;
v78[1] = -106;
v78[2] = 10;
v39(v38, v78);
}
v40 = *((_DWORD *)this + 105);
v80 = 0;
v41 = *(const char **)(v40 + 300);
v81 = 0;
v82 = nullptr;
std::string::__init(&v80, &unk_B6B226, 0);
v42 = *((_DWORD *)this + 105);
if ( *(_DWORD *)(v42 + 620) == 1 )
{
if ( *(_DWORD *)(v42 + 624) )
{
v43 = &v86;
GameToolbox::pointsToString((GameToolbox *)&v86, (unsigned int)v41);
if ( (v80 & 1) != 0 )
{
*(_BYTE *)v82 = 0;
v81 = 0;
}
else
{
LOWORD(v80) = 0;
}
std::string::reserve(&v80, 0);
v47 = v86;
v48 = v87;
v49 = v88;
v86 = 0;
v87 = 0;
v88 = nullptr;
v80 = v47;
v81 = v48;
v82 = v49;
}
else
{
v43 = &v83;
GameToolbox::msToTimeString((GameToolbox *)&v83, (int)v41, 1);
if ( (v80 & 1) != 0 )
{
*(_BYTE *)v82 = 0;
v81 = 0;
}
else
{
LOWORD(v80) = 0;
}
std::string::reserve(&v80, 0);
v44 = v83;
v45 = v84;
v46 = v85;
v83 = 0;
v84 = 0;
v85 = nullptr;
v80 = v44;
v81 = v45;
v82 = v46;
}
std::string::~string((int)v43);
}
else
{
v50 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", v41);
v51 = (char *)cocos2d::CCString::getCString(v50);
std::string::assign(&v80, v51);
}
if ( (v80 & 1) != 0 )
v52 = v82;
else
v52 = (cocos2d::CCLabelBMFont *)((char *)&v80 + 1);
v53 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(
v52,
"bigFont.fnt",
(const char *)((unsigned __int8)v80 << 31));
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 103) + 232))(
*((_DWORD *)this + 103),
v53,
2);
v54 = *(_DWORD *)v53;
if ( *(_DWORD *)(*((_DWORD *)this + 105) + 620) == 1 )
{
v55 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(v54 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, 1.0, 0.5);
v55(v53, v78);
cocos2d::CCLabelBMFont::limitLabelWidth(v53, 85.0, 0.5, 0.0);
v56 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v53 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, *((float *)this + 100) - 60.0, *((float *)this + 101) * 0.5);
v56(v53, v78);
}
else
{
v57 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(v54 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, 0.0, 0.5);
v57(v53, v78);
cocos2d::CCLabelBMFont::limitLabelWidth(v53, 200.0, 0.6, 0.0);
v58 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v53 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, (float)(v32 * v33) + 6.0, -1.0);
cocos2d::CCPoint::operator+(v78, v75, v77);
v58(v53, v78);
v71 = *(_DWORD *)(*((_DWORD *)this + 105) + 324);
if ( v71 > 0 )
{
for ( i = 0; i != v71; ++i )
{
v61 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"usercoin_small01_001.png", v59);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v61);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v61 + 80))(v61, 1063675494);
v72 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v61 + 92);
v73 = (*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v53 + 96))(v53);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, (float)(8 * i + 65), 5.0);
cocos2d::CCPoint::operator+(v78, v73, v77);
v72(v61, v78);
}
}
}
std::string::basic_string(v89, *((_DWORD *)this + 105) + 560);
if ( (v89[0] & 1) != 0 )
v62 = v90;
else
v62 = (cocos2d::CCLabelBMFont *)((char *)v89 + 1);
v63 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s ago", (const char *)v62);
v64 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v63);
v66 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v64, "chatFont.fnt", v65);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 103) + 232))(
*((_DWORD *)this + 103),
v66,
1);
v67 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v66 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, 1.0, 0.5);
v67(v66, v78);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v66 + 80))(v66, 1056964608);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, char *))(*(_DWORD *)v66 + 536))(v66, &byte_BEB9C0);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v66 + 512))(v66, 125);
v68 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v66 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, *((float *)this + 100) - 11.0, 10.0);
v68(v66, v78);
if ( *(_DWORD *)(*((_DWORD *)this + 105) + 620) == 1 )
cocos2d::CCLabelBMFont::limitLabelWidth(v66, 35.0, 0.5, 0.0);
std::string::~string((int)v89);
return std::string::~string((int)&v80);
}