//
// DeathTrackerPopup::buildList from 0x7737c4 to 0x774652 (3726 bytes)
//
// 2 xrefs:
// > DeathTrackerPopup::refreshView @ 0x77502c
// > DeathTrackerPopup::setView @ 0x775410
//
// 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:18 +0000
//
char **__fastcall DeathTrackerPopup::buildList(ScrollableContentLayer **this)
{
int v2; // r10
int v3; // r0
int v4; // r5
void (__fastcall *v5)(int, int **); // r7
void (__fastcall *v6)(int, int **); // r3
void (__fastcall *v7)(int, int **); // r7
int v8; // r7
int v9; // r6
int v10; // r7
int v11; // r6
int v12; // r6
int v13; // r6
int v14; // r6
int v15; // r0
char *v16; // r3
int v17; // r2
unsigned int v18; // r1
char *v19; // r3
unsigned int v20; // r5
int v21; // r0
int v22; // r5
unsigned int v23; // r7
int **v24; // r0
_DWORD *v25; // r0
int v26; // r2
int v27; // r0
int v28; // r5
unsigned int v29; // r7
char *v30; // r0
int v31; // r3
int v32; // r2
int j; // r3
const char *v34; // r5
int v35; // r6
char *v36; // r3
float v37; // s16
cocos2d::CCString *v38; // r0
size_t v39; // r0
cocos2d::CCString *v40; // r0
size_t v41; // r0
cocos2d::CCString *v42; // r0
const char *v43; // r9
size_t v44; // r0
cocos2d::CCString *v45; // r0
const char *v46; // r9
size_t v47; // r0
int v48; // r0
int v49; // r8
int *k; // r7
int *v51; // r0
int v52; // r5
int *v53; // r9
cocos2d::CCString *v54; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v56; // r2
int v57; // r5
void (__fastcall *v58)(int, int **); // r6
void (__fastcall *v59)(int, int **); // r6
int v60; // r6
float v61; // s16
int *v62; // r5
int *v63; // r0
int v64; // r6
cocos2d::CCString *v65; // r0
const char *v66; // r9
size_t v67; // r0
cocos2d::CCString *v68; // r0
const char *v69; // r8
size_t v70; // r0
cocos2d::CCString *v71; // r0
const char *v72; // r9
size_t v73; // r0
int v74; // r0
int *m; // r5
int *n; // r0
const char *v77; // r5
char *v78; // r3
const char *v79; // r7
cocos2d::CCString *v80; // r0
const char *v81; // r9
size_t v82; // r0
cocos2d::CCString *v83; // r0
const char *v84; // r6
size_t v85; // r0
cocos2d::CCString *v86; // r0
const char *v87; // r8
size_t v88; // r0
cocos2d::CCString *v89; // r0
const char *v90; // r7
size_t v91; // r0
int v93; // r5
unsigned int i; // r1
unsigned int v95; // r3
int **v96; // r0
_DWORD *v97; // r0
char *v98; // [sp+Ch] [bp-110h]
char *v99; // [sp+Ch] [bp-110h]
char *v100; // [sp+10h] [bp-10Ch]
char *v101; // [sp+10h] [bp-10Ch]
char *v102; // [sp+10h] [bp-10Ch]
cocos2d::CCString *v103; // [sp+24h] [bp-F8h]
cocos2d::CCString *v104; // [sp+24h] [bp-F8h]
int v105; // [sp+3Ch] [bp-E0h]
int v106; // [sp+40h] [bp-DCh]
int v107; // [sp+44h] [bp-D8h]
int v108; // [sp+48h] [bp-D4h]
unsigned int v109; // [sp+4Ch] [bp-D0h] BYREF
char *v110[3]; // [sp+50h] [bp-CCh] BYREF
int *v111; // [sp+5Ch] [bp-C0h] BYREF
_DWORD *v112[2]; // [sp+60h] [bp-BCh] BYREF
char *v113; // [sp+68h] [bp-B4h] BYREF
char *v114; // [sp+6Ch] [bp-B0h]
char *v115; // [sp+70h] [bp-ACh]
int v116[3]; // [sp+74h] [bp-A8h] BYREF
int v117[3]; // [sp+80h] [bp-9Ch] BYREF
int v118[3]; // [sp+8Ch] [bp-90h] BYREF
int v119[3]; // [sp+98h] [bp-84h] BYREF
int v120[3]; // [sp+A4h] [bp-78h] BYREF
int v121[3]; // [sp+B0h] [bp-6Ch] BYREF
int v122[3]; // [sp+BCh] [bp-60h] BYREF
int v123[3]; // [sp+C8h] [bp-54h] BYREF
int v124[3]; // [sp+D4h] [bp-48h] BYREF
int v125[3]; // [sp+E0h] [bp-3Ch] BYREF
int v126[3]; // [sp+ECh] [bp-30h] BYREF
int v127; // [sp+F8h] [bp-24h] BYREF
int v128; // [sp+FCh] [bp-20h]
int v129; // [sp+100h] [bp-1Ch]
int *v130; // [sp+104h] [bp-18h] BYREF
_DWORD *v131; // [sp+108h] [bp-14h] BYREF
int v132; // [sp+10Ch] [bp-10h]
ScrollableContentLayer::setVirtualRows(*(this + 133), 0, 1115684864, 0, 0);
v2 = *((_DWORD *)*(this + 133) + 80);
(*(void (__fastcall **)(int))(*(_DWORD *)v2 + 288))(v2);
v3 = (int)*(this + 151);
LOWORD(v105) = -14081;
BYTE2(v105) = 120;
LOWORD(v106) = -14136;
BYTE2(v106) = -56;
if ( v3 )
{
(*(void (__fastcall **)(int))(*(_DWORD *)v3 + 288))(v3);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v130, 0.0, 0.0, 40.0, 40.0);
v4 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", &v130);
v5 = *(void (__fastcall **)(int, int **))(*(_DWORD *)v4 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v130, *((float *)this + 134) - 4.0, 18.0);
v5(v4, &v130);
v6 = *(void (__fastcall **)(int, int **))(*(_DWORD *)v4 + 480);
LOWORD(v130) = 6189;
BYTE2(v130) = 14;
v6(v4, &v130);
v7 = *(void (__fastcall **)(int, int **))(*(_DWORD *)v4 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v130, *((float *)this + 134) * 0.5, 0.0);
v7(v4, &v130);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 151) + 232))(*(this + 151), v4, -1);
v8 = (int)*(this + 151);
v127 = 0;
v128 = 0;
v129 = 0;
std::string::__init(&v127, "%", 1u);
sub_77087C(v8, (int)&v127, 0xFFFFFF, "goldFont.fnt");
std::string::~string((int)&v127);
v9 = (int)*(this + 143);
v10 = (int)*(this + 151);
if ( v9 )
{
v127 = 0;
v128 = 0;
v129 = 0;
if ( v9 == 1 )
{
std::string::__init(&v127, "Deaths", 6u);
sub_77087C(v10, (int)&v127, 0xFFFFFF, "goldFont.fnt");
std::string::~string((int)&v127);
v13 = (int)*(this + 151);
v127 = 0;
v128 = 0;
v129 = 0;
std::string::__init(&v127, "Rate", 4u);
}
else
{
std::string::__init(&v127, "Full", 4u);
sub_77087C(v10, (int)&v127, 0xFFFFFF, "goldFont.fnt");
std::string::~string((int)&v127);
v14 = (int)*(this + 151);
v127 = 0;
v128 = 0;
v129 = 0;
std::string::__init(&v127, "SP", 2u);
sub_77087C(v14, (int)&v127, 0xFFFFFF, "goldFont.fnt");
std::string::~string((int)&v127);
v13 = (int)*(this + 151);
v127 = 0;
v128 = 0;
v129 = 0;
std::string::__init(&v127, "Total", 5u);
}
sub_77087C(v13, (int)&v127, 0xFFFFFF, "goldFont.fnt");
}
else
{
v127 = 0;
v128 = 0;
v129 = 0;
std::string::__init(&v127, "Deaths", 6u);
sub_77087C(v10, (int)&v127, 0xFFFFFF, "goldFont.fnt");
std::string::~string((int)&v127);
v11 = (int)*(this + 151);
v127 = 0;
v128 = 0;
v129 = 0;
std::string::__init(&v127, "Reached", 7u);
sub_77087C(v11, (int)&v127, 0xFFFFFF, "goldFont.fnt");
std::string::~string((int)&v127);
v12 = (int)*(this + 151);
v127 = 0;
v128 = 0;
v129 = 0;
std::string::__init(&v127, "Rate", 4u);
sub_77087C(v12, (int)&v127, 0xFFFFFF, "goldFont.fnt");
}
std::string::~string((int)&v127);
}
v130 = nullptr;
std::vector::vector(v110, 0x65u, &v130);
v15 = (int)*(this + 132);
v112[0] = nullptr;
v112[1] = nullptr;
v111 = (int *)v112;
if ( v15 )
{
v16 = (char *)*((unsigned __int8 *)this + 564);
if ( *((_BYTE *)this + 564) )
{
v113 = nullptr;
v114 = nullptr;
v115 = nullptr;
GJGameLevel::dtExpandOrder((unsigned __int8 *)(v15 + 1192), (int)&v113);
v17 = 0;
v18 = 0;
while ( 1 )
{
v19 = v113;
v18 += 2;
if ( v18 > (v114 - v113) >> 2 )
break;
v20 = *(_DWORD *)&v113[v17];
if ( v20 <= 0x63 )
v19 = &v113[v17];
v17 += 8;
if ( v20 <= 0x63 )
*(_DWORD *)&v110[0][4 * v20] += *((_DWORD *)v19 + 1);
}
*((_DWORD *)v110[0] + 100) += *((_DWORD *)*(this + 132) + 314);
v21 = (int)*(this + 132);
v130 = nullptr;
v131 = nullptr;
v132 = 0;
GJGameLevel::dtExpandOrder((unsigned __int8 *)(v21 + 1204), (int)&v130);
v22 = 1;
v23 = 0;
while ( 1 )
{
v23 += 3;
if ( v23 > v131 - v130 )
break;
v109 = v130[v22];
if ( v109 <= 0x63 )
{
v98 = (char *)v130[v22 + 1];
v24 = (int **)std::map>::operator[](&v111, &v130[v22 - 1]);
v25 = std::map::operator[](v24, (int *)&v109);
*v25 += v98;
}
v22 += 3;
}
}
else
{
v26 = (int)*(this + 142);
if ( v26 < 0 )
goto LABEL_31;
v27 = (int)*(this + 145);
if ( v26 >= 954437177 * (((int)*(this + 146) - v27) >> 2) )
goto LABEL_31;
v93 = v27 + 36 * v26;
v113 = (char *)*((unsigned __int8 *)this + 564);
v114 = v16;
v115 = v16;
GJGameLevel::dtExpandOrder((unsigned __int8 *)(v93 + 4), (int)&v113);
for ( i = 0; i < (v114 - v113) >> 2; ++i )
{
v95 = *(_DWORD *)&v113[4 * i];
if ( v95 <= 0x64 )
++*(_DWORD *)&v110[0][4 * v95];
}
v130 = nullptr;
v131 = nullptr;
v132 = 0;
GJGameLevel::dtExpandOrder((unsigned __int8 *)(v93 + 16), (int)&v130);
v28 = 1;
v29 = 0;
while ( 1 )
{
v29 += 2;
if ( v29 > v131 - v130 )
break;
v109 = v130[v28];
if ( v109 <= 0x63 )
{
v96 = (int **)std::map>::operator[](&v111, &v130[v28 - 1]);
v97 = std::map::operator[](v96, (int *)&v109);
++*v97;
}
v28 += 2;
}
}
std::__vector_base::~__vector_base((char **)&v130);
std::__vector_base::~__vector_base(&v113);
}
LABEL_31:
v113 = nullptr;
v114 = nullptr;
v115 = nullptr;
v30 = (char *)operator new(0x190u);
v31 = 100;
v114 = v30;
v113 = v30;
v115 = v30 + 400;
do
{
if ( v114 )
*(_DWORD *)v114 = 0;
--v31;
v114 += 4;
}
while ( v31 );
v32 = *((_DWORD *)v110[0] + 100);
for ( j = 396; j != -4; j -= 4 )
{
v32 += *(_DWORD *)&v110[0][j];
*(_DWORD *)&v113[j] = v32;
}
v34 = (const char *)*(this + 143);
v35 = 0;
if ( v34 )
{
if ( v34 == (_BYTE *)&dword_0 + 1 )
{
v49 = 0;
v37 = -34.0;
for ( k = v111; k != (int *)v112; k = std::__tree_next *>(k) )
{
v51 = (int *)k[5];
v52 = 0;
while ( 1 )
{
v53 = k + 6;
if ( v51 == k + 6 )
break;
v52 += v51[5];
v51 = std::__tree_next *>(v51);
}
v54 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"From %i%% (%i runs)",
(const char *)k[4],
v52);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v54);
v57 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v56);
v58 = *(void (__fastcall **)(int, int **))(*(_DWORD *)v57 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v130, 0.0, 0.5);
v58(v57, &v130);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v57 + 80))(v57, 1050924810);
v59 = *(void (__fastcall **)(int, int **))(*(_DWORD *)v57 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v130, 10.0, v37);
v59(v57, &v130);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v2 + 228))(v2, v57);
v60 = 0;
v131 = nullptr;
v132 = 0;
v130 = (int *)&v131;
v61 = v37 - 16.0;
while ( 1 )
{
v62 = (int *)k[5];
if ( v53 == v62 )
break;
v63 = std::__tree_prev *>(v53);
v60 += v63[5];
*std::map::operator[](&v130, v63 + 4) = v60;
v53 = std::__tree_prev *>(v53);
}
v64 = v49;
while ( 1 )
{
v49 = v64;
if ( v62 == k + 6 )
break;
if ( (v64 & 1) == 0 )
sub_770BAC(v2);
std::map::operator[](&v130, v62 + 4);
v101 = (char *)lroundf();
v65 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
(const char *)v62[4]);
v66 = (const char *)cocos2d::CCString::getCString(v65);
memset(v120, 0, sizeof(v120));
v67 = strlen(v66);
std::string::__init(v120, v66, v67);
sub_77087C(v2, (int)v120, v105, "bigFont.fnt");
std::string::~string((int)v120);
v68 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)v62[5]);
v69 = (const char *)cocos2d::CCString::getCString(v68);
memset(v121, 0, sizeof(v121));
v70 = strlen(v69);
std::string::__init(v121, v69, v70);
sub_77087C(v2, (int)v121, 0xFFFFFF, "bigFont.fnt");
std::string::~string((int)v121);
v71 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", v101);
v72 = (const char *)cocos2d::CCString::getCString(v71);
memset(v122, 0, sizeof(v122));
v73 = strlen(v72);
std::string::__init(v122, v72, v73);
v74 = sub_770744();
LOWORD(v108) = v74;
BYTE2(v108) = BYTE2(v74);
sub_77087C(v2, (int)v122, v108, "bigFont.fnt");
++v64;
std::string::~string((int)v122);
v61 = v61 - 16.0;
v62 = std::__tree_next *>(v62);
}
v35 = 1;
v37 = v61 - 5.0;
std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy(
(int)&v130,
v131);
}
}
else
{
v109 = 0;
std::vector::vector(&v130, 0x64u, &v109);
for ( m = v111; m != (int *)v112; m = std::__tree_next *>(m) )
{
for ( n = (int *)m[5]; n != m + 6; n = std::__tree_next *>(n) )
v130[n[4]] += n[5];
}
v77 = nullptr;
v37 = -34.0;
v35 = 0;
v78 = nullptr;
do
{
v79 = (const char *)(*(_DWORD *)&v110[0][4 * (_DWORD)v77] + v130[(_DWORD)v77]);
if ( (int)v79 > 0 )
{
v102 = v78 + 1;
if ( ((unsigned __int8)v78 & 1) == 0 )
sub_770BAC(v2);
v80 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", v77);
v81 = (const char *)cocos2d::CCString::getCString(v80);
memset(v123, 0, sizeof(v123));
v82 = strlen(v81);
std::string::__init(v123, v81, v82);
sub_77087C(v2, (int)v123, v105, "bigFont.fnt");
std::string::~string((int)v123);
v83 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
*(const char **)&v110[0][4 * (_DWORD)v77]);
v84 = (const char *)cocos2d::CCString::getCString(v83);
memset(v124, 0, sizeof(v124));
v85 = strlen(v84);
std::string::__init(v124, v84, v85);
sub_77087C(v2, (int)v124, 0xFFFFFF, "bigFont.fnt");
std::string::~string((int)v124);
v86 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)v130[(_DWORD)v77]);
v87 = (const char *)cocos2d::CCString::getCString(v86);
memset(v125, 0, sizeof(v125));
v88 = strlen(v87);
std::string::__init(v125, v87, v88);
LOWORD(v109) = -14196;
BYTE2(v109) = -1;
sub_77087C(v2, (int)v125, v109, "bigFont.fnt");
std::string::~string((int)v125);
v89 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v79);
v90 = (const char *)cocos2d::CCString::getCString(v89);
memset(v126, 0, sizeof(v126));
v91 = strlen(v90);
std::string::__init(v126, v90, v91);
sub_77087C(v2, (int)v126, 0xFFFFFF, "bigFont.fnt");
v35 = 1;
std::string::~string((int)v126);
v78 = v102;
v37 = v37 - 16.0;
}
++v77;
}
while ( v77 != (const char *)&dword_64 );
std::__vector_base::~__vector_base((char **)&v130);
}
}
else
{
v35 = 0;
v36 = nullptr;
v37 = -34.0;
do
{
if ( *(int *)&v110[0][4 * (_DWORD)v34] > 0 )
{
v100 = v36 + 1;
if ( ((unsigned __int8)v36 & 1) == 0 )
sub_770BAC(v2);
v99 = (char *)lroundf();
v38 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", v34);
v103 = (cocos2d::CCString *)cocos2d::CCString::getCString(v38);
memset(v116, 0, sizeof(v116));
v39 = strlen((const char *)v103);
std::string::__init(v116, v103, v39);
sub_77087C(v2, (int)v116, v105, "bigFont.fnt");
std::string::~string((int)v116);
v40 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
*(const char **)&v110[0][4 * (_DWORD)v34]);
v104 = (cocos2d::CCString *)cocos2d::CCString::getCString(v40);
memset(v117, 0, sizeof(v117));
v41 = strlen((const char *)v104);
std::string::__init(v117, v104, v41);
sub_77087C(v2, (int)v117, 0xFFFFFF, "bigFont.fnt");
std::string::~string((int)v117);
v42 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%ld",
*(const char **)&v113[4 * (_DWORD)v34]);
v43 = (const char *)cocos2d::CCString::getCString(v42);
memset(v118, 0, sizeof(v118));
v44 = strlen(v43);
std::string::__init(v118, v43, v44);
sub_77087C(v2, (int)v118, v106, "bigFont.fnt");
std::string::~string((int)v118);
v45 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", v99);
v46 = (const char *)cocos2d::CCString::getCString(v45);
memset(v119, 0, sizeof(v119));
v47 = strlen(v46);
std::string::__init(v119, v46, v47);
v48 = sub_770744();
LOWORD(v107) = v48;
BYTE2(v107) = BYTE2(v48);
sub_77087C(v2, (int)v119, v107, "bigFont.fnt");
v35 = 1;
std::string::~string((int)v119);
v36 = v100;
v37 = v37 - 16.0;
}
++v34;
}
while ( v34 != (const char *)&dword_64 );
}
if ( !v35 )
{
v127 = 0;
v128 = 0;
v129 = 0;
std::string::__init(&v127, "No deaths in this view.", 0x17u);
LOWORD(v130) = -26986;
BYTE2(v130) = -106;
DeathTrackerPopup::addRow((int)this, v2, (int)&v127, v37, 150, 1058642330);
std::string::~string((int)&v127);
v37 = v37 - 16.0;
}
ScrollableContentLayer::setContentHeight(*(this + 133), 8.0 - v37);
std::__vector_base::~__vector_base(&v113);
std::__tree>,std::__map_value_compare>,std::less,true>,std::allocator>>>::destroy(
(int)&v111,
v112[0]);
return std::__vector_base::~__vector_base(v110);
}