//
// StatsCell::loadFromObject from 0x614b04 to 0x614e04 (768 bytes)
//
// 2 xrefs:
// > CustomListView::loadCell @ 0x62077c
// > ??> @ 0x2d750
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void StatsCell::loadFromObject(StatsCell *a1, StatsObject *a2)
{
unsigned int m_value; // w21
cocos2d::CCLabelBMFont *v5; // x20
float width; // s0
cocos2d::CCString *v7; // x0
cocos2d::CCLabelBMFont *v8; // x19
float v9; // s0
void (__fastcall *v10)(cocos2d::CCLabelBMFont *__hidden, float); // x21
float v11; // s8
void (__fastcall *v12)(cocos2d::CCLabelBMFont *__hidden, float); // x24
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x24
void (__fastcall *v14)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x24
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24
void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
void (__fastcall *v17)(cocos2d::CCLabelBMFont *__hidden, float); // x21
void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // x24
cocos2d::CCPoint v19; // [xsp+50h] [xbp+50h] BYREF
a1->m_backgroundLayer->setOpacity(a1->m_backgroundLayer, 0xFFFFFFFFLL);
a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, 1);
m_value = a2->m_value;
StatsCell::getTitleFromKey(a1, (const char *)a2->m_key);
v5 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v5);
width = v5->getContentSize(v5)->width;
if ( width > 200.0 )
{
setScale = v5->setScale;
if ( (float)(200.0
/ *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v5->getContentSize)(v5, width)) < 1.0 )
v5->getContentSize(v5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))setScale)(v5);
}
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)m_value);
cocos2d::CCString::getCString(v7);
v8 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v8);
v9 = v8->getContentSize(v8)->width;
if ( v9 > 100.0 )
{
v17 = v8->setScale;
if ( (float)(100.0 / *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v8->getContentSize)(v8, v9)) < 1.0 )
v8->getContentSize(v8);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v17)(v8);
}
v10 = v5->setScale;
v11 = 0.7;
if ( v5->getScale(v5) <= 0.7 )
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v5->getScale)(v5, 0.7);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v10)(v5);
v12 = v8->setScale;
if ( v8->getScale(v8) <= 0.7 )
v11 = v8->getScale(v8);
v12(v8, v11);
setAnchorPoint = v5->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v19, 0.0, 0.5);
setAnchorPoint(v5, &v19);
v14 = v8->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v19, 1.0, 0.5);
v14(v8, &v19);
setPosition = v5->setPosition;
cocos2d::CCPoint::CCPoint(&v19, 20.0, (float)(a1->m_height * 0.5) + -1.0);
setPosition(v5, &v19);
v16 = v8->setPosition;
cocos2d::CCPoint::CCPoint(&v19, 330.0, (float)(a1->m_height * 0.5) + -1.0);
v16(v8, &v19);
}