//
// LevelInfoLayer::updateLabelValues from 0x7e8560 to 0x7e904c (2796 bytes)
//
// 5 xrefs:
// > LevelInfoLayer::setupLevelInfo @ 0x7e9898
// > LevelInfoLayer::incrementLikes @ 0x7e9b64
// > LevelInfoLayer::incrementDislikes @ 0x7e9b78
// > LevelInfoLayer::levelDownloadFinished @ 0x7e9cac
// > ??> @ 0xf83e0
//
// 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 12:54:30 +0000
//
__int64 __fastcall LevelInfoLayer::updateLabelValues(LevelInfoLayer *this)
{
int v2; // w3
int v3; // w20
char *v4; // x1
__int64 v5; // x20
void (__fastcall *v6)(__int64, char *); // x21
char *v7; // x1
__int64 v8; // x20
void (__fastcall *v9)(__int64, char *); // x21
char *v10; // x1
GameStatsManager *v11; // x0
GameStatsManager *v12; // x21
__int64 v13; // x1
GameStatsManager *v14; // x0
GameStatsManager *v15; // x0
GJGameLevel *v16; // x20
char isDailyRecall; // w0
__int64 v18; // x0
__int64 v19; // x20
int v20; // w1
void (__fastcall *v21)(__int64, __int64); // x21
cocos2d::CCString *v22; // x0
__int64 CString; // x0
__int64 v24; // x20
void (__fastcall *v25)(__int64, __int64 *); // x21
__int64 v26; // x21
void (__fastcall *v27)(__int64, char *); // x24
int v28; // w20
char *v29; // x1
cocos2d::CCSpriteFrameCache **v30; // x21
cocos2d::CCSpriteFrameCache *v31; // x0
__int64 (__fastcall *v32)(cocos2d::CCSpriteFrameCache **, __int64); // x24
cocos2d::CCSpriteFrameCache *v33; // x0
__int64 v34; // x0
GameManager *v35; // x0
__int64 v36; // x0
_DWORD *v37; // x2
int v38; // w1
GameManager *v39; // x0
unsigned int AverageDifficulty; // w21
__int64 v41; // x0
__int64 v42; // x1
__int64 v43; // x20
__int64 (__fastcall *v44)(__int64, __int64); // x21
cocos2d::CCString *v45; // x0
__int64 v46; // x0
GameStatsManager *v47; // x0
GameStatsManager *v48; // x0
_BOOL4 v49; // w21
float v50; // s9
__int64 v51; // x24
unsigned int v52; // w20
void (__fastcall *v53)(__int64, __int64 *); // x25
float *v54; // x0
__int64 v55; // x24
void (__fastcall *v56)(__int64, __int64 *); // x25
float *v57; // x0
int v58; // w24
char v59; // w0
float v60; // s8
unsigned int v61; // w20
unsigned int v62; // w1
__int64 v63; // x21
void (__fastcall *v64)(__int64, __int64 *); // x25
__int64 v65; // x26
unsigned int i; // w20
unsigned int v67; // w1
__int64 v68; // x0
bool v69; // cf
cocos2d::CCArray *v70; // x0
GJGameLevel *v71; // x0
int v72; // w21
float v73; // s10
int v75; // w27
int v76; // w20
float v77; // s8
const char *CoinKey; // x0
size_t v79; // x0
GameStatsManager *v80; // x0
GameStatsManager *v81; // x0
char *v82; // x1
GameStatsManager *hasUserCoin; // x0
const char *v84; // x1
GameStatsManager *v85; // x0
char *v86; // x1
int hasPendingUserCoin; // w26
cocos2d::CCObject *v88; // x21
void (__fastcall *v89)(cocos2d::CCObject *, __int64 *); // x25
void (__fastcall *v90)(cocos2d::CCObject *, __int64 *); // x2
void (__fastcall *v91)(cocos2d::CCObject *, __int64 *); // x3
__int64 v92; // x0
void (__fastcall *v93)(__int64, __int64 *); // x3
cocos2d::CCSpriteFrameCache *v94; // x0
__int64 v95; // x0
int v96; // w1
GameManager *v97; // x0
char *v98; // x1
GameManager *v99; // x0
GameManager *v100; // x0
GameManager *v101; // x0
GameManager *v102; // x0
GameManager *v103; // x0
GameManager *v104; // x0
GameManager *v105; // x0
GameManager *v106; // x0
GameManager *v107; // x0
int v108; // [xsp+88h] [xbp+88h]
char *v109; // [xsp+88h] [xbp+88h]
_BYTE v110[4]; // [xsp+90h] [xbp+90h] BYREF
float v111; // [xsp+94h] [xbp+94h]
_BYTE v112[8]; // [xsp+98h] [xbp+98h] BYREF
__int64 v113; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v114; // [xsp+A8h] [xbp+A8h] BYREF
int v115; // [xsp+B0h] [xbp+B0h]
__int64 v116[2]; // [xsp+B8h] [xbp+B8h] BYREF
void *v117; // [xsp+C8h] [xbp+C8h]
GameStatsManager *v118[2]; // [xsp+D0h] [xbp+D0h] BYREF
char *v119; // [xsp+E0h] [xbp+E0h]
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 71) + 344LL))(*((_QWORD *)this + 71), 0);
if ( (unsigned __int8)GJGameLevel::isPlatformer(*((GJGameLevel **)this + 63)) )
{
v2 = *(_DWORD *)(*((_QWORD *)this + 63) + 1232LL);
v116[0] = 0;
v116[1] = 0;
v117 = nullptr;
v3 = vcvtms_s32_f32((float)v2 / 240.0);
std::string::__init(v116, "<1min", 5u);
if ( v3 > 60 )
{
GameToolbox::getTimeString((GameToolbox *)(unsigned int)v3, (_BYTE *)&dword_0 + 1, (__int64 *)v118);
v98 = (char *)v118 + 1;
if ( ((__int64)v118[0] & 1) != 0 )
v98 = v119;
std::string::assign(v116, v98);
if ( ((__int64)v118[0] & 1) != 0 )
operator delete(v119);
}
else if ( !v3 )
{
std::string::assign(v116, "Dur.");
}
v4 = (char *)v116 + 1;
if ( (v116[0] & 1) != 0 )
v4 = (char *)v117;
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 71) + 928LL))(*((_QWORD *)this + 71), v4);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 71) + 344LL))(*((_QWORD *)this + 71), 1);
if ( (v116[0] & 1) != 0 )
operator delete(v117);
}
v5 = *((_QWORD *)this + 70);
v6 = *(void (__fastcall **)(__int64, char *))(*(_QWORD *)v5 + 928LL);
GJGameLevel::lengthKeyToString(
(__int64 *)v118,
(GJGameLevel *)*(unsigned int *)(*((_QWORD *)this + 63) + 900LL),
*(_QWORD *)v5);
v7 = (char *)v118 + 1;
if ( ((__int64)v118[0] & 1) != 0 )
v7 = v119;
v6(v5, v7);
if ( ((__int64)v118[0] & 1) != 0 )
operator delete(v119);
v8 = *((_QWORD *)this + 72);
v9 = *(void (__fastcall **)(__int64, char *))(*(_QWORD *)v8 + 928LL);
GameToolbox::pointsToString(
(GameToolbox *)*(unsigned int *)(*((_QWORD *)this + 63) + 644LL),
(unsigned __int64 *)v118);
v10 = (char *)v118 + 1;
if ( ((__int64)v118[0] & 1) != 0 )
v10 = v119;
v9(v8, v10);
v11 = (GameStatsManager *)LOBYTE(v118[0]);
if ( ((__int64)v118[0] & 1) != 0 )
operator delete(v119);
v12 = (GameStatsManager *)GameStatsManager::sharedState(v11);
v13 = *((_QWORD *)this + 63);
v14 = (GameStatsManager *)*(unsigned int *)(v13 + 920);
v108 = (_DWORD)v14 - *(_DWORD *)(v13 + 924);
v15 = (GameStatsManager *)GameStatsManager::sharedState(v14);
v16 = *((GJGameLevel **)this + 63);
isDailyRecall = GameStatsManager::isDailyRecall(v15, *((_DWORD *)v16 + 230) - *((_DWORD *)v16 + 231));
v18 = GameStatsManager::orbInfoForLevel(v12, v16, v108, isDailyRecall);
v19 = *((_QWORD *)this + 74);
v115 = v20;
v114 = v18;
v21 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v19 + 928LL);
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i/%i",
(const char *)(unsigned int)v18,
HIDWORD(v18));
CString = cocos2d::CCString::getCString(v22);
v21(v19, CString);
v24 = *((_QWORD *)this + 74);
v25 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 1072LL);
if ( (unsigned __int8)GameStatsManager::OrbInfo::locked((GameStatsManager::OrbInfo *)&v114) )
{
LOWORD(v113) = -26986;
BYTE2(v113) = -106;
}
else
{
LOWORD(v113) = -1;
BYTE2(v113) = -1;
}
v25(v24, &v113);
v26 = *((_QWORD *)this + 73);
v27 = *(void (__fastcall **)(__int64, char *))(*(_QWORD *)v26 + 928LL);
v28 = *(_DWORD *)(*((_QWORD *)this + 63) + 892LL) - *(_DWORD *)(*((_QWORD *)this + 63) + 896LL);
GameToolbox::pointsToString((GameToolbox *)(unsigned int)v28, (unsigned __int64 *)v118);
v29 = (char *)v118 + 1;
if ( ((__int64)v118[0] & 1) != 0 )
v29 = v119;
v27(v26, v29);
if ( ((__int64)v118[0] & 1) != 0 )
{
operator delete(v119);
v30 = *((cocos2d::CCSpriteFrameCache ***)this + 78);
v31 = *v30;
v32 = *((__int64 (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v30 + 145);
if ( (v28 & 0x80000000) == 0 )
goto LABEL_23;
}
else
{
v30 = *((cocos2d::CCSpriteFrameCache ***)this + 78);
v31 = *v30;
v32 = *((__int64 (__fastcall **)(cocos2d::CCSpriteFrameCache **, __int64))*v30 + 145);
if ( (v28 & 0x80000000) == 0 )
{
LABEL_23:
v33 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v31);
v34 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v33, "GJ_likesIcon_001.png");
v35 = (GameManager *)v32(v30, v34);
goto LABEL_24;
}
}
v94 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v31);
v95 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v94, "GJ_dislikesIcon_001.png");
v35 = (GameManager *)v32(v30, v95);
LABEL_24:
v36 = GameManager::sharedState(v35);
v37 = *((_DWORD **)this + 63);
v38 = *(_DWORD *)(v36 + 660) - *(_DWORD *)(v36 + 664);
v39 = (GameManager *)(unsigned int)(v37[144] - v37[145]);
if ( v38 == (_DWORD)v39 )
{
if ( v28 > 49 )
{
v99 = (GameManager *)GameManager::sharedState(v39);
v100 = (GameManager *)GameManager::reportAchievementWithID(v99, "geometry.ach.creator03", 100, 0);
if ( v28 > 99 )
{
v101 = (GameManager *)GameManager::sharedState(v100);
v102 = (GameManager *)GameManager::reportAchievementWithID(v101, "geometry.ach.creator01", 100, 0);
if ( v28 > 249 )
{
v103 = (GameManager *)GameManager::sharedState(v102);
v104 = (GameManager *)GameManager::reportAchievementWithID(v103, "geometry.ach.creator04", 100, 0);
if ( v28 > 499 )
{
v105 = (GameManager *)GameManager::sharedState(v104);
v106 = (GameManager *)GameManager::reportAchievementWithID(v105, "geometry.ach.creator05", 100, 0);
if ( v28 > 999 )
{
v107 = (GameManager *)GameManager::sharedState(v106);
GameManager::reportAchievementWithID(v107, "geometry.ach.creator06", 100, 0);
}
}
}
}
v37 = *((_DWORD **)this + 63);
}
v96 = v37[238];
if ( v37[237] - v96 > 0 )
{
v97 = (GameManager *)GameManager::sharedState((GameManager *)(unsigned int)(v37[237] - v96));
GameManager::reportAchievementWithID(v97, "geometry.ach.creator02", 100, 0);
}
}
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 70), 60.0, 0.5, 0.0);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 71), 42.0, 0.35, 0.0);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 72), 60.0, 0.5, 0.0);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 73), 60.0, 0.5, 0.0);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 74), 60.0, 0.5, 0.0);
AverageDifficulty = GJGameLevel::getAverageDifficulty(*((GJGameLevel **)this + 63));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, (LevelInfoLayer *)((char *)this + 692));
v41 = *((_QWORD *)this + 63);
if ( *(_DWORD *)(v41 + 932) - *(_DWORD *)(v41 + 936) == 1 )
{
AverageDifficulty = GJGameLevel::demonIconForDifficulty(*(unsigned int *)(v41 + 944));
v41 = *((_QWORD *)this + 63);
v111 = v111 + 5.0;
}
if ( *(_BYTE *)(v41 + 960) )
v42 = 0xFFFFFFFFLL;
else
v42 = AverageDifficulty;
GJDifficultySprite::updateDifficultyFrame(*((_QWORD *)this + 82), v42, 1);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**((_QWORD **)this + 82) + 184LL))(*((_QWORD *)this + 82), v110);
GJDifficultySprite::updateFeatureStateFromLevel(*((GJDifficultySprite **)this + 82), *((GJGameLevel **)this + 63));
v43 = *((_QWORD *)this + 84);
v44 = *(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v43 + 928LL);
v45 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)(*(_DWORD *)(*((_QWORD *)this + 63) + 948LL)
- *(_DWORD *)(*((_QWORD *)this + 63) + 952LL)));
v46 = cocos2d::CCString::getCString(v45);
v47 = (GameStatsManager *)v44(v43, v46);
v48 = (GameStatsManager *)GameStatsManager::sharedState(v47);
if ( (unsigned __int8)GameStatsManager::hasCompletedStarLevel(v48, *((GJGameLevel **)this + 63)) )
{
v92 = *((_QWORD *)this + 84);
v93 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v92 + 1072LL);
LOWORD(v113) = -1;
BYTE2(v113) = 50;
v93(v92, &v113);
}
v49 = *(_DWORD *)(*((_QWORD *)this + 63) + 948LL) - *(_DWORD *)(*((_QWORD *)this + 63) + 952LL) > 0;
(*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 84) + 344LL))(
*((_QWORD *)this + 84),
*(_DWORD *)(*((_QWORD *)this + 63) + 948LL) - *(_DWORD *)(*((_QWORD *)this + 63) + 952LL) > 0);
(*(void (__fastcall **)(_QWORD, _BOOL4))(**((_QWORD **)this + 83) + 344LL))(*((_QWORD *)this + 83), v49);
if ( *(_DWORD *)(*((_QWORD *)this + 63) + 932LL) - *(_DWORD *)(*((_QWORD *)this + 63) + 936LL) == 1 )
v50 = -4.0;
else
v50 = 0.0;
v51 = *((_QWORD *)this + 84);
v52 = 0;
v53 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v51 + 184LL);
v54 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 192LL))(v51);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, *v54, v50 + *((float *)this + 175));
v53(v51, &v113);
v55 = *((_QWORD *)this + 83);
v56 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v55 + 184LL);
v57 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v55 + 192LL))(v55);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, *v57, v50 + *((float *)this + 175));
v56(v55, &v113);
v58 = (*(unsigned __int8 (__fastcall **)(_QWORD))(**((_QWORD **)this + 74) + 352LL))(*((_QWORD *)this + 74));
if ( v49 )
v52 = *((unsigned __int8 *)this + 704) ^ 1;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 74) + 344LL))(*((_QWORD *)this + 74), v52);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 79) + 344LL))(*((_QWORD *)this + 79), v52);
if ( v58 != (*(unsigned __int8 (__fastcall **)(_QWORD))(**((_QWORD **)this + 74) + 352LL))(*((_QWORD *)this + 74)) )
{
v59 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 74) + 352LL))(*((_QWORD *)this + 74));
v60 = *((float *)this + 172);
if ( !v59 )
v60 = -v60;
v61 = 0;
while ( v61 < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 85)) )
{
v62 = v61++;
v63 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 85), v62);
v64 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v63 + 184LL);
v65 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v63 + 192LL))(v63);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v112, 0.0, v60);
cocos2d::CCPoint::operator+(&v113, v65);
v64(v63, &v113);
}
}
for ( i = 0; ; ++i )
{
v69 = i >= (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 64));
v70 = *((cocos2d::CCArray **)this + 64);
if ( v69 )
break;
v67 = i;
v68 = cocos2d::CCArray::objectAtIndex(v70, v67);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v68 + 520LL))(v68);
}
cocos2d::CCArray::removeAllObjects(v70);
v71 = *((GJGameLevel **)this + 63);
v72 = *((_DWORD *)v71 + 241);
if ( v72 > 0 )
{
if ( *((_DWORD *)v71 + 237) - *((_DWORD *)v71 + 238) <= 0 )
{
v73 = -31.5;
v75 = *((_DWORD *)v71 + 242) - *((_DWORD *)v71 + 243);
}
else
{
if ( (unsigned __int8)GJGameLevel::levelHasDiamonds(v71) )
v73 = -60.0;
else
v73 = -45.5;
v71 = *((GJGameLevel **)this + 63);
v72 = *((_DWORD *)v71 + 241);
if ( v72 <= 0 )
return _stack_chk_guard;
v75 = *((_DWORD *)v71 + 242) - *((_DWORD *)v71 + 243);
}
v76 = 0;
LABEL_53:
if ( v76 == 2 )
{
v77 = 10.0;
goto LABEL_56;
}
if ( v76 )
{
LABEL_55:
v77 = 0.0;
goto LABEL_56;
}
if ( v72 == 2 )
{
v77 = -5.0;
}
else
{
v77 = 0.0;
if ( v72 > 2 )
v77 = -10.0;
}
while ( 1 )
{
LABEL_56:
CoinKey = (const char *)GJGameLevel::getCoinKey(v71, ++v76);
v118[0] = nullptr;
v118[1] = nullptr;
v119 = nullptr;
v109 = (char *)CoinKey;
v79 = strlen(CoinKey);
v80 = (GameStatsManager *)std::string::__init((__int64 *)v118, v109, v79);
v81 = (GameStatsManager *)GameStatsManager::sharedState(v80);
v82 = (char *)v118 + 1;
if ( ((__int64)v118[0] & 1) != 0 )
v82 = v119;
hasUserCoin = (GameStatsManager *)(unsigned __int8)GameStatsManager::hasUserCoin(v81, v82);
if ( (_BYTE)hasUserCoin )
{
hasPendingUserCoin = 1;
}
else
{
v85 = (GameStatsManager *)GameStatsManager::sharedState(hasUserCoin);
v86 = (char *)v118 + 1;
if ( ((__int64)v118[0] & 1) != 0 )
v86 = v119;
hasPendingUserCoin = (unsigned __int8)GameStatsManager::hasPendingUserCoin(v85, v86);
}
v88 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"usercoin_small01_001.png",
v84);
(*(void (__fastcall **)(LevelInfoLayer *, cocos2d::CCObject *))(*(_QWORD *)this + 456LL))(this, v88);
v89 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v88 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v112, v77, v73 + v50);
cocos2d::CCPoint::operator+(&v113, (char *)this + 692);
v89(v88, &v113);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 64), v88);
if ( v75 == 1 )
{
if ( !hasPendingUserCoin )
{
v91 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v88 + 960LL);
LOWORD(v113) = -23131;
BYTE2(v113) = -91;
v91(v88, &v113);
}
}
else
{
v90 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v88 + 960LL);
if ( hasPendingUserCoin )
{
LOWORD(v113) = -20481;
BYTE2(v113) = 75;
}
else
{
LOWORD(v113) = 29093;
BYTE2(v113) = 48;
}
v90(v88, &v113);
}
if ( ((__int64)v118[0] & 1) != 0 )
operator delete(v119);
v71 = *((GJGameLevel **)this + 63);
v72 = *((_DWORD *)v71 + 241);
if ( v72 <= v76 || v76 > 2 )
break;
if ( v76 != 1 )
goto LABEL_53;
if ( v72 != 2 )
goto LABEL_55;
v77 = 5.0;
}
}
return _stack_chk_guard;
}