//
// LevelCell::loadLocalLevelCell from 0x100236b10 to 0x1002373bd (2221 bytes)
//
// 1 xrefs:
// > LevelCell::loadFromLevel @ 0x10022a403
//
// 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:13 +0000
//
__int64 __fastcall LevelCell::loadLocalLevelCell(__int64 a1)
{
__int64 v2; // rax
std::string::pointer data; // rdi
__int64 v4; // r14
float *v5; // rax
double v6; // xmm0_8
__int64 v7; // rax
__int64 CString; // rax
__int64 v9; // r15
__int64 v10; // rsi
__int64 v11; // r12
char *v12; // r15
__int64 v13; // r12
__int64 v14; // r13
float v15; // xmm0_4
float *v16; // rax
double v17; // xmm0_8
__int64 v18; // rbx
__int64 v19; // r12
std::string::pointer v20; // rdi
__int64 v21; // r14
__int64 v22; // rbx
__int64 v23; // r15
__int64 v24; // r12
float v25; // xmm0_4
std::string::pointer v26; // rdi
__int64 v27; // r14
__int64 v28; // rbx
__int64 v29; // r15
__int64 v30; // r12
float v31; // xmm0_4
__int64 v32; // rax
const char *v33; // rdi
__int64 v34; // r14
__int64 v35; // rbx
char v37[8]; // [rsp+0h] [rbp-60h] BYREF
_BYTE v38[8]; // [rsp+8h] [rbp-58h] BYREF
std::string v39; // [rsp+10h] [rbp-50h] BYREF
float v40; // [rsp+34h] [rbp-2Ch]
v2 = *(_QWORD *)(a1 + 560);
if ( (*(_BYTE *)(v2 + 344) & 1) != 0 )
{
sub_10001AD30(&v39, *(const void **)(v2 + 360), *(_QWORD *)(v2 + 352));
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_3;
}
else
{
v39 = *(std::string *)(v2 + 344);
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_3:
data = v39.__r_.__value_.__s.__data_;
goto LABEL_6;
}
}
data = v39.__r_.__value_.__l.__data_;
LABEL_6:
v4 = cocos2d::CCLabelBMFont::create_3(data, "bigFont.fnt");
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v39.__r_.__value_.__l.__data_);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 536) + 456LL))(*(_QWORD *)(a1 + 536), v4);
sub_100278250(&v39, 0.0, 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v4 + 296LL))(v4, &v39);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v4 + 160LL))(v4, 1.0);
sub_100278250(&v39, 12.0, (float)(*(float *)(a1 + 524) * 0.5) + 14.0);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v4 + 184LL))(v4, &v39);
if ( *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 328LL))(v4) > 200.0 )
{
v5 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 328LL))(v4);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v4 + 160LL))(v4, 200.0 / *v5);
}
v6 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v4 + 168LL))(v4);
if ( *(float *)&v6 <= 0.80000001 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 168LL))(v4);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 160LL))(v4);
if ( *(int *)(*(_QWORD *)(a1 + 560) + 612LL) > 0 )
{
v7 = sub_10088E820("Rev. %i", v37[0]);
CString = cocos2d::CCString::getCString(v7);
v9 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 536) + 456LL))(*(_QWORD *)(a1 + 536), v9);
sub_100278250(&v39, 0.0, 0.0);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v9 + 296LL))(v9, &v39);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v9 + 160LL))(v9, 0.40000001);
v40 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v4 + 168LL))(v4);
v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 328LL))(v4);
sub_100278630(&v39, v10);
v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 192LL))(v4);
sub_100278250(
v37,
(float)(*(float *)&v39.__r_.__value_.__l.0 * v40) + 10.0,
(float)(*((float *)v39.__r_.__value_.__r.__words + 1) * -0.5) * v40);
sub_100278350(v38, v11, v37);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 184LL))(v9, v38);
}
v12 = ButtonSprite::create_1(
(__int64)"View",
0x32u,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_01.png",
0.60000002,
30.0);
v13 = CCMenuItemSpriteExtra::create(v12, 0, a1, LevelCell::onClick, 0);
v14 = a1;
v15 = 1.0;
if ( !*(_BYTE *)(*(_QWORD *)(a1 + 560) + 772LL) )
v15 = 1.5;
CCMenuItemSpriteExtra::setSizeMult(v13, v15);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 592) + 456LL))(*(_QWORD *)(a1 + 592), v13);
v40 = *(float *)(a1 + 520);
v16 = (float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v12 + 328LL))(v12);
sub_100278250(&v39, (float)(v40 - (float)(*v16 * 0.5)) + -9.0, 0.5 * *(float *)(a1 + 524));
v17 = sub_100278300(a1 + 584, &v39);
v18 = *(_QWORD *)(a1 + 592);
cocos2d::CCNode::convertToWorldSpace(v38, *(_QWORD *)(v14 + 536), v14 + 584);
cocos2d::CCNode::convertToNodeSpace(&v39, v18, v38);
(*(void (__fastcall **)(__int64, std::string *, double))(*(_QWORD *)v13 + 184LL))(v13, &v39, v17);
v40 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 192LL))(v4) + 9.0;
v19 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v14 + 536) + 456LL))(*(_QWORD *)(v14 + 536), v19);
sub_100278250(&v39, v40, 20.0);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v19 + 184LL))(v19, &v39);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v19 + 160LL))(v19, 0.69999999);
GJGameLevel::lengthKeyToString(&v39, *(unsigned int *)(*(_QWORD *)(v14 + 560) + 900LL));
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
v20 = v39.__r_.__value_.__l.__data_;
else
v20 = v39.__r_.__value_.__s.__data_;
v21 = cocos2d::CCLabelBMFont::create_3(v20, "bigFont.fnt");
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v39.__r_.__value_.__l.__data_);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v14 + 536) + 456LL))(*(_QWORD *)(v14 + 536), v21);
sub_100278250(&v39, 0.0, 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v21 + 296LL))(v21, &v39);
v22 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v19 + 192LL))(v19);
sub_100278250(v38, 9.0, 0.0);
sub_100278350(&v39, v22, v38);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v21 + 184LL))(v21, &v39);
if ( (float)(100.0 / *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 328LL))(v21)) <= 0.40000001 )
(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 328LL))(v21);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v21 + 160LL))(v21);
v23 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_noteIcon_001.png");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v14 + 536) + 456LL))(*(_QWORD *)(v14 + 536), v23);
v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 192LL))(v21);
v40 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 328LL))(v21);
v25 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v21 + 168LL))(v21);
sub_100278250(v38, (float)(v25 * v40) + 17.0, 0.0);
sub_100278350(&v39, v24, v38);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v23 + 184LL))(v23, &v39);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v23 + 160LL))(v23, 0.69999999);
GJGameLevel::getSongName(&v39);
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
v26 = v39.__r_.__value_.__l.__data_;
else
v26 = v39.__r_.__value_.__s.__data_;
v27 = cocos2d::CCLabelBMFont::create_3(v26, "bigFont.fnt");
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v39.__r_.__value_.__l.__data_);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v14 + 536) + 456LL))(*(_QWORD *)(v14 + 536), v27);
sub_100278250(&v39, 0.0, 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v27 + 296LL))(v27, &v39);
v28 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23);
sub_100278250(v38, 9.0, 0.0);
sub_100278350(&v39, v28, v38);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v27 + 184LL))(v27, &v39);
if ( (float)(100.0 / *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v27 + 328LL))(v27)) <= 0.40000001 )
(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v27 + 328LL))(v27);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v27 + 160LL))(v27);
v29 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v14 + 536) + 456LL))(*(_QWORD *)(v14 + 536), v29);
v30 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v27 + 192LL))(v27);
v40 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v27 + 328LL))(v27);
v31 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v27 + 168LL))(v27);
sub_100278250(v38, (float)(v31 * v40) + 17.0, 0.0);
sub_100278350(&v39, v30, v38);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v29 + 184LL))(v29, &v39);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v29 + 160LL))(v29, 0.69999999);
v32 = *(_QWORD *)(v14 + 560);
if ( *(_BYTE *)(v32 + 785) )
{
v33 = "Uploaded";
}
else
{
v33 = "Unverified";
if ( *(_DWORD *)(v32 + 776) - *(_DWORD *)(v32 + 780) == 1 )
v33 = "Verified";
}
v34 = cocos2d::CCLabelBMFont::create_3(v33, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v14 + 536) + 456LL))(*(_QWORD *)(v14 + 536), v34);
sub_100278250(&v39, 0.0, 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v34 + 296LL))(v34, &v39);
v35 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v29 + 192LL))(v29);
sub_100278250(v38, 9.0, 0.0);
sub_100278350(&v39, v35, v38);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v34 + 184LL))(v34, &v39);
if ( (float)(60.0 / *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v34 + 328LL))(v34)) <= 0.40000001 )
(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v34 + 328LL))(v34);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v34 + 160LL))(v34);
}