//
// DeathTrackerPopup::mountVirtualRow from 0xcaa900 to 0xcaafe4 (1764 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'DeathTrackerPopup::mountVirtualRow @ 0xcab008
// > ??> @ 0x858b8
// > ??> @ 0x14f8fc8
//
// 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 13:06:05 +0000
//
__int64 __fastcall DeathTrackerPopup::mountVirtualRow(
DeathTrackerPopup *this,
int a2,
cocos2d::CCNode *a3,
cocos2d::CCMenu *a4)
{
__int64 v5; // x0
__int64 v6; // x19
float v8; // s0
float v9; // s8
float v10; // s9
cocos2d::CCString *v11; // x0
const char *CString; // x0
size_t v13; // x0
cocos2d::CCString *v14; // x0
cocos2d::CCLabelBMFont *v15; // x0
const char *v16; // x2
__int64 v17; // x24
void (__fastcall *v18)(__int64, __int64 *); // x26
int v19; // w0
void (__fastcall *v20)(__int64, __int64 *); // x26
int v21; // w0
float v22; // s0
float v23; // s0
cocos2d::CCString *v25; // x0
const char *v26; // x0
size_t v27; // x0
cocos2d::CCString *v28; // x0
const char *v29; // x0
size_t v30; // x0
const char *v31; // x1
__int64 v32; // x22
void (__fastcall *v33)(__int64, __int64 *); // x26
cocos2d::CCString *v34; // x0
cocos2d::CCLabelBMFont *v35; // x0
const char *v36; // x2
__int64 v37; // x22
void (__fastcall *v38)(__int64, __int64 *); // x24
int v39; // w0
void (__fastcall *v40)(__int64, __int64 *); // x19
int v41; // w0
__int64 v42; // x1
float v43; // s1
float v44; // s0
void (__fastcall *v45)(__int64, __int64 *); // x19
cocos2d::CCLabelBMFont *v46; // x0
__int64 v47; // x19
void (__fastcall *v48)(__int64, __int64 *); // x23
void (__fastcall *v49)(__int64, __int64 *); // x23
cocos2d::CCLabelBMFont *v50; // x0
void (__fastcall *v51)(__int64, __int64 *); // x24
float v52; // s0
char *v53; // [xsp+78h] [xbp+78h]
char *v54; // [xsp+78h] [xbp+78h]
char *v55; // [xsp+78h] [xbp+78h]
_BYTE v56[8]; // [xsp+80h] [xbp+80h] BYREF
__int64 v57; // [xsp+88h] [xbp+88h] BYREF
__int64 v58; // [xsp+90h] [xbp+90h]
__int64 v59; // [xsp+98h] [xbp+98h] BYREF
__int64 v60; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v61; // [xsp+A8h] [xbp+A8h]
void *v62; // [xsp+B0h] [xbp+B0h]
v5 = *((_QWORD *)this + 124);
v56[0] = -1;
v56[1] = -56;
v6 = v5 + 48LL * a2;
v56[2] = 120;
LOBYTE(v57) = -96;
*(_WORD *)((char *)&v57 + 1) = 30860;
v8 = *((float *)this + 174);
v9 = *(float *)(v6 + 4) - 8.0;
v10 = v8 * 0.5;
switch ( *(_DWORD *)v6 )
{
case 0:
v46 = (cocos2d::CCLabelBMFont *)(v6 + 25);
if ( (*(_BYTE *)(v6 + 24) & 1) != 0 )
v46 = *(cocos2d::CCLabelBMFont **)(v6 + 40);
v47 = cocos2d::CCLabelBMFont::create(v46, "goldFont.fnt", _stack_chk_guard);
v48 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v47 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59, 0.0, 0.5);
v48(v47, &v59);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v47 + 160LL))(v47, 0.35);
v49 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v47 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59, 10.0, v9);
v49(v47, &v59);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)a3 + 456LL))(a3, v47);
break;
case 1:
v50 = (cocos2d::CCLabelBMFont *)(v6 + 25);
if ( (*(_BYTE *)(v6 + 24) & 1) != 0 )
v50 = *(cocos2d::CCLabelBMFont **)(v6 + 40);
v37 = cocos2d::CCLabelBMFont::create(v50, "goldFont.fnt", _stack_chk_guard);
v51 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v37 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59, 0.0, 0.5);
v51(v37, &v59);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v37 + 160LL))(v37, 0.32);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v37 + 1072LL))(v37, &v57);
v42 = *(_QWORD *)v37;
v43 = v9;
v44 = (float)*(int *)(v6 + 8);
goto LABEL_19;
case 2:
if ( (*(_DWORD *)(v6 + 20) & 1) == 0 )
sub_CA9C5C((__int64)a3, v8, v9);
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*(unsigned int *)(v6 + 8));
CString = (const char *)cocos2d::CCString::getCString(v11);
v60 = 0;
v53 = (char *)CString;
v61 = 0;
v62 = nullptr;
v13 = strlen(CString);
std::string::__init(&v60, v53, v13);
sub_CA967C((__int64)a3, (__int64)&v60, v57, "chatFont.fnt", 34.0, v9, 0.45);
if ( (v60 & 1) != 0 )
operator delete(v62);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
(const char *)*(unsigned int *)(v6 + 12));
v15 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v14);
v17 = cocos2d::CCLabelBMFont::create(v15, "bigFont.fnt", v16);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v17 + 160LL))(v17, 0.3);
v18 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v17 + 1072LL);
v19 = sub_CA9510(1.0 - (float)((float)*(int *)(v6 + 12) / 100.0));
LOWORD(v59) = v19;
BYTE2(v59) = BYTE2(v19);
v18(v17, &v59);
v20 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v17 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59, v10, v9);
v20(v17, &v59);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)a3 + 456LL))(a3, v17);
v21 = *(_DWORD *)(v6 + 16);
if ( v21 > 0 )
{
v60 = 0;
v61 = 0;
v62 = nullptr;
if ( v21 == 2 )
{
std::string::__init(&v60, "New Best!", 9u);
v22 = *((float *)this + 174);
LOWORD(v58) = -1;
v23 = v22 - 14.0;
BYTE2(v58) = -1;
}
else
{
std::string::__init(&v60, "Session Best", 0xCu);
v52 = *((float *)this + 174);
LOWORD(v58) = -24396;
v23 = v52 - 14.0;
BYTE2(v58) = -126;
}
sub_CA967C((__int64)a3, (__int64)&v60, v58, "goldFont.fnt", v23, v9, 0.3);
if ( (v60 & 1) != 0 )
operator delete(v62);
}
break;
case 3:
if ( (*(_DWORD *)(v6 + 20) & 1) == 0 )
sub_CA9C5C((__int64)a3, v8, v9);
v25 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*(unsigned int *)(v6 + 8));
v26 = (const char *)cocos2d::CCString::getCString(v25);
v60 = 0;
v54 = (char *)v26;
v61 = 0;
v62 = nullptr;
v27 = strlen(v26);
std::string::__init(&v60, v54, v27);
sub_CA967C((__int64)a3, (__int64)&v60, v57, "chatFont.fnt", 34.0, v9, 0.45);
if ( (v60 & 1) != 0 )
operator delete(v62);
v28 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
(const char *)*(unsigned int *)(v6 + 12));
v29 = (const char *)cocos2d::CCString::getCString(v28);
v60 = 0;
v55 = (char *)v29;
v61 = 0;
v62 = nullptr;
v30 = strlen(v29);
std::string::__init(&v60, v55, v30);
sub_CA967C((__int64)a3, (__int64)&v60, v57, "bigFont.fnt", v10 - 12.0, v9, 0.3);
if ( (v60 & 1) != 0 )
operator delete(v62);
v32 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_rightBtn_001.png", v31);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v32 + 128LL))(v32, 0.3);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v32 + 144LL))(v32, 0.21);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v32 + 960LL))(v32, v56);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v32 + 912LL))(v32, 120);
v33 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v32 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59, v10, v9);
v33(v32, &v59);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)a3 + 456LL))(a3, v32);
v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
(const char *)*(unsigned int *)(v6 + 16));
v35 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v34);
v37 = cocos2d::CCLabelBMFont::create(v35, "bigFont.fnt", v36);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v37 + 160LL))(v37, 0.3);
v38 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v37 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59, 0.0, 0.5);
v38(v37, &v59);
v39 = *(_DWORD *)(v6 + 16);
v40 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v37 + 1072LL);
v41 = sub_CA9510(1.0 - (float)((float)v39 / 100.0));
LOWORD(v59) = v41;
BYTE2(v59) = BYTE2(v41);
v40(v37, &v59);
v42 = *(_QWORD *)v37;
v43 = v9;
v44 = v10 + 12.0;
LABEL_19:
v45 = *(void (__fastcall **)(__int64, __int64 *))(v42 + 184);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v59, v44, v43);
v45(v37, &v59);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)a3 + 456LL))(a3, v37);
break;
case 4:
LOWORD(v59) = -26986;
BYTE2(v59) = -106;
DeathTrackerPopup::addRow(v9, 0.6, (__int64)this, (__int64)a3, v6 + 24, v59);
break;
default:
return _stack_chk_guard;
}
return _stack_chk_guard;
}