//
// sub_100229CF0 from 0x100229cf0 to 0x10022a081 (913 bytes)
//
// 2 xrefs:
// > CustomListView::loadCell @ 0x1002281d7
// > CustomListView::reloadAll @ 0x10023619a
//
// This function is hookable on this platform (idp: pc, 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 12:27:06 +0000
//
__int64 __fastcall sub_100229CF0(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
int v4; // r12d
__int64 v5; // r14
int v6; // eax
const std::string::value_type *p_s; // rsi
std::string::size_type v8; // rdx
__int64 v9; // rax
__int64 v10; // rax
const char *v11; // rdi
__int64 v12; // r14
__int64 v13; // rax
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
__int64 v18; // r14
std::string::pointer data; // rdi
__int64 v21; // r15
__int64 v22; // r12
float v23; // xmm2_4
_BYTE v24[8]; // [rsp+Ch] [rbp-64h] BYREF
float v25; // [rsp+14h] [rbp-5Ch]
unsigned __int8 v26; // [rsp+18h] [rbp-58h] BYREF
std::string::value_type __s; // [rsp+19h] [rbp-57h] BYREF
std::string::size_type v28; // [rsp+20h] [rbp-50h]
void *__p; // [rsp+28h] [rbp-48h]
std::string v30; // [rsp+30h] [rbp-40h] BYREF
*(_QWORD *)(a1 + 552) = a2;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 536) + 584LL))(*(_QWORD *)(a1 + 536), 1);
if ( (*(_BYTE *)(a2 + 64) & 1) != 0 )
v3 = *(_QWORD *)(a2 + 80);
else
v3 = a2 + 65;
v4 = *(_DWORD *)(a2 + 100);
v5 = cocos2d::CCLabelBMFont::create_3(v3, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 536) + 464LL))(*(_QWORD *)(a1 + 536), v5, 2);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v5 + 160LL))(v5, 0.40000001);
sub_100278250(&v30, 0.0, 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v5 + 296LL))(v5, &v30);
sub_100278250(&v30, 40.0, 0.5 * *(float *)(a1 + 524));
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v5 + 184LL))(v5, &v30);
v6 = *(_DWORD *)(a2 + 96);
if ( v6 == 1 )
{
v9 = *(_QWORD *)(a2 + 104);
if ( !v9 )
goto LABEL_17;
v10 = *(_QWORD *)(v9 + 1840);
if ( *(_BYTE *)(v10 + 465) == 1 )
{
v30.__r_.__value_.__s.__data_[1] = -106;
*(_WORD *)&v30.__r_.__value_.__l.0 = -1;
}
else
{
if ( *(_BYTE *)(v10 + 464) != 1 )
goto LABEL_17;
v30.__r_.__value_.__s.__data_[1] = -46;
*(_WORD *)&v30.__r_.__value_.__l.0 = -17991;
}
goto LABEL_16;
}
if ( v6 )
goto LABEL_17;
if ( !v4 )
{
v30.__r_.__value_.__s.__data_[1] = -106;
*(_WORD *)&v30.__r_.__value_.__l.0 = -26986;
LABEL_16:
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v5 + 1072LL))(v5, &v30);
goto LABEL_17;
}
if ( v4 > 0 )
{
v30.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(v30.__r_.__value_.__s.__data_, "[ ");
GameToolbox::intToString(&v26, (unsigned int)v4);
if ( (v26 & 1) != 0 )
{
p_s = (const std::string::value_type *)__p;
v8 = v28;
}
else
{
v8 = v26 >> 1;
p_s = &__s;
}
std::string::append(&v30, p_s, v8);
if ( (v26 & 1) != 0 )
operator delete(__p);
std::string::append(&v30, " ]");
if ( (*(_BYTE *)&v30.__r_.__value_.__s.0 & 1) != 0 )
data = v30.__r_.__value_.__l.__data_;
else
data = v30.__r_.__value_.__s.__data_;
v21 = cocos2d::CCLabelBMFont::create_3(data, "chatFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 536) + 464LL))(*(_QWORD *)(a1 + 536), v21, 2);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v21 + 160LL))(v21, 0.60000002);
sub_100278250(&v26, 0.0, 0.5);
(*(void (__fastcall **)(__int64, unsigned __int8 *))(*(_QWORD *)v21 + 296LL))(v21, &v26);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v21 + 1072LL))(v21, &unk_100A064E0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v21 + 1024LL))(v21, 175);
v22 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 192LL))(v5);
v25 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 328LL))(v5);
v23 = (float)(v25 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v5 + 168LL))(v5)) + 8.0;
sub_100278250(v24, v23, 0.0);
sub_100278350(&v26, v22, v24);
(*(void (__fastcall **)(__int64, unsigned __int8 *))(*(_QWORD *)v21 + 184LL))(v21, &v26);
if ( (*(_BYTE *)&v30.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v30.__r_.__value_.__l.__data_);
}
LABEL_17:
v11 = "GJ_checkOff_001.png";
if ( *(_BYTE *)(*(_QWORD *)(a1 + 552) + 60LL) )
v11 = "GJ_checkOn_001.png";
v12 = cocos2d::CCSprite::createWithSpriteFrameName(v11);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v12 + 160LL))(v12, 0.60000002);
v13 = CCMenuItemSpriteExtra::create(v12, 0, a1, OptionsCell::onToggleOption, 0);
LODWORD(v12) = v13;
CCMenuItemSpriteExtra::setSizeMult(v13, 1.5);
v18 = sub_1008735E0(v12, 0, v14, v15, v16, v17);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 536) + 464LL))(*(_QWORD *)(a1 + 536), v18, 3);
sub_100278250(&v30, 20.0, *(float *)(a1 + 524) * 0.5);
return (*(__int64 (__fastcall **)(__int64, std::string *))(*(_QWORD *)v18 + 184LL))(v18, &v30);
}