//
// LevelStatsInfoPopup::buildInfoText from 0x79bd58 to 0x79c2f8 (1440 bytes)
//
// 1 xrefs:
// > LevelStatsInfoPopup::init @ 0x79c486
//
// 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:59:50 +0000
//
LevelStatsInfoPopup *__fastcall LevelStatsInfoPopup::buildInfoText(LevelStatsInfoPopup *this, int a2)
{
int v4; // r1
int v5; // r3
int v6; // r9
int v7; // r3
size_t v8; // r2
unsigned int v9; // r3
unsigned int v10; // r7
int v11; // r1
char *v12; // lr
int v13; // lr
int v14; // r7
int v15; // r8
int v16; // r3
time_t v17; // r1
int *v18; // r0
int v19; // r10
int *v20; // r3
int v21; // r1
char *v22; // r2
int v23; // r3
time_t v24; // r1
int *v25; // r0
int v26; // r10
int *v27; // r3
int v28; // r1
char *v29; // r2
char *v30; // r3
char *v31; // r2
char *v32; // r3
char *v33; // r1
cocos2d::CCString *v34; // r0
char *v35; // r0
char *v36; // r0
cocos2d::CCString *v37; // r0
char *CString; // r0
int v39; // r2
int v40; // r2
int v41; // r1
int v42; // r8
char *v43; // r0
cocos2d::CCString *v44; // r0
char *v45; // r0
char *v46; // r1
cocos2d::CCString *v47; // r0
char *v48; // r0
int v49; // r3
char *v50; // r1
size_t v51; // r2
char *v53; // r8
_BYTE *v54; // r0
size_t v55; // r2
cocos2d::CCNode *v56; // r0
char *v57; // r1
unsigned int v58; // [sp+Ch] [bp-10h]
char *v59; // [sp+10h] [bp-Ch]
char *v60; // [sp+10h] [bp-Ch]
int v61[3]; // [sp+1Ch] [bp+0h] BYREF
int v62; // [sp+28h] [bp+Ch] BYREF
char *v63; // [sp+2Ch] [bp+10h]
const char *v64; // [sp+30h] [bp+14h]
int v65[3]; // [sp+34h] [bp+18h] BYREF
int v66[3]; // [sp+40h] [bp+24h] BYREF
int v67; // [sp+4Ch] [bp+30h] BYREF
char *v68; // [sp+50h] [bp+34h]
char *v69; // [sp+54h] [bp+38h]
int v70[3]; // [sp+58h] [bp+3Ch] BYREF
int v71[3]; // [sp+64h] [bp+48h] BYREF
char v72; // [sp+70h] [bp+54h] BYREF
char v73; // [sp+71h] [bp+55h] BYREF
char *v74; // [sp+78h] [bp+5Ch]
char v75; // [sp+7Ch] [bp+60h] BYREF
char v76; // [sp+7Dh] [bp+61h] BYREF
char *v77; // [sp+84h] [bp+68h]
char v78[4]; // [sp+88h] [bp+6Ch] BYREF
char *v79; // [sp+8Ch] [bp+70h]
char *v80; // [sp+90h] [bp+74h]
int v81; // [sp+94h] [bp+78h] BYREF
char *v82; // [sp+98h] [bp+7Ch]
char *v83; // [sp+9Ch] [bp+80h]
int v84; // [sp+A0h] [bp+84h] BYREF
char *v85; // [sp+A4h] [bp+88h]
char *v86; // [sp+A8h] [bp+8Ch]
v4 = *(_DWORD *)(a2 + 520) + 304;
v58 = *(_DWORD *)(v4 + 144) - *(_DWORD *)(v4 + 148);
std::string::basic_string(v61, v4);
if ( (v61[0] & 1) != 0 )
v5 = v61[1];
else
v5 = (int)LOBYTE(v61[0]) >> 1;
if ( !v5 )
{
v14 = 1;
v15 = 1;
goto LABEL_21;
}
cocos2d::ZipUtils::decompressString(&v81, v61, 0, 11);
v6 = v81 & 1;
if ( v6 )
v7 = (int)v82;
else
v7 = (int)(unsigned __int8)v81 >> 1;
if ( !v7 )
{
v14 = 1;
v15 = 1;
goto LABEL_19;
}
v8 = (size_t)v82;
v9 = 0;
v10 = (int)(unsigned __int8)v81 >> 1;
v11 = 0;
while ( v6 )
{
if ( v9 >= (unsigned int)v82 )
{
if ( v11 )
{
LABEL_97:
v58 = v11 - 1;
if ( !v6 )
goto LABEL_99;
}
v53 = v83;
goto LABEL_100;
}
v12 = v83;
LABEL_15:
v13 = (unsigned __int8)v12[v9++];
if ( v13 == 59 )
++v11;
}
if ( v9 < v10 )
{
v12 = (char *)&v81 + 1;
goto LABEL_15;
}
if ( v11 )
goto LABEL_97;
LABEL_99:
v53 = (char *)&v81 + 1;
v8 = (int)(unsigned __int8)v81 >> 1;
LABEL_100:
if ( v8 && (v60 = v82, (v54 = memchr(v53, 59, v8)) != nullptr) && (v55 = v54 - v53, v54 - v53 != -1) )
{
v84 = 0;
v85 = nullptr;
v86 = nullptr;
if ( v6 )
{
v10 = (unsigned int)v60;
v57 = v83;
}
else
{
v57 = (char *)&v81 + 1;
}
if ( v55 >= v10 )
v55 = v10;
std::string::__init(&v84, v57, v55);
}
else
{
std::string::basic_string(&v84, (int)&v81);
}
v56 = LevelSettingsObject::objectFromString((cocos2d::CCDictionary *)&v84);
if ( v56 )
{
v15 = *((unsigned __int8 *)v56 + 377) ^ 1;
v14 = *((unsigned __int8 *)v56 + 378) ^ 1;
}
else
{
v14 = 1;
v15 = 1;
}
std::string::~string((int)&v84);
LABEL_19:
std::string::~string((int)&v81);
LABEL_21:
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
if ( *(_DWORD *)(*(_DWORD *)(a2 + 520) + 952) == 2 )
{
GameToolbox::pointsToString((GameToolbox *)&v81, v58);
if ( (v81 & 1) != 0 )
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Objects: %s", v83);
else
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Objects: %s",
(const char *)&v81 + 1);
CString = (char *)cocos2d::CCString::getCString(v37);
std::string::assign((int *)this, CString);
v36 = (char *)&v81;
}
else
{
*(_DWORD *)v78 = 0;
v79 = nullptr;
v80 = nullptr;
std::string::__init((int *)v78, "NA", 2u);
v16 = *(_DWORD *)(a2 + 520);
v17 = *(_DWORD *)(v16 + 364);
if ( v17 > 0 )
{
GameToolbox::timestampToDateString((GameToolbox *)&v62, v17);
if ( (v78[0] & 1) != 0 )
{
*v80 = 0;
v79 = nullptr;
}
else
{
v78[1] = 0;
v78[0] = 0;
}
std::string::reserve((int *)v78, 0);
*(_DWORD *)v78 = v62;
v79 = v63;
v80 = (char *)v64;
v18 = &v62;
v62 = 0;
v63 = nullptr;
v64 = nullptr;
goto LABEL_35;
}
std::string::basic_string(v65, v16 + 340);
if ( (v65[0] & 1) != 0 )
v19 = v65[1];
else
v19 = (int)LOBYTE(v65[0]) >> 1;
std::string::~string((int)v65);
if ( v19 )
{
std::string::basic_string(v66, *(_DWORD *)(a2 + 520) + 340);
v20 = std::string::append(v66, " ago");
v21 = v20[1];
v22 = (char *)v20[2];
v84 = *v20;
v85 = (char *)v21;
v86 = v22;
*v20 = 0;
v20[1] = 0;
v20[2] = 0;
if ( (v78[0] & 1) != 0 )
{
*v80 = 0;
v79 = nullptr;
}
else
{
v78[1] = 0;
v78[0] = 0;
}
std::string::reserve((int *)v78, 0);
*(_DWORD *)v78 = v84;
v79 = v85;
v80 = v86;
v84 = 0;
v85 = nullptr;
v86 = nullptr;
std::string::~string((int)&v84);
v18 = v66;
LABEL_35:
std::string::~string((int)v18);
}
v81 = 0;
v82 = nullptr;
v83 = nullptr;
std::string::__init(&v81, "NA", 2u);
v23 = *(_DWORD *)(a2 + 520);
v24 = *(_DWORD *)(v23 + 368);
if ( v24 > 0 )
{
GameToolbox::timestampToDateString((GameToolbox *)&v67, v24);
if ( (v81 & 1) != 0 )
{
*v83 = 0;
v82 = nullptr;
}
else
{
LOWORD(v81) = 0;
}
std::string::reserve(&v81, 0);
v81 = v67;
v82 = v68;
v83 = v69;
v25 = &v67;
v67 = 0;
v68 = nullptr;
v69 = nullptr;
goto LABEL_49;
}
std::string::basic_string(v70, v23 + 352);
if ( (v70[0] & 1) != 0 )
v26 = v70[1];
else
v26 = (int)LOBYTE(v70[0]) >> 1;
std::string::~string((int)v70);
if ( v26 )
{
std::string::basic_string(v71, *(_DWORD *)(a2 + 520) + 352);
v27 = std::string::append(v71, " ago");
v28 = v27[1];
v29 = (char *)v27[2];
v84 = *v27;
v85 = (char *)v28;
v86 = v29;
*v27 = 0;
v27[1] = 0;
v27[2] = 0;
if ( (v81 & 1) != 0 )
{
*v83 = 0;
v82 = nullptr;
}
else
{
LOWORD(v81) = 0;
}
std::string::reserve(&v81, 0);
v81 = v84;
v82 = v85;
v83 = v86;
v84 = 0;
v85 = nullptr;
v86 = nullptr;
std::string::~string((int)&v84);
v25 = v71;
LABEL_49:
std::string::~string((int)v25);
}
GameToolbox::gameVersionToString((GameToolbox *)&v72, *(_DWORD *)(*(_DWORD *)(a2 + 520) + 616));
if ( (v72 & 1) != 0 )
v30 = v74;
else
v30 = &v73;
v59 = v30;
GameToolbox::pointsToString((GameToolbox *)&v75, v58);
if ( (v75 & 1) != 0 )
v31 = v77;
else
v31 = &v76;
if ( (v78[0] & 1) != 0 )
v32 = v80;
else
v32 = &v78[1];
if ( (v81 & 1) != 0 )
v33 = v83;
else
v33 = (char *)&v81 + 1;
v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Game Version: %s\n"
"Objects: %s\n"
"Uploaded: %s\n"
"Updated: %s",
v59,
v31,
v32,
v33);
v35 = (char *)cocos2d::CCString::getCString(v34);
std::string::assign((int *)this, v35);
std::string::~string((int)&v75);
std::string::~string((int)&v72);
std::string::~string((int)&v81);
v36 = v78;
}
std::string::~string((int)v36);
sub_79B760((int *)v78, *(_DWORD *)(*(_DWORD *)(a2 + 520) + 480), v39);
if ( !v15 )
{
v42 = v78[0] & 1;
if ( v42 )
{
if ( v79 != (_BYTE *)&dword_0 + 2 )
{
LABEL_77:
v44 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\nIn Editor: %s",
v80);
LABEL_79:
v45 = (char *)cocos2d::CCString::getCString(v44);
std::string::append(this, v45);
goto LABEL_68;
}
v43 = v80;
}
else
{
if ( (int)(unsigned __int8)v78[0] >> 1 != 2 )
goto LABEL_78;
v43 = &v78[1];
}
if ( !memcmp(v43, "NA", 2u) )
goto LABEL_68;
if ( v42 )
goto LABEL_77;
LABEL_78:
v44 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\nIn Editor: %s",
&v78[1]);
goto LABEL_79;
}
LABEL_68:
v41 = *(_DWORD *)(*(_DWORD *)(a2 + 520) + 484);
if ( v41 > 0 && !v14 )
{
sub_79B760(&v84, v41, v40);
if ( (v84 & 1) != 0 )
v46 = v86;
else
v46 = (char *)&v84 + 1;
v47 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"\nEditor (C): %s", v46);
v48 = (char *)cocos2d::CCString::getCString(v47);
std::string::append(this, v48);
std::string::~string((int)&v84);
}
if ( !GJGameLevel::isPlatformer(*(GJGameLevel **)(a2 + 520)) )
{
std::string::basic_string(&v84, *(_DWORD *)(a2 + 520) + 988);
LevelStatsInfoPopup::decodeProgress(&v81, a2, (unsigned __int8 *)&v84);
std::string::~string((int)&v84);
if ( (v81 & 1) != 0 )
v49 = (int)v82;
else
v49 = (int)(unsigned __int8)v81 >> 1;
if ( v49 )
{
std::string::append(this, "\nProgress: ");
if ( (v81 & 1) != 0 )
{
v50 = v83;
v51 = (size_t)v82;
}
else
{
v51 = (int)(unsigned __int8)v81 >> 1;
v50 = (char *)&v81 + 1;
}
std::string::append(this, v50, v51);
}
std::string::~string((int)&v81);
}
std::string::~string((int)v78);
std::string::~string((int)v61);
return this;
}