//
// OptionsCell::loadFromObject from 0x430d98 to 0x43105e (710 bytes)
//
// 2 xrefs:
// > CustomListView::reloadAll @ 0x4312fc
// > CustomListView::loadCell @ 0x43404e
//
// 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:15 +0000
//
int __fastcall OptionsCell::loadFromObject(OptionsCell *this, OptionsObject *a2)
{
const char *v4; // r2
cocos2d::CCLabelBMFont *v5; // r0
int v6; // r10
int v7; // r4
void (__fastcall *v8)(int, _DWORD *); // r8
void (__fastcall *v9)(int, _DWORD *); // r8
const char *v10; // r1
int v11; // r3
void (__fastcall *v12)(int, _DWORD *); // r2
char v13; // r3
char *v14; // r1
size_t v15; // r2
const char *v16; // r2
cocos2d::CCLabelBMFont *v17; // r0
int v18; // r6
void (__fastcall *v19)(int, _DWORD *); // r10
void (__fastcall *v20)(int, _DWORD *); // r10
int v21; // r11
float v22; // s17
float v23; // r0
int v24; // r3
int v25; // r3
char *v26; // r0
int v27; // r5
cocos2d::CCMenu *v28; // r5
int v29; // r4
int (__fastcall *v30)(int, _BYTE *); // r5
_BYTE v32[8]; // [sp+14h] [bp-30h] BYREF
_DWORD v33[2]; // [sp+1Ch] [bp-28h] BYREF
int v34[2]; // [sp+24h] [bp-20h] BYREF
cocos2d::CCLabelBMFont *v35; // [sp+2Ch] [bp-18h]
unsigned __int8 v36; // [sp+30h] [bp-14h] BYREF
char v37; // [sp+31h] [bp-13h] BYREF
size_t v38; // [sp+34h] [bp-10h]
char *v39; // [sp+38h] [bp-Ch]
*((_DWORD *)this + 105) = a2;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1);
if ( (*((_BYTE *)a2 + 60) & 1) != 0 )
v5 = *((cocos2d::CCLabelBMFont **)a2 + 17);
else
v5 = (OptionsObject *)((char *)a2 + 61);
v6 = *((_DWORD *)a2 + 20);
v7 = cocos2d::CCLabelBMFont::create(v5, "bigFont.fnt", v4);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v7, 2);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 80))(v7, 1053609165);
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 0.0, 0.5);
v8(v7, v33);
v9 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 40.0, *((float *)this + 101) * 0.5);
v9(v7, v33);
v11 = *((_DWORD *)a2 + 19);
if ( v11 )
{
if ( v11 != 1 )
goto LABEL_21;
v24 = *((_DWORD *)a2 + 21);
if ( !v24 )
goto LABEL_21;
v25 = *(_DWORD *)(v24 + 1648);
if ( *(_BYTE *)(v25 + 385) )
{
v12 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 536);
LOWORD(v33[0]) = -1;
v13 = -106;
}
else
{
if ( !*(_BYTE *)(v25 + 384) )
goto LABEL_21;
v12 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 536);
LOWORD(v33[0]) = -17991;
v13 = -46;
}
goto LABEL_20;
}
if ( !v6 )
{
v12 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 536);
v13 = -106;
LOWORD(v33[0]) = -26986;
LABEL_20:
BYTE2(v33[0]) = v13;
v12(v7, v33);
goto LABEL_21;
}
if ( v6 > 0 )
{
v34[0] = 0;
v34[1] = 0;
v35 = nullptr;
std::string::__init(v34, "[ ", 2u);
GameToolbox::intToString((GameToolbox *)&v36, v6);
if ( (v36 & 1) != 0 )
{
v14 = v39;
v15 = v38;
}
else
{
v15 = (int)v36 >> 1;
v14 = &v37;
}
std::string::append(v34, v14, v15);
std::string::~string((int)&v36);
std::string::append(v34, " ]", 2u);
if ( (v34[0] & 1) != 0 )
v17 = v35;
else
v17 = (cocos2d::CCLabelBMFont *)((char *)v34 + 1);
v18 = cocos2d::CCLabelBMFont::create(v17, "chatFont.fnt", v16);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v18, 2);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v18 + 80))(v18, 1058642330);
v19 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, 0.0, 0.5);
v19(v18, v33);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v18 + 536))(v18, &byte_BEB9C0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v18 + 512))(v18, 175);
v20 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 92);
v21 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 96))(v7);
v22 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7);
v23 = (*(float (__fastcall **)(int))(*(_DWORD *)v7 + 84))(v7);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, (float)(v22 * v23) + 8.0, 0.0);
cocos2d::CCPoint::operator+(v33, v21, v32);
v20(v18, v33);
std::string::~string((int)v34);
}
LABEL_21:
if ( *(_BYTE *)(*((_DWORD *)this + 105) + 56) )
v26 = "GJ_checkOn_001.png";
else
v26 = "GJ_checkOff_001.png";
v27 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v26, v10);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 80))(v27, 1058642330);
v33[0] = OptionsCell::onToggleOption;
v33[1] = 0;
v28 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v27, 0, (int)this, (int)OptionsCell::onToggleOption, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v28, 1.5);
v29 = cocos2d::CCMenu::create(v28, nullptr);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v29, 3);
v30 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v29 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 20.0, *((float *)this + 101) * 0.5);
return v30(v29, v32);
}