//
// GJLevelScoreCell::loadFromScore from 0x100230e60 to 0x100231757 (2295 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x100228340
//
// 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 12:27:10 +0000
//
void __fastcall GJLevelScoreCell::loadFromScore(__int64 a1, __int64 a2)
{
double v2; // xmm0_8
_BYTE *v3; // r14
__int64 v4; // rdx
double v5; // xmm0_8
__int64 v6; // rax
double v7; // xmm0_8
__int16 v8; // ax
std::string::value_type v9; // eax^2
__int64 v10; // rdx
double v11; // xmm0_8
__int64 v12; // rax
double v13; // xmm0_8
__int16 v14; // ax
std::string::value_type v15; // eax^2
__int64 v16; // rax
char v17; // cl
__int64 v18; // rsi
int v19; // edx
int v20; // ecx
int v21; // r8d
int v22; // r9d
__int64 v23; // r13
__int64 v24; // r15
int v25; // esi
__int64 v26; // rax
__int64 CString; // rax
__int64 v28; // rbx
__int64 v29; // rax
std::string::pointer v30; // rdi
const char *v31; // rcx
bool v32; // zf
const std::string::value_type *v33; // rsi
std::string::pointer data; // rdi
__int64 v35; // rbx
__int64 v36; // r12
float v37; // xmm0_4
float v38; // xmm1_4
__int64 v39; // r14
float v40; // xmm0_4
__int64 v41; // rbx
__int64 v42; // rdi
__int64 v43; // rax
__int64 v44; // rax
const std::string::value_type *v45; // rax
std::string::pointer v46; // rdi
__int64 v47; // r14
int v48; // r12d
int v49; // r13d
__int64 v50; // rbx
__int64 v51; // r15
__int64 v52; // rax
__int64 v53; // rax
__int64 v54; // rax
__int64 v55; // r14
char v56[8]; // [rsp+0h] [rbp-90h] BYREF
__int64 v57; // [rsp+8h] [rbp-88h]
_BYTE v58[8]; // [rsp+14h] [rbp-7Ch] BYREF
float v59; // [rsp+1Ch] [rbp-74h]
float v60; // [rsp+20h] [rbp-70h]
float v61; // [rsp+24h] [rbp-6Ch]
_BYTE v62[8]; // [rsp+28h] [rbp-68h] BYREF
std::string v63; // [rsp+30h] [rbp-60h] BYREF
__int64 v64; // [rsp+48h] [rbp-48h]
std::string v65; // [rsp+50h] [rbp-40h] BYREF
v2 = (*(double (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 536) + 584LL))(*(_QWORD *)(a1 + 536), 1);
*(_QWORD *)(a1 + 552) = a2;
v3 = (_BYTE *)SimplePlayer::create(1, v2);
(*(void (__fastcall **)(_QWORD, _BYTE *, __int64))(**(_QWORD **)(a1 + 536) + 464LL))(*(_QWORD *)(a1 + 536), v3, 1);
(*(void (__fastcall **)(_BYTE *, float))(*(_QWORD *)v3 + 160LL))(v3, 0.80000001);
sub_100278250(&v65, 60.0, (float)(*(float *)(a1 + 524) * 0.5) + 0.0);
(*(void (__fastcall **)(_BYTE *, std::string *))(*(_QWORD *)v3 + 184LL))(v3, &v65);
*(_QWORD *)&v5 = GameManager::sharedState(v3, &v65, v4).u64[0];
*(_QWORD *)&v7 = GameManager::colorForIdx(v6, *(unsigned int *)(*(_QWORD *)(a1 + 552) + 416LL), v5).u64[0];
*(_WORD *)&v65.__r_.__value_.__l.0 = v8;
v65.__r_.__value_.__s.__data_[1] = v9;
(*(void (__fastcall **)(_BYTE *, std::string *, double))(*(_QWORD *)v3 + 960LL))(v3, &v65, v7);
*(_QWORD *)&v11 = GameManager::sharedState(v3, &v65, v10).u64[0];
*(_QWORD *)&v13 = GameManager::colorForIdx(v12, *(unsigned int *)(*(_QWORD *)(a1 + 552) + 420LL), v11).u64[0];
*(_WORD *)&v65.__r_.__value_.__l.0 = v14;
v65.__r_.__value_.__s.__data_[1] = v15;
SimplePlayer::setSecondColor(v3, &v65);
SimplePlayer::tryEnableCustomGlowColor(v3, *(unsigned int *)(*(_QWORD *)(a1 + 552) + 424LL), v13);
v64 = a1;
v16 = *(_QWORD *)(a1 + 552);
v17 = 1;
if ( *(_DWORD *)(v16 + 428) != 2 )
v17 = *(_BYTE *)(v16 + 672);
v3[660] = v17;
v18 = *(unsigned int *)(v16 + 412);
SimplePlayer::updatePlayerFrame(v3, v18, *(unsigned int *)(v16 + 432), v13);
SimplePlayer::updateColors(v3);
v23 = sub_1008735E0(0, v18, v19, v20, v21, v22);
v24 = v64;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v64 + 536) + 456LL))(*(_QWORD *)(v64 + 536), v23);
sub_100278250(v58, 22.0, *(float *)(v64 + 524) * 0.5);
v25 = *(_DWORD *)(*(_QWORD *)(v24 + 552) + 396LL);
if ( v25 >= 4 )
{
v26 = sub_10088E820("%i", v56[0]);
CString = cocos2d::CCString::getCString(v26);
v28 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v24 + 536) + 456LL))(*(_QWORD *)(v24 + 536), v28);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v28 + 184LL))(v28, v58);
cocos2d::CCLabelBMFont::limitLabelWidth(v28, 20.0, 0.75, 0.0);
v29 = *(_QWORD *)(v24 + 552);
if ( (*(_BYTE *)(v29 + 320) & 1) == 0 )
goto LABEL_5;
LABEL_17:
sub_10001AD30(&v65, *(const void **)(v29 + 336), *(_QWORD *)(v29 + 328));
if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_6;
goto LABEL_18;
}
memset(&v65, 0, sizeof(v65));
v31 = "rankIcon_top100_001.png";
if ( v25 == 2 )
v31 = "rankIcon_top50_001.png";
v32 = v25 == 1;
v33 = "rankIcon_top10_001.png";
if ( !v32 )
v33 = v31;
std::string::assign(&v65, v33);
if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) != 0 )
data = v65.__r_.__value_.__l.__data_;
else
data = v65.__r_.__value_.__s.__data_;
v35 = cocos2d::CCSprite::createWithSpriteFrameName(data);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v64 + 536) + 456LL))(*(_QWORD *)(v64 + 536), v35);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v35 + 184LL))(v35, v58);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v35 + 160LL))(v35, 0.80000001);
if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v65.__r_.__value_.__l.__data_);
v29 = *(_QWORD *)(v64 + 552);
if ( (*(_BYTE *)(v29 + 320) & 1) != 0 )
goto LABEL_17;
LABEL_5:
v65 = *(std::string *)(v29 + 320);
if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_6:
v30 = v65.__r_.__value_.__s.__data_;
goto LABEL_19;
}
LABEL_18:
v30 = v65.__r_.__value_.__l.__data_;
LABEL_19:
v36 = cocos2d::CCLabelBMFont::create_3(v30, "goldFont.fnt");
if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v65.__r_.__value_.__l.__data_);
if ( *(_DWORD *)(*(_QWORD *)(v64 + 552) + 832LL) == 1 )
{
v37 = 100.0;
v38 = 0.69999999;
}
else
{
v37 = 130.0;
v38 = 0.80000001;
}
cocos2d::CCLabelBMFont::limitLabelWidth(v36, v37, v38, 0.0);
v57 = CCMenuItemSpriteExtra::create(v36, 0, v64, GJLevelScoreCell::onViewProfile, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v23 + 456LL))(v23, v57);
v60 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v36 + 328LL))(v36);
v61 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v36 + 168LL))(v36);
v39 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v3 + 192LL))(v3);
sub_100278250(&v65, 30.0, 0.0);
sub_100278350(v56, v39, &v65);
v59 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v36 + 328LL))(v36) * 0.5;
v40 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v36 + 168LL))(v36);
sub_100278250(v62, v40 * v59, 0.0);
sub_100278350(&v63, v56, v62);
cocos2d::CCNode::convertToNodeSpace(&v65, v23, &v63);
v41 = v64;
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v57 + 184LL))(v57, &v65);
if ( (unsigned __int8)GJUserScore::isCurrentUser(*(_QWORD *)(v41 + 552)) )
{
v42 = *(_QWORD *)(v41 + 528);
v65.__r_.__value_.__s.__data_[1] = 10;
*(_WORD *)&v65.__r_.__value_.__l.0 = -26906;
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v42 + 1216LL))(v42, &v65);
}
v43 = *(_QWORD *)(v41 + 552);
*(_WORD *)&v65.__r_.__value_.__l.0 = 0;
if ( *(_DWORD *)(v43 + 832) == 1 )
{
if ( *(_DWORD *)(v43 + 836) )
GameToolbox::pointsToString(&v63);
else
GameToolbox::msToTimeString(&v63);
if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v65.__r_.__value_.__l.__data_);
v65 = v63;
if ( (*(_BYTE *)&v63.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_35;
LABEL_30:
v46 = v65.__r_.__value_.__l.__data_;
goto LABEL_36;
}
v44 = sub_10088E820("%i%%", v56[0]);
v45 = (const std::string::value_type *)cocos2d::CCString::getCString(v44);
std::string::assign(&v65, v45);
if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_30;
LABEL_35:
v46 = v65.__r_.__value_.__s.__data_;
LABEL_36:
v47 = cocos2d::CCLabelBMFont::create_3(v46, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v64 + 536) + 464LL))(*(_QWORD *)(v64 + 536), v47, 2);
if ( *(_DWORD *)(*(_QWORD *)(v64 + 552) + 832LL) == 1 )
{
sub_100278250(&v63, 1.0, 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v47 + 296LL))(v47, &v63);
cocos2d::CCLabelBMFont::limitLabelWidth(v47, 85.0, 0.5, 0.0);
sub_100278250(&v63, *(float *)(v64 + 520) + -60.0, *(float *)(v64 + 524) * 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v47 + 184LL))(v47, &v63);
}
else
{
sub_100278250(&v63, 0.0, 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v47 + 296LL))(v47, &v63);
cocos2d::CCLabelBMFont::limitLabelWidth(v47, 200.0, 0.60000002, 0.0);
sub_100278250(v62, (float)(v60 * v61) + 6.0, -1.0);
sub_100278350(&v63, v56, v62);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v47 + 184LL))(v47, &v63);
v48 = *(_DWORD *)(*(_QWORD *)(v64 + 552) + 404LL);
if ( v48 > 0 )
{
v49 = 65;
do
{
v50 = cocos2d::CCSprite::createWithSpriteFrameName("usercoin_small01_001.png");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v64 + 536) + 456LL))(*(_QWORD *)(v64 + 536), v50);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v50 + 160LL))(v50, 0.89999998);
v51 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v47 + 192LL))(v47);
sub_100278250(v62, (float)v49, 5.0);
sub_100278350(&v63, v51, v62);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v50 + 184LL))(v50, &v63);
v49 += 8;
--v48;
}
while ( v48 );
}
}
v52 = *(_QWORD *)(v64 + 552);
if ( (*(_BYTE *)(v52 + 728) & 1) != 0 )
sub_10001AD30(&v63, *(const void **)(v52 + 744), *(_QWORD *)(v52 + 736));
else
v63 = *(std::string *)(v52 + 728);
v53 = sub_10088E820("%s ago", v56[0]);
v54 = cocos2d::CCString::getCString(v53);
v55 = cocos2d::CCLabelBMFont::create_3(v54, "chatFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v64 + 536) + 464LL))(*(_QWORD *)(v64 + 536), v55, 1);
sub_100278250(v62, 1.0, 0.5);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v55 + 296LL))(v55, v62);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v55 + 160LL))(v55, 0.5);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v55 + 1072LL))(v55, &unk_100A064E0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v55 + 1024LL))(v55, 125);
sub_100278250(v62, *(float *)(v64 + 520) + -11.0, 10.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v55 + 184LL))(v55, v62);
if ( *(_DWORD *)(*(_QWORD *)(v64 + 552) + 832LL) == 1 )
cocos2d::CCLabelBMFont::limitLabelWidth(v55, 35.0, 0.5, 0.0);
if ( (*(_BYTE *)&v63.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v63.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v65.__r_.__value_.__l.__data_);
}