//
// ShareListLayer::init from 0x100361db0 to 0x100362e50 (4256 bytes)
//
// 1 xrefs:
// > ShareListLayer::create @ 0x1003606f6
//
// 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
//
bool __fastcall ShareListLayer::init(ShareListLayer *a1, GJLevelList *a2)
{
bool v3; // al
bool v4; // bl
cocos2d::CCLayer *v5; // rax
cocos2d::extension::CCScale9Sprite *v6; // r15
double v7; // xmm0_8
GJLevelList *m_list; // rax
const char *data; // rdi
cocos2d::CCLabelBMFont *v10; // r15
char *v11; // r12
unsigned __int64 *v12; // rbx
__int64 v13; // r14
cocos2d::extension::CCScale9Sprite *v14; // r12
double v15; // xmm0_8
const std::string::value_type *v16; // rsi
unsigned __int64 v17; // r12
std::string::size_type size; // rbx
const char *v19; // r14
std::string::pointer v20; // r15
unsigned __int8 v21; // r13
signed __int64 v22; // rax
size_t v23; // rdx
char *v24; // rbx
char *v25; // rax
char *v26; // rax
std::string::size_type v27; // rax
const std::string::value_type *v28; // rcx
std::string::size_type v29; // r8
std::string::size_type v30; // rbx
std::string::size_type v31; // rax
unsigned __int128 v32; // kr00_16
int v33; // eax
size_t v34; // rax
size_t v35; // r12
char *v36; // r13
size_t v37; // rbx
char *v38; // r15
__int64 v39; // rbx
cocos2d::CCMenu *v40; // rax
__int64 v41; // rcx
__int64 v42; // rdi
cocos2d::CCMenu *v43; // rsi
cocos2d::CCArray *v44; // r15
ButtonSprite *v45; // rax
__int64 v46; // r13
CCMenuItemSpriteExtra *v47; // r12
const char *v48; // r9
ButtonSprite *v49; // rax
CCMenuItemSpriteExtra *v50; // r12
const cocos2d::CCPoint *v51; // r12
cocos2d::CCPoint v52; // xmm1_8
cocos2d::CCSprite *v53; // rax
CCMenuItemSpriteExtra *v54; // r15
const cocos2d::CCPoint *v55; // r12
__int64 v56; // r15
unsigned __int8 v57; // r14
__int64 v58; // rbx
__int64 ToggleButton; // r15
__int64 v60; // r15
const cocos2d::CCPoint *v61; // r12
__int64 v62; // r15
unsigned __int8 v63; // r14
__int64 v64; // rbx
__int64 v65; // rax
__int64 v66; // r15
const cocos2d::CCPoint *v67; // r12
unsigned __int8 v68; // bl
void *v69; // r15
__int64 v70; // rax
__int64 v71; // rax
const char *v72; // rdi
cocos2d::CCSprite *v73; // r15
cocos2d::CCString *v74; // rax
const char *CString; // rax
cocos2d::CCLabelBMFont *v76; // r12
unsigned __int64 *v77; // r14
char v79; // [rsp+0h] [rbp-1E0h]
unsigned __int64 v80[2]; // [rsp+38h] [rbp-1A8h] BYREF
float v81; // [rsp+48h] [rbp-198h] BYREF
unsigned __int64 v82; // [rsp+50h] [rbp-190h] BYREF
unsigned __int64 v83; // [rsp+58h] [rbp-188h] BYREF
__int128 v84; // [rsp+60h] [rbp-180h] BYREF
void *v85; // [rsp+70h] [rbp-170h]
char v86; // [rsp+78h] [rbp-168h] BYREF
_BYTE v87[23]; // [rsp+79h] [rbp-167h] BYREF
char v88; // [rsp+90h] [rbp-150h] BYREF
char v89[15]; // [rsp+91h] [rbp-14Fh] BYREF
void *v90; // [rsp+A0h] [rbp-140h]
_QWORD v91[2]; // [rsp+A8h] [rbp-138h] BYREF
void *v92; // [rsp+B8h] [rbp-128h]
char v93; // [rsp+C0h] [rbp-120h] BYREF
char v94[15]; // [rsp+C1h] [rbp-11Fh] BYREF
void *v95; // [rsp+D0h] [rbp-110h]
_QWORD v96[2]; // [rsp+D8h] [rbp-108h] BYREF
void *v97; // [rsp+E8h] [rbp-F8h]
char v98; // [rsp+F0h] [rbp-F0h] BYREF
_BYTE v99[23]; // [rsp+F1h] [rbp-EFh] BYREF
std::string::size_type v100; // [rsp+108h] [rbp-D8h]
unsigned __int64 v101[2]; // [rsp+110h] [rbp-D0h] BYREF
void *v102; // [rsp+120h] [rbp-C0h]
std::string::value_type v103[8]; // [rsp+128h] [rbp-B8h] BYREF
std::string::size_type v104; // [rsp+130h] [rbp-B0h]
void *v105; // [rsp+138h] [rbp-A8h]
__int128 __dst; // [rsp+140h] [rbp-A0h] BYREF
void *__p; // [rsp+150h] [rbp-90h]
char v108[8]; // [rsp+158h] [rbp-88h]
__int64 v109; // [rsp+160h] [rbp-80h]
double v110[2]; // [rsp+168h] [rbp-78h] BYREF
void *v111; // [rsp+178h] [rbp-68h]
std::string __src; // [rsp+180h] [rbp-60h] BYREF
bool v113; // [rsp+1A3h] [rbp-3Dh]
unsigned __int64 v114; // [rsp+1A4h] [rbp-3Ch] BYREF
float v115; // [rsp+1ACh] [rbp-34h] BYREF
float v116; // [rsp+1B0h] [rbp-30h]
bool v117; // [rsp+1B7h] [rbp-29h]
double v118; // 0:xmm0_8.8
double v119; // 0:xmm0_8.8
double v120; // 0:xmm0_8.8
double v121; // 0:xmm0_8.8
cocos2d::CCRect v122; // 0:xmm0_8.8,8:xmm1_8.8
cocos2d::CCRect v123; // 0:xmm0_8.8,8:xmm1_8.8
*(_DWORD *)&__src.__r_.__value_.__l.0 = -1778384896;
v3 = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::ccColor4B *)&__src);
v4 = v3;
if ( !v3 )
return v4;
v113 = v3;
FLAlertLayer::incrementForcePrio(a1);
a1->m_list = a2;
cocos2d::CCObject::retain(a2);
((void (__fastcall *)(ShareListLayer *, __int64))a1->setTouchEnabled)(a1, 1);
((void (__fastcall *)(ShareListLayer *, __int64))a1->setKeypadEnabled)(a1, 1);
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v118 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v115);
v5 = cocos2d::CCLayer::create();
a1->m_mainLayer = v5;
((void (__fastcall *)(ShareListLayer *, cocos2d::CCLayer *, double))a1->addChild)(a1, v5, v118);
v122.origin = 0;
v122.size = 0;
sub_10028CC00((__int64)&__src, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v6 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", v122);
sub_10028CBF0((float *)&__src, 420.0, 300.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, std::string *))v6->setContentSize)(v6, &__src);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v6,
0xFFFFFFFFLL);
*(_QWORD *)&v7 = LODWORD(v115);
*(float *)&v7 = v115 * 0.5;
sub_10028CBE0((float *)&__src, v115 * 0.5, v116 * 0.5);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, std::string *))v6->setPosition)(v6, &__src);
m_list = a1->m_list;
if ( (m_list->m_listName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(&__src, m_list->m_listName.m_data.m_long.longStorage, m_list->m_listName.m_data.m_long.size, v7);
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_4;
}
else
{
__src = (std::string)m_list->m_listName;
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_4:
data = __src.__r_.__value_.__s.__data_;
goto LABEL_7;
}
}
data = __src.__r_.__value_.__l.__data_;
LABEL_7:
v10 = cocos2d::CCLabelBMFont::create_3(data, "goldFont.fnt");
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__src.__r_.__value_.__l.__data_);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v10);
sub_10028CBE0((float *)&__src, v115 * 0.5, (float)((float)(v116 * 0.5) + 150.0) + -20.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v10->setPosition)(v10, &__src);
v85 = operator new(0x38u);
*(_QWORD *)&v84 = 57;
*((_QWORD *)&v84 + 1) = 53;
strcpy((char *)v85, "You cannot change the name once it is shared.");
sub_10028CBE0((float *)&__src, 0.5, 1.0);
LODWORD(v109) = 1065353216;
v11 = TextArea::create(&v84, (__int64)"chatFont.fnt", (double *)&__src, 0, 1.0, 400.0, 20.0);
if ( (v84 & 1) != 0 )
operator delete(v85);
((void (__fastcall *)(cocos2d::CCLayer *, char *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v11);
v12 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v10->getPosition)(v10);
sub_10028CBE0((float *)v101, 0.0, -20.0);
*(_QWORD *)v108 = a1;
sub_10028CCE0((double *)&__src, v12, v101);
v13 = *(_QWORD *)v108;
(*(void (__fastcall **)(char *, std::string *))(*(_QWORD *)v11 + 184LL))(v11, &__src);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v11 + 160LL))(v11, 0.80000001);
sub_10028CBE0((float *)&v82, v115 * 0.5, (float)(0.5 * v116) + 45.0);
v123.size = 0;
sub_10028CC00((__int64)v80, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
*(double *)&v123.origin = sub_10028D180((__m128 *)&__src, v80);
v14 = cocos2d::extension::CCScale9Sprite::create_2("square02b_001.png", v123);
sub_10028CBF0(&v81, 380.0, 80.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float *))v14->setContentSize)(v14, &v81);
(*(void (__fastcall **)(_QWORD, cocos2d::extension::CCScale9Sprite *, __int64))(**(_QWORD **)(v13 + 576) + 448LL))(
*(_QWORD *)(v13 + 576),
v14,
0xFFFFFFFFLL);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, unsigned __int64 *))v14->setPosition)(v14, &v82);
__src.__r_.__value_.__s.__data_[1] = 33;
*(_WORD *)&__src.__r_.__value_.__l.0 = 16514;
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, std::string *))v14->setColor)(v14, &__src);
__src.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x20u);
__src.__r_.__value_.__r.__words[0] = 33;
__src.__r_.__value_.__l.__size_ = 25;
v15 = *(double *)"(No description provided)";
strcpy(__src.__r_.__value_.__l.__data_, "(No description provided)");
GJLevelList::getUnpackedDescription(v101);
if ( (v101[0] & 1) != 0 )
{
if ( !v101[1] )
goto LABEL_19;
LABEL_15:
if ( (v101[0] & 1) != 0 )
v16 = (const std::string::value_type *)v102;
else
v16 = (char *)v101 + 1;
std::string::assign(&__src, v16);
goto LABEL_19;
}
if ( LOBYTE(v101[0]) >> 1 )
goto LABEL_15;
LABEL_19:
*(_WORD *)v103 = 0;
v17 = *(_BYTE *)&__src.__r_.__value_.__l.0 >> 1;
size = __src.__r_.__value_.__l.__size_;
v100 = __src.__r_.__value_.__l.__size_;
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
size = *(_BYTE *)&__src.__r_.__value_.__l.0 >> 1;
v19 = __src.__r_.__value_.__l.__data_;
v20 = __src.__r_.__value_.__l.__data_;
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
v20 = __src.__r_.__value_.__s.__data_;
v117 = (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0;
v21 = 0;
v22 = 0;
LABEL_24:
v23 = size - v22;
if ( (__int64)size > v22 )
{
v24 = &v20[size];
v25 = &v20[v22];
do
{
v26 = (char *)memchr(v25, -96, v23);
if ( !v26 )
break;
if ( *v26 == -96 )
{
if ( v26 != v24 )
{
v27 = v26 - v20;
if ( v27 != -1 )
{
if ( (v21 & 1) != 0 )
{
v28 = (const std::string::value_type *)v105;
v29 = v104;
}
else
{
v29 = v21 >> 1;
v28 = &v103[1];
}
v30 = v27;
std::string::replace(&__src, v27, 1u, v28, v29);
v21 = v103[0];
if ( (v103[0] & 1) != 0 )
v31 = v104;
else
v31 = (unsigned __int8)v103[0] >> 1;
v22 = v30 + v31;
v17 = *(_BYTE *)&__src.__r_.__value_.__l.0 >> 1;
v117 = (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0;
v19 = __src.__r_.__value_.__l.__data_;
v32 = *(_OWORD *)&__src.__r_.__value_.__r.__words[1];
v20 = (std::string::pointer)(v32 >> 64);
size = v32;
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
v20 = __src.__r_.__value_.__s.__data_;
v100 = __src.__r_.__value_.__l.__size_;
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
size = *(_BYTE *)&__src.__r_.__value_.__l.0 >> 1;
if ( size >= v22 )
goto LABEL_24;
}
}
break;
}
v25 = v26 + 1;
v23 = v24 - v25;
}
while ( v24 - v25 > 0 );
}
if ( !v117 && (v33 = 300, v17 = v100, v100 > 0x12C) || (v33 = v17, v17 >= 0x47) )
{
HIDWORD(v15) = 0;
*(float *)&v15 = (float)((float)((float)(180 - v33) / 300.0) * 0.2) + 0.80000001;
*(float *)&v109 = *(float *)&v15;
}
if ( v117 )
v19 = __src.__r_.__value_.__s.__data_;
v34 = strlen(v19);
if ( v34 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v15);
v35 = v34;
if ( v34 >= 0x17 )
{
v37 = 26;
if ( (v34 | 7) != 0x17 )
v37 = (v34 | 7) + 1;
v36 = (char *)operator new(v37);
__p = v36;
*(_QWORD *)&__dst = v37 | 1;
*((_QWORD *)&__dst + 1) = v35;
goto LABEL_56;
}
LOBYTE(__dst) = 2 * v34;
v36 = (char *)&__dst + 1;
if ( v34 )
LABEL_56:
memmove(v36, v19, v35);
v36[v35] = 0;
sub_10028CBE0((float *)v110, 0.5, 0.5);
v38 = TextArea::create(&__dst, (__int64)"chatFont.fnt", v110, 1u, 1.0, 320.0 / *(float *)&v109, 20.0);
v39 = *(_QWORD *)v108;
if ( (__dst & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v39 + 576) + 440LL))(*(_QWORD *)(v39 + 576), v38);
sub_10028CBE0((float *)&v114, 0.0, 1.0);
sub_10028CCE0(v110, &v82, &v114);
(*(void (__fastcall **)(char *, double *))(*(_QWORD *)v38 + 184LL))(v38, v110);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v38 + 160LL))(v38, *(float *)&v109);
*(_DWORD *)(*(_QWORD *)v108 + 624LL) = -1;
v40 = cocos2d::CCMenu::create();
v41 = *(_QWORD *)v108;
*(_QWORD *)(*(_QWORD *)v108 + 544LL) = v40;
v42 = *(_QWORD *)(v41 + 576);
v43 = v40;
(*(void (__fastcall **)(__int64, cocos2d::CCMenu *, __int64))(*(_QWORD *)v42 + 448LL))(v42, v40, 10);
v44 = (cocos2d::CCArray *)sub_10071F9E0(v42, v43);
v45 = sub_100092A30("Cancel");
v46 = *(_QWORD *)v108;
v47 = CCMenuItemSpriteExtra::create(
v45,
nullptr,
*(cocos2d::CCObject **)v108,
(cocos2d::SEL_MenuHandler)(unsigned __int64)ShareListLayer::onClose);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(v46 + 544) + 440LL))(
*(_QWORD *)(v46 + 544),
v47);
sub_10071FCD0(v44, v47);
v48 = "GJ_button_01.png";
if ( *(_BYTE *)(*(_QWORD *)(v46 + 632) + 395LL) )
v48 = "GJ_button_04.png";
v49 = sub_100092BF0("Share List", 0, 0, 0, "goldFont.fnt", v48, 1.0);
v50 = CCMenuItemSpriteExtra::create(
v49,
nullptr,
(cocos2d::CCObject *)v46,
(cocos2d::SEL_MenuHandler)(unsigned __int64)ShareListLayer::onShare);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(v46 + 544) + 440LL))(
*(_QWORD *)(v46 + 544),
v50);
sub_10071FCD0(v44, v50);
v51 = *(const cocos2d::CCPoint **)(v46 + 544);
v52 = (cocos2d::CCPoint)LODWORD(v116);
v52.x = (float)((float)(v116 * 0.5) + -150.0) + 25.0;
sub_10028CBE0((float *)&v114, v115 * 0.5, v52.x);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v110, v51);
GameToolbox::alignItemsHorisontally(v44, 15.0, v52, (bool)v110);
v53 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v54 = CCMenuItemSpriteExtra::create(
v53,
nullptr,
(cocos2d::CCObject *)v46,
(cocos2d::SEL_MenuHandler)(unsigned __int64)ShareListLayer::onInfo);
CCMenuItemSpriteExtra::setSizeMult(v54, 2.0);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(v46 + 544) + 440LL))(
*(_QWORD *)(v46 + 544),
v54);
v55 = *(const cocos2d::CCPoint **)(v46 + 544);
sub_10028CBE0(
(float *)&v114,
(float)((float)(v115 * 0.5) + -210.0) + 20.0,
(float)((float)(v116 * 0.5) + 150.0) + -20.0);
*(cocos2d::CCPoint *)&v119 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v110, v55);
((void (__fastcall *)(CCMenuItemSpriteExtra *, double *, double))v54->setPosition)(v54, v110, v119);
v86 = 16;
strcpy(v87, "Unlisted");
v56 = *(_QWORD *)(v46 + 544);
v57 = *(_BYTE *)(*(_QWORD *)(v46 + 632) + 393LL);
sub_10028CBE0((float *)v110, (float)(v115 * 0.5) + -120.0, (float)(v116 * 0.5) + -70.0);
v58 = *(_QWORD *)(v46 + 576);
sub_10028CBE0((float *)&v114, 8.0, 0.0);
ToggleButton = GameToolbox::createToggleButton(
(unsigned int)&v86,
(unsigned int)ShareListLayer::onUnlisted,
0,
v57,
v56,
(unsigned int)v110,
v46,
v58,
(__int64)&v114,
(__int64)"bigFont.fnt",
0,
0,
0);
if ( (v86 & 1) != 0 )
operator delete(*(void **)&v87[15]);
(*(void (__fastcall **)(__int64, _QWORD, double, double, double))(*(_QWORD *)ToggleButton + 72LL))(
ToggleButton,
0,
COERCE_DOUBLE(1061997773),
COERCE_DOUBLE(1053609165),
0.0);
v88 = 8;
strcpy(v89, "Info");
v92 = operator new(0xA8u);
v91[0] = 169;
v91[1] = 162;
strcpy(
(char *)v92,
"Makes it so that your list can only be found by searching for the exact ID. It will not be visible o"
"n your profile, from search, or anywhere else.");
v60 = InfoAlertButton::create(&v88, v91, 0.80000001);
if ( (v91[0] & 1) != 0 )
operator delete(v92);
if ( (v88 & 1) != 0 )
operator delete(v90);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v46 + 544) + 440LL))(*(_QWORD *)(v46 + 544), v60);
v61 = *(const cocos2d::CCPoint **)(v46 + 544);
sub_10028CBE0((float *)&v114, (float)((float)(v115 * 0.5) + -120.0) + -30.0, (float)(v116 * 0.5) + -70.0);
*(cocos2d::CCPoint *)&v120 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v110, v61);
(*(void (__fastcall **)(__int64, double *, double))(*(_QWORD *)v60 + 184LL))(v60, v110, v120);
v62 = sub_10071F9E0(v60, v110);
v98 = 24;
strcpy(v99, "Friends Only");
v109 = *(_QWORD *)(v46 + 544);
v63 = *(_BYTE *)(*(_QWORD *)(v46 + 632) + 394LL);
sub_10028CBE0((float *)v110, (float)(v115 * 0.5) + 40.0, (float)(v116 * 0.5) + -70.0);
v64 = *(_QWORD *)(v46 + 576);
sub_10028CBE0((float *)&v114, 8.0, 0.0);
v65 = GameToolbox::createToggleButton(
(unsigned int)&v98,
(unsigned int)ShareListLayer::onUnlisted,
0,
v63,
v109,
(unsigned int)v110,
v46,
v64,
(__int64)&v114,
(__int64)"bigFont.fnt",
0,
0,
v62);
*(_QWORD *)(v46 + 640) = v65;
if ( (v98 & 1) != 0 )
{
operator delete(*(void **)&v99[15]);
v65 = *(_QWORD *)(v46 + 640);
}
(*(void (__fastcall **)(__int64, __int64, double, double, double))(*(_QWORD *)v65 + 72LL))(
v65,
1,
COERCE_DOUBLE(1061997773),
COERCE_DOUBLE(1053609165),
0.0);
*(_QWORD *)(v46 + 648) = sub_1007200C0(v62, 1);
v93 = 8;
strcpy(v94, "Info");
v97 = operator new(0xB8u);
v96[0] = 185;
v96[1] = 179;
strcpy(
(char *)v97,
"Makes it so that your list can only be found by friends who search for the exact ID. It will not"
" be visible on your profile, from search, or anywhere else.");
v66 = InfoAlertButton::create(&v93, v96, 0.80000001);
if ( (v96[0] & 1) != 0 )
operator delete(v97);
if ( (v93 & 1) != 0 )
operator delete(v95);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v46 + 544) + 440LL))(*(_QWORD *)(v46 + 544), v66);
v67 = *(const cocos2d::CCPoint **)(v46 + 544);
sub_10028CBE0((float *)&v114, (float)((float)(v115 * 0.5) + 40.0) + -30.0, (float)(v116 * 0.5) + -70.0);
*(cocos2d::CCPoint *)&v121 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v110, v67);
(*(void (__fastcall **)(__int64, double *, double))(*(_QWORD *)v66 + 184LL))(v66, v110, v121);
v68 = *(_BYTE *)(*(_QWORD *)(v46 + 632) + 393LL);
if ( v68 )
{
v69 = &unk_100819D28;
}
else
{
CCMenuItemToggler::toggle(*(CCMenuItemToggler **)(v46 + 640), 0);
v69 = &unk_100819D31;
}
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v46 + 640) + 1040LL))(*(_QWORD *)(v46 + 640), v68);
v70 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(v46 + 640) + 376LL) + 1056LL))(*(_QWORD *)(*(_QWORD *)(v46 + 640) + 376LL));
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v70 + 944LL))(v70, v69);
v71 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(v46 + 640) + 384LL) + 1056LL))(*(_QWORD *)(*(_QWORD *)(v46 + 640) + 384LL));
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v71 + 944LL))(v71, v69);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v46 + 648) + 1056LL))(*(_QWORD *)(v46 + 648), v69);
GJLevelList::frameForListDifficulty(v110, *(unsigned int *)(*(_QWORD *)(v46 + 632) + 360LL), 2);
v4 = v113;
if ( (LOBYTE(v110[0]) & 1) != 0 )
v72 = (const char *)v111;
else
v72 = (char *)v110 + 1;
v73 = cocos2d::CCSprite::createWithSpriteFrameName(v72);
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**(_QWORD **)(v46 + 576) + 448LL))(
*(_QWORD *)(v46 + 576),
v73,
1);
sub_10028CBE0((float *)&v114, (float)(v115 * 0.5) + -50.0, (float)(0.5 * v116) + -25.0);
((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v73->setPosition)(v73, &v114);
GJLevelList::totalLevels(*(GJLevelList **)(v46 + 632));
v74 = (cocos2d::CCString *)sub_1007AB580("%i Levels", v79);
CString = cocos2d::CCString::getCString(v74);
v76 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt");
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v76->setScale)(v76, 0.80000001);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(v46 + 576) + 448LL))(
*(_QWORD *)(v46 + 576),
v76,
1);
sub_10028CBE0((float *)&v114, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v76->setAnchorPoint)(v76, &v114);
v77 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v73->getPosition)(v73);
sub_10028CBE0((float *)&v83, 30.0, 0.0);
sub_10028CCE0((double *)&v114, v77, &v83);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v76->setPosition)(v76, &v114);
if ( (LOBYTE(v110[0]) & 1) != 0 )
{
operator delete(v111);
if ( (v103[0] & 1) == 0 )
{
LABEL_81:
if ( (v101[0] & 1) == 0 )
goto LABEL_82;
LABEL_87:
operator delete(v102);
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
return v4;
goto LABEL_83;
}
}
else if ( (v103[0] & 1) == 0 )
{
goto LABEL_81;
}
operator delete(v105);
if ( (v101[0] & 1) != 0 )
goto LABEL_87;
LABEL_82:
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 )
LABEL_83:
operator delete(__src.__r_.__value_.__l.__data_);
return v4;
}