//
// LevelListLayer::updateStatsArt from 0x1002e2398 to 0x1002e3154 (3516 bytes)
//
// 6 xrefs:
// > LevelListLayer::init @ 0x1002e1940
// > LevelListLayer::onEnter @ 0x1002e31b0
// > LevelListLayer::loadLevelsFinished @ 0x1002e35a0
// > LevelListLayer::likedItem @ 0x1002e4048
// > LevelListLayer::iconSelectClosed @ 0x1002e4128
// > sub_1002E412C @ 0x1002e4140
//
// This function is hookable on this platform (idp: arm, 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:02:48 +0000
//
void __fastcall LevelListLayer::updateStatsArt(__int64 *a1)
{
__int64 v2; // x0
unsigned int *v3; // x9
__int64 v4; // x8
_QWORD *v5; // x20
unsigned __int64 v6; // x21
__int64 v7; // x20
__int64 v8; // x0
__int64 v9; // x21
void **v10; // x1
__int64 v11; // x0
__int64 v12; // x0
int v13; // w20
__int64 v14; // x0
int v15; // w22
__int64 v16; // x8
__int64 v17; // x0
int v18; // w26
int v19; // w25
void *v20; // x21
float *v21; // x23
int v22; // w8
float v23; // s8
float v24; // s11
__int64 v25; // x0
float v26; // s0
float v27; // s2
__int64 v28; // x0
const char *CString; // x0
__int64 v30; // x22
__n128 v31; // q0
float32x2_t *v32; // x23
double v33; // d0
void *v34; // x23
__int64 v35; // x0
__int64 v36; // x0
float v37; // s0
__int64 v38; // x0
__int64 v39; // x22
float32x2_t *v40; // x24
double v41; // d0
const char *v42; // x0
void *v43; // x22
float32x2_t *v44; // x23
float v45; // s10
double v46; // d0
__int64 v47; // x0
__int64 v48; // x23
float32x2_t *v49; // x24
double v50; // d0
void *v51; // x21
__n128 v52; // q0
float32x2_t *v53; // x20
double v54; // d0
__int64 v55; // x0
void *v56; // x20
float32x2_t *v57; // x21
double v58; // d0
void *v59; // x23
__n128 v60; // q0
float32x2_t *v61; // x21
double v62; // d0
void *v63; // x21
__n128 v64; // q0
float32x2_t *v65; // x22
double v66; // d0
int v67; // w0
__int64 v68; // x0
const char *v69; // x0
__int64 v70; // x22
__n128 v71; // q0
float32x2_t *v72; // x23
double v73; // d0
void *v74; // x23
void *v75; // x22
float v76; // s9
__int64 v77; // x0
float *v78; // x24
float v79; // s0
float32x2_t *v80; // x21
void *v81; // x21
float32x2_t *v82; // x23
double v83; // d0
__int64 v84; // x0
__int64 v85; // x23
float32x2_t *v86; // x21
double v87; // d0
float32x2_t v88; // [xsp+14h] [xbp-9Ch] BYREF
__int16 v89; // [xsp+1Ch] [xbp-94h] BYREF
char v90; // [xsp+1Eh] [xbp-92h]
__int64 v91; // [xsp+20h] [xbp-90h] BYREF
void *__p[2]; // [xsp+28h] [xbp-88h] BYREF
char v93; // [xsp+3Fh] [xbp-71h]
*((_BYTE *)a1 + 1008) = 0;
v2 = a1[122];
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
v4 = *v3;
if ( (_DWORD)v4 )
{
v5 = *((_QWORD **)v3 + 2);
v6 = (unsigned __int64)&v5[v4 - 1];
do
{
if ( !*v5 )
break;
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v5 + 536LL))(*v5);
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
v2 = a1[122];
}
}
sub_1002E7674(v2);
v7 = a1[123];
v9 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v8);
GJLevelList::frameForListDifficulty(*(_DWORD *)(a1[114] + 360), 2, __p);
if ( v93 >= 0 )
v10 = __p;
else
v10 = (void **)__p[0];
v11 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, v10);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 1160LL))(v7, v11);
if ( v93 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1[124] + 344LL))(a1[124], *(unsigned __int8 *)(a1[114] + 397));
v12 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v12, &v91);
v13 = sub_1000D6C98(a1[114]);
v14 = sub_1000D6C88(a1[114]);
v15 = v14;
v16 = a1[114];
if ( *(int *)(v16 + 384) < 1 || *(int *)(v16 + 388) < 1 )
{
v19 = 0;
v18 = 1;
}
else
{
v17 = GameStatsManager::sharedState(v14);
if ( (GameStatsManager::hasClaimedListReward(v17, a1[114]) & 1) != 0 )
{
v18 = 0;
v19 = 1;
}
else
{
v19 = 0;
v18 = 0;
v15 = *(_DWORD *)(a1[114] + 388);
}
}
v90 = 0;
v89 = 0;
v20 = cocos2d::CCSprite::create((__int64)"GJ_progressBar_001.png");
(*(void (__fastcall **)(void *, __int16 *))(*(_QWORD *)v20 + 960LL))(v20, &v89);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v20 + 912LL))(v20, 125);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v20 + 144LL))(v20, 0.8);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v20 + 128LL))(v20, 0.8);
(*(void (__fastcall **)(__int64 *, void *, __int64))(*a1 + 464))(a1, v20, 3);
sub_1002E74E0(a1[122], v20);
sub_1000262BC((float *)__p, *(float *)&v91 * 0.5, 16.0);
(*(void (__fastcall **)(void *, void **))(*(_QWORD *)v20 + 184LL))(v20, __p);
v21 = (float *)cocos2d::CCSprite::create((__int64)"GJ_progressBar_001.png");
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v21 + 128LL))(v21, 0.98);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v21 + 144LL))(v21, 0.76);
if ( v19 | v18 )
v22 = -16816;
else
v22 = 3298559;
BYTE2(__p[0]) = BYTE2(v22);
LOWORD(__p[0]) = v22;
(*(void (__fastcall **)(float *, void **))(*(_QWORD *)v21 + 960LL))(v21, __p);
(*(void (__fastcall **)(float *, __int64))(*(_QWORD *)v21 + 912LL))(v21, 225);
v23 = v21[108] - (float)(v21[108] * 0.98);
(*(void (__fastcall **)(void *, float *, __int64))(*(_QWORD *)v20 + 464LL))(v20, v21, 1);
v24 = 0.0;
sub_1000262BC((float *)__p, 0.0, 0.5);
(*(void (__fastcall **)(float *, void **))(*(_QWORD *)v21 + 296LL))(v21, __p);
v25 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v20 + 328LL))(v20);
sub_1000262BC((float *)__p, v23 * 0.5, *(float *)(v25 + 4) * 0.5);
(*(void (__fastcall **)(float *, void **))(*(_QWORD *)v21 + 184LL))(v21, __p);
if ( v15 >= 1 )
v24 = (float)v13 / (float)(unsigned int)v15;
v26 = v21[108];
if ( v26 <= (float)(v24 * v26) )
v27 = v21[108];
else
v27 = v24 * v26;
sub_1000262CC((float *)__p, 0.0, 0.0, v27, v21[109]);
(*(void (__fastcall **)(float *, void **))(*(_QWORD *)v21 + 1136LL))(v21, __p);
v28 = sub_1003065B0("%i/%i", v13, v15);
CString = (const char *)cocos2d::CCString::getCString(v28);
v30 = cocos2d::CCLabelBMFont::create_1(CString, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64, __int64))(*a1 + 464))(a1, v30, 4);
v31 = sub_1002E74E0(a1[122], v30);
v32 = (float32x2_t *)(*(__int64 (__fastcall **)(void *, __n128))(*(_QWORD *)v20 + 192LL))(v20, v31);
sub_1000262BC((float *)&v88, 0.0, 1.0);
*(float32x2_t *)&v33 = sub_100026318(v32, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v30 + 184LL))(v30, __p, v33);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v30 + 160LL))(v30, 0.5);
if ( *(_DWORD *)(a1[114] + 544) != 2 )
{
v34 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_downloadsIcon_001.png");
v35 = (*(__int64 (__fastcall **)(void *, float))(*(_QWORD *)v34 + 160LL))(v34, 0.8);
v36 = AppDelegate::get(v35);
v37 = 51.0;
if ( !*(_BYTE *)(v36 + 37) )
v37 = 26.0;
sub_1000262BC((float *)__p, v37, (float)(*((float *)&v91 + 1) * 0.5) + 88.0);
(*(void (__fastcall **)(void *, void **))(*(_QWORD *)v34 + 184LL))(v34, __p);
(*(void (__fastcall **)(__int64 *, void *, __int64))(*a1 + 464))(a1, v34, 1);
sub_1002E74E0(a1[122], v34);
GameToolbox::intToShortString(*(unsigned int *)(a1[114] + 352), __p);
if ( v93 >= 0 )
v38 = cocos2d::CCLabelBMFont::create_1((const char *)__p, "bigFont.fnt");
else
v38 = cocos2d::CCLabelBMFont::create_1((const char *)__p[0], "bigFont.fnt");
v39 = v38;
if ( v93 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v39 + 160LL))(v39, 0.4);
v40 = (float32x2_t *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v34 + 192LL))(v34);
sub_1000262BC((float *)&v88, 0.0, -21.0);
*(float32x2_t *)&v41 = sub_100026318(v40, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v39 + 184LL))(v39, __p, v41);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(*a1 + 464))(a1, v39, 1);
sub_1002E74E0(a1[122], v39);
if ( *(int *)(a1[114] + 356) < 0 )
v42 = "GJ_dislikesIcon_001.png";
else
v42 = "GJ_likesIcon_001.png";
v43 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v42);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v43 + 160LL))(v43, 0.8);
v44 = (float32x2_t *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v34 + 192LL))(v34);
if ( v19 | v18 )
v45 = -52.0;
else
v45 = -45.0;
sub_1000262BC((float *)&v88, 0.0, v45 + (float)((*(_DWORD *)(a1[114] + 356) >> 29) & 4));
*(float32x2_t *)&v46 = sub_100026318(v44, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(void *, void **, double))(*(_QWORD *)v43 + 184LL))(v43, __p, v46);
(*(void (__fastcall **)(__int64 *, void *, __int64))(*a1 + 464))(a1, v43, 1);
sub_1002E74E0(a1[122], v43);
GameToolbox::intToShortString(*(unsigned int *)(a1[114] + 356), __p);
if ( v93 >= 0 )
v47 = cocos2d::CCLabelBMFont::create_1((const char *)__p, "bigFont.fnt");
else
v47 = cocos2d::CCLabelBMFont::create_1((const char *)__p[0], "bigFont.fnt");
v48 = v47;
if ( v93 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 160LL))(v48, 0.4);
v49 = (float32x2_t *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v43 + 192LL))(v43);
sub_1000262BC((float *)&v88, 0.0, -21.0);
*(float32x2_t *)&v50 = sub_100026318(v49, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v48 + 184LL))(v48, __p, v50);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(*a1 + 464))(a1, v48, 1);
sub_1002E74E0(a1[122], v48);
if ( (v18 & 1) == 0 )
{
if ( (v19 & 1) != 0 )
{
v51 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_diamondsIcon_001.png");
(*(void (__fastcall **)(__int64 *, void *))(*a1 + 456))(a1, v51);
v52 = sub_1002E74E0(a1[122], v51);
v53 = (float32x2_t *)(*(__int64 (__fastcall **)(void *, __n128))(*(_QWORD *)v43 + 192LL))(v43, v52);
sub_1000262BC((float *)&v88, 0.0, -52.0);
*(float32x2_t *)&v54 = sub_100026318(v53, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(void *, void **, double))(*(_QWORD *)v51 + 184LL))(v51, __p, v54);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v51 + 160LL))(v51, 0.9);
GameToolbox::intToShortString(*(unsigned int *)(a1[114] + 384), __p);
if ( v93 >= 0 )
v55 = cocos2d::CCLabelBMFont::create_1((const char *)__p, "bigFont.fnt");
else
v55 = cocos2d::CCLabelBMFont::create_1((const char *)__p[0], "bigFont.fnt");
v56 = (void *)v55;
if ( v93 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v56 + 160LL))(v56, 0.4);
v57 = (float32x2_t *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v51 + 192LL))(v51);
sub_1000262BC((float *)&v88, 0.0, -21.0);
*(float32x2_t *)&v58 = sub_100026318(v57, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(void *, void **, double))(*(_QWORD *)v56 + 184LL))(v56, __p, v58);
(*(void (__fastcall **)(__int64 *, void *, __int64))(*a1 + 464))(a1, v56, 1);
}
else
{
v59 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"diamond_small01_001.png");
(*(void (__fastcall **)(__int64 *, void *, __int64))(*a1 + 464))(a1, v59, 10);
v60 = sub_1002E74E0(a1[122], v59);
v61 = (float32x2_t *)(*(__int64 (__fastcall **)(void *, __n128))(*(_QWORD *)v20 + 192LL))(v20, v60);
sub_1000262BC((float *)&v88, 125.0, 0.0);
*(float32x2_t *)&v62 = sub_100026318(v61, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(void *, void **, double))(*(_QWORD *)v59 + 184LL))(v59, __p, v62);
v63 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_completesIcon_001.png");
(*(void (__fastcall **)(__int64 *, void *))(*a1 + 456))(a1, v63);
v64 = sub_1002E74E0(a1[122], v63);
v65 = (float32x2_t *)(*(__int64 (__fastcall **)(void *, __n128))(*(_QWORD *)v43 + 192LL))(v43, v64);
sub_1000262BC((float *)&v88, 0.0, v45);
*(float32x2_t *)&v66 = sub_100026318(v65, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(void *, void **, double))(*(_QWORD *)v63 + 184LL))(v63, __p, v66);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v63 + 160LL))(v63, 0.8);
v67 = sub_1000D6C88(a1[114]);
v68 = sub_1003065B0("%i/%i", v13, v67);
v69 = (const char *)cocos2d::CCString::getCString(v68);
v70 = cocos2d::CCLabelBMFont::create_1(v69, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64))(*a1 + 456))(a1, v70);
v71 = sub_1002E74E0(a1[122], v70);
v72 = (float32x2_t *)(*(__int64 (__fastcall **)(void *, __n128))(*(_QWORD *)v63 + 192LL))(v63, v71);
sub_1000262BC((float *)&v88, 0.0, -21.0);
*(float32x2_t *)&v73 = sub_100026318(v72, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v70 + 184LL))(v70, __p, v73);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v70 + 160LL))(v70, 0.4);
v74 = cocos2d::CCNode::create();
sub_1000262C4((float *)__p, 50.0, 50.0);
(*(void (__fastcall **)(void *, void **))(*(_QWORD *)v74 + 320LL))(v74, __p);
v75 = cocos2d::CCNode::create();
(*(void (__fastcall **)(void *, void *))(*(_QWORD *)v75 + 320LL))(v75, &unk_1009F6148);
(*(void (__fastcall **)(void *, void *))(*(_QWORD *)v74 + 456LL))(v74, v75);
v76 = *(float *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v74 + 328LL))(v74) * 0.5;
v77 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v74 + 328LL))(v74);
sub_1000262BC((float *)__p, v76, *(float *)(v77 + 4) * 0.5);
(*(void (__fastcall **)(void *, void **))(*(_QWORD *)v75 + 184LL))(v75, __p);
if ( v13 >= *(_DWORD *)(a1[114] + 388) )
{
v78 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_rewardBtn_001.png");
}
else
{
sub_100009900(__p, "GJ_rewardBtn_001.png");
v78 = (float *)CCSpriteGrayscale::createWithSpriteFrameName((__int64 *)__p);
if ( v93 < 0 )
operator delete(__p[0]);
v79 = CCSpriteWithHue::setEvenLuminance(v78, 1.0);
BYTE2(__p[0]) = -81;
LOWORD(__p[0]) = -20561;
(*(void (__fastcall **)(float *, void **, float))(*(_QWORD *)v78 + 960LL))(v78, __p, v79);
}
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v78 + 160LL))(v78, 0.6);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v75 + 456LL))(v75, v78);
v56 = CCMenuItemSpriteExtra::create((__int64)v74, 0, (__int64)a1, (__int64)LevelListLayer::onClaimReward, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1[110] + 456LL))(a1[110], v56);
v80 = (float32x2_t *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v63 + 192LL))(v63);
sub_1000262BC((float *)&v88, 0.0, -54.0);
sub_100026318(v80, &v88, (float32x2_t *)__p);
sub_10002630C(a1 + 125, (double *)__p);
cocos2d::CCNode::convertToNodeSpace(a1[110], (__int64)(a1 + 125), __p);
(*(void (__fastcall **)(void *, void **))(*(_QWORD *)v56 + 184LL))(v56, __p);
v81 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"diamond_small01_001.png");
(*(void (__fastcall **)(void *, void *))(*(_QWORD *)v75 + 456LL))(v75, v81);
v82 = (float32x2_t *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)v78 + 192LL))(v78);
sub_1000262BC((float *)&v88, 8.0, -25.0);
*(float32x2_t *)&v83 = sub_100026318(v82, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(void *, void **, double))(*(_QWORD *)v81 + 184LL))(v81, __p, v83);
GameToolbox::intToString(*(unsigned int *)(a1[114] + 384), __p);
if ( v93 >= 0 )
v84 = cocos2d::CCLabelBMFont::create_1((const char *)__p, "bigFont.fnt");
else
v84 = cocos2d::CCLabelBMFont::create_1((const char *)__p[0], "bigFont.fnt");
v85 = v84;
if ( v93 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v75 + 456LL))(v75, v85);
sub_1000262BC((float *)__p, 1.0, 0.5);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v85 + 296LL))(v85, __p);
v86 = (float32x2_t *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v81 + 192LL))(v81);
sub_1000262BC((float *)&v88, -8.0, 0.0);
*(float32x2_t *)&v87 = sub_100026318(v86, &v88, (float32x2_t *)__p);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v85 + 184LL))(v85, __p, v87);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v85 + 160LL))(v85, 0.4);
}
sub_1002E74E0(a1[122], v56);
}
}
}