//
// StatsCell::loadFromObject from 0x42a9e8 to 0x42ac0e (550 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x4340e4
//
// 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:48:09 +0000
//
int __fastcall StatsCell::loadFromObject(StatsCell *this, StatsObject *a2)
{
const char *v4; // r6
cocos2d::CCLabelBMFont *TitleFromKey; // r0
const char *v6; // r2
int v7; // r5
void (__fastcall *v8)(int, _DWORD); // r4
float v9; // s16
cocos2d::CCString *v10; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v12; // r2
int v13; // r4
void (__fastcall *v14)(int, _DWORD); // r6
float v15; // s16
void (__fastcall *v16)(int, int); // r6
int v17; // r1
void (__fastcall *v18)(int, int); // r6
int v19; // r1
void (__fastcall *v20)(int, _BYTE *); // r9
void (__fastcall *v21)(int, _BYTE *); // r9
void (__fastcall *v22)(int, _BYTE *); // r9
int (__fastcall *v23)(int, _BYTE *); // r5
_BYTE v25[8]; // [sp+4h] [bp-10h] BYREF
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 102) + 584))(*((_DWORD *)this + 102), 255);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1);
v4 = *((const char **)a2 + 14);
TitleFromKey = (cocos2d::CCLabelBMFont *)StatsCell::getTitleFromKey(this, *((const char **)a2 + 13));
v7 = cocos2d::CCLabelBMFont::create(TitleFromKey, "goldFont.fnt", v6);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v7);
if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7) > 200.0 )
{
v8 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v7 + 80);
if ( (float)(200.0 / *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7)) >= 1.0 )
v9 = 1.0;
else
v9 = 200.0 / *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7);
v8(v7, LODWORD(v9));
}
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v4);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v10);
v13 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v12);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v13);
if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v13 + 164))(v13) > 100.0 )
{
v14 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v13 + 80);
if ( (float)(100.0 / *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v13 + 164))(v13)) >= 1.0 )
v15 = 1.0;
else
v15 = 100.0 / *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v13 + 164))(v13);
v14(v13, LODWORD(v15));
}
v16 = *(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 80);
if ( (*(float (__fastcall **)(int))(*(_DWORD *)v7 + 84))(v7) > 0.7 )
v17 = 1060320051;
else
v17 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 84))(v7);
v16(v7, v17);
v18 = *(void (__fastcall **)(int, int))(*(_DWORD *)v13 + 80);
if ( (*(float (__fastcall **)(int))(*(_DWORD *)v13 + 84))(v13) > 0.7 )
v19 = 1060320051;
else
v19 = (*(int (__fastcall **)(int))(*(_DWORD *)v13 + 84))(v13);
v18(v13, v19);
v20 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v7 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 0.0, 0.5);
v20(v7, v25);
v21 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v13 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 1.0, 0.5);
v21(v13, v25);
v22 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 20.0, (float)(*((float *)this + 101) * 0.5) - 1.0);
v22(v7, v25);
v23 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v13 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 330.0, (float)(*((float *)this + 101) * 0.5) - 1.0);
return v23(v13, v25);
}