//
// ShareListLayer::init from 0xa79420 to 0xa7a7a4 (4996 bytes)
//
// 2 xrefs:
// > ShareListLayer::create @ 0xa7a8a8
// > ??> @ 0x84918
//
// 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 ShareListLayer::init(ShareListLayer *a1, GJLevelList *a2)
{
char v4; // w27
cocos2d::CCDirector *v6; // x0
cocos2d::CCLayer *v7; // x0
cocos2d::CCNode *v8; // x21
void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x22
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22
cocos2d::CCLabelBMFont *v11; // x23
void *v12; // x0
void (__fastcall *v13)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22
__int64 v14; // x25
void *v15; // x0
cocos2d::CCLayer *m_mainLayer; // x3
cocos2d::CCLabelBMFont *v17; // x0
const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1
void (__fastcall *v19)(__int64, cocos2d::CCRect *); // x23
cocos2d::CCNode *v20; // x21
int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x2
cocos2d::CCSize *v22; // x4
size_t v23; // x25
size_t v24; // x2
int v25; // w23
__int64 v26; // x25
__int64 *v27; // x0
__int64 v28; // x21
unsigned __int64 v29; // x0
float v30; // s11
cocos2d::CCNode *v31; // x21
void *v32; // x0
void (__fastcall *v33)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22
cocos2d::CCMenu *v34; // x0
cocos2d::CCLayer *v35; // x3
cocos2d::CCArray *v36; // x0
cocos2d::CCArray *v37; // x21
const char *v38; // x1
__int64 v39; // x2
__int64 v40; // x3
bool v41; // w4
__int64 v42; // x5
const char *v43; // x6
cocos2d::CCNode *v44; // x0
CCMenuItemSpriteExtra *v45; // x22
ButtonSprite *v46; // x0
CCMenuItemSpriteExtra *v47; // x22
cocos2d::CCMenu *m_buttonMenu; // x22
cocos2d::CCSprite *v49; // x0
CCMenuItemSpriteExtra *v50; // x21
cocos2d::CCMenu *v51; // x23
void (__fastcall *v52)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22
cocos2d::CCMenu *v53; // x23
cocos2d::CCLayer *v54; // x28
CCMenuItemToggler *v55; // x22
void *v56; // x0
cocos2d::CCNode *v57; // x23
void *v58; // x0
void *v59; // x0
cocos2d::CCMenu *v60; // x28
void (__fastcall *v61)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25
cocos2d::CCArray *v62; // x0
cocos2d::CCArray *v63; // x25
cocos2d::CCMenu *v64; // x2
CCMenuItemToggler *m_friendsOnlyToggler; // x0
void *v66; // x2
cocos2d::CCNode *v67; // x22
void *v68; // x0
void *v69; // x0
cocos2d::CCMenu *v70; // x25
void (__fastcall *v71)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCSprite *v72; // x21
void (__fastcall *v73)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22
unsigned int v74; // w0
cocos2d::CCString *v75; // x0
cocos2d::CCLabelBMFont *v76; // x22
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x19
void (__fastcall *v78)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19
__int64 v79; // x21
char *p_m_fBrVertexMod; // x0
void *v81; // x0
char *v82; // x0
char *v83; // x0
char *v84; // x21
unsigned int *v85; // x19
int v86; // w0
size_t v87; // x0
unsigned int *v88; // x3
int width_low; // w1
unsigned int *v90; // x1
int v91; // w2
unsigned int *v92; // x1
int v93; // w2
unsigned int *v94; // x1
int v95; // w2
unsigned int *v96; // x1
int v97; // w2
unsigned int *p_m_fTextureTop; // x1
int m_fTextureTop_low; // w2
unsigned int *v100; // x1
int v101; // w2
unsigned int *v102; // x1
int v103; // w2
unsigned int *v104; // x1
int v105; // w0
unsigned int *v106; // x1
int v107; // w2
unsigned int *v108; // x1
int v109; // w2
unsigned int *v110; // x1
int v111; // w2
unsigned int *v112; // x1
int v113; // w2
unsigned int *v114; // x1
int v115; // w2
_QWORD v116[17]; // [xsp+30h] [xbp+0h] BYREF
cocos2d::CCLayer *v117; // [xsp+B8h] [xbp+88h]
cocos2d::CCSize *v118; // [xsp+C0h] [xbp+90h]
const cocos2d::CCSize *v119; // [xsp+C8h] [xbp+98h]
float v120; // [xsp+E0h] [xbp+B0h]
float v121; // [xsp+E4h] [xbp+B4h]
cocos2d::CCPoint v122; // [xsp+E8h] [xbp+B8h] BYREF
char v123; // [xsp+F0h] [xbp+C0h] BYREF
char *v124; // [xsp+F8h] [xbp+C8h] BYREF
char *v125; // [xsp+100h] [xbp+D0h] BYREF
void *v126; // [xsp+108h] [xbp+D8h] BYREF
char *v127; // [xsp+110h] [xbp+E0h] BYREF
__int64 v128; // [xsp+118h] [xbp+E8h] BYREF
__int64 v129; // [xsp+120h] [xbp+F0h] BYREF
__int64 v130; // [xsp+128h] [xbp+F8h] BYREF
__int64 v131; // [xsp+130h] [xbp+100h] BYREF
__int64 v132; // [xsp+138h] [xbp+108h] BYREF
__int64 v133; // [xsp+140h] [xbp+110h] BYREF
cocos2d::CCSprite *v134; // [xsp+148h] [xbp+118h] BYREF
cocos2d::CCPoint v135; // [xsp+150h] [xbp+120h] BYREF
cocos2d::CCRect v136; // [xsp+158h] [xbp+128h] BYREF
cocos2d::CCRect v137; // [xsp+168h] [xbp+138h] BYREF
cocos2d::CCPoint v138; // 0:kr10_8.8
cocos2d::CCPoint v139; // 0:kr18_8.8
cocos2d::CCPoint v140; // 0:kr20_8.8
cocos2d::SEL_MenuHandler v141; // 0:x2.16
cocos2d::SEL_MenuHandler v142; // 0:x2.16
cocos2d::SEL_MenuHandler v143; // 0:x2.16
cocos2d::CCPoint v144; // 0:s1.4,4:s2.4
cocos2d::CCRect v145; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
cocos2d::CCRect v146; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
v137.origin.x = -1.034e-25;
v4 = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::_ccColor4B *)&v137);
if ( !v4 )
return v4;
FLAlertLayer::incrementForcePrio(a1);
a1->m_list = a2;
cocos2d::CCObject::retain(a2);
a1->setTouchEnabled(a1, 1);
a1->setKeypadEnabled(a1, 1);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6);
v7 = cocos2d::CCLayer::create();
a1->m_mainLayer = v7;
a1->addChild(a1, v7);
cocos2d::CCRect::CCRect(&v137, 0.0, 0.0, 80.0, 80.0);
v8 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"GJ_square01.png",
(const char *)&v137,
v145);
setContentSize = v8->setContentSize;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v137, 420.0, 300.0);
setContentSize(v8, (const cocos2d::CCSize *)&v137);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v8, -1);
setPosition = v8->setPosition;
cocos2d::CCPoint::CCPoint(&v137.origin, v120 * 0.5, v121 * 0.5);
setPosition(v8, &v137.origin);
sub_D18D28(&v137);
v11 = cocos2d::CCLabelBMFont::create();
v12 = (void *)(*(_QWORD *)&v137.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v137.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v110 = (unsigned int *)(*(_QWORD *)&v137.origin - 8LL);
do
v111 = __ldaxr(v110);
while ( __stlxr(v111 - 1, v110) );
}
else
{
v111 = *(_DWORD *)(*(_QWORD *)&v137.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v137.origin - 8LL) = v111 - 1;
}
if ( v111 <= 0 )
operator delete(v12);
}
a1->m_mainLayer->addChild(a1->m_mainLayer, v11);
v13 = v11->setPosition;
cocos2d::CCPoint::CCPoint(&v137.origin, v120 * 0.5, (float)((float)(v121 * 0.5) + 150.0) - 20.0);
v13(v11, &v137.origin);
sub_D153B8((int)&v137, "You cannot change the name once it is shared.");
cocos2d::CCPoint::CCPoint(&v136.origin, 0.5, 1.0);
v14 = TextArea::create((__int64)&v137, "chatFont.fnt", &v136.origin, 0, 1.0, 400.0, 20.0);
v15 = (void *)(*(_QWORD *)&v137.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v137.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v114 = (unsigned int *)(*(_QWORD *)&v137.origin - 8LL);
do
v115 = __ldaxr(v114);
while ( __stlxr(v115 - 1, v114) );
}
else
{
v115 = *(_DWORD *)(*(_QWORD *)&v137.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v137.origin - 8LL) = v115 - 1;
}
if ( v115 <= 0 )
operator delete(v15);
}
m_mainLayer = a1->m_mainLayer;
v118 = (cocos2d::CCSize *)&v123;
m_mainLayer->addChild(m_mainLayer, (cocos2d::CCNode *)v14);
v17 = v11;
getPosition = v11->getPosition;
v19 = *(void (__fastcall **)(__int64, cocos2d::CCRect *))(*(_QWORD *)v14 + 184LL);
v119 = (const cocos2d::CCSize *)getPosition(v17);
cocos2d::CCPoint::CCPoint(&v136.origin, 0.0, -20.0);
cocos2d::CCPoint::operator+(&v137, v119, &v136);
v19(v14, &v137);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v14 + 160LL))(v14, 0.8);
cocos2d::CCPoint::CCPoint(&v122, v120 * 0.5, (float)(v121 * 0.5) + 45.0);
cocos2d::CCRect::CCRect(&v136, 0.0, 0.0, 80.0, 80.0);
cocos2d::CCRect::CCRect(&v137, &v136);
v20 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"square02b_001.png",
(const char *)&v137,
v146);
v119 = v118;
cocos2d::CCSize::CCSize(v118, 380.0, 80.0);
v20->setContentSize(v20, v119);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v20, -1);
v20->setPosition(v20, &v122);
getTag = v20->__vftable[1].getTag;
LOWORD(v137.origin.x) = 16514;
BYTE2(v137.origin.x) = 33;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v20, &v137);
sub_D153B8((unsigned int)v116 + 200, "(No description provided)");
GJLevelList::getUnpackedDescription(a1->m_list, &v125);
v116[16] = &v126;
sub_D153B8((int)&v126, &byte_F288A0);
v119 = (const cocos2d::CCSize *)v126;
v22 = *((cocos2d::CCSize **)v126 - 3);
v23 = *((_QWORD *)v125 - 3);
v118 = v22;
if ( (unsigned __int64)v22 > v23 )
v24 = v23;
else
v24 = (size_t)v22;
v25 = memcmp(v125, v126, v24);
if ( v25 || (v25 = 0x7FFFFFFF, v26 = v23 - (_QWORD)v118, v26 > 0x7FFFFFFF) )
{
v27 = (__int64 *)&v119[-3];
if ( &v119[-3] == (const cocos2d::CCSize *)&qword_124B6B0 )
goto LABEL_11;
}
else
{
v27 = (__int64 *)&v119[-3];
if ( v26 >= (__int64)0xFFFFFFFF80000000LL )
v25 = v26;
else
v25 = 0x80000000;
if ( v27 == &qword_124B6B0 )
goto LABEL_11;
}
if ( &pthread_create )
{
v88 = (unsigned int *)&v119[-1];
do
width_low = __ldaxr(v88);
while ( __stlxr(width_low - 1, v88) );
}
else
{
width_low = LODWORD(v119[-1].width);
LODWORD(v119[-1].width) = width_low - 1;
}
if ( width_low <= 0 )
{
operator delete(v27);
if ( !v25 )
goto LABEL_12;
goto LABEL_36;
}
LABEL_11:
if ( v25 )
{
LABEL_36:
v119 = (const cocos2d::CCSize *)v125;
v87 = strlen(v125);
sub_D1798C(&v124, (const char *)v119, v87);
}
LABEL_12:
sub_D153B8((int)&v127, byte_EBED68);
sub_D153B8((int)&v128, &byte_F288A0);
while ( 1 )
{
v28 = sub_D1641C((unsigned int)v116 + 200, v127);
if ( v28 == -1 )
break;
sub_D1861C(&v124, v28, *((_QWORD *)v127 - 3), v128, *(_QWORD *)(v128 - 24));
}
v29 = *((_QWORD *)v124 - 3);
if ( v29 <= 0x12C )
{
if ( v29 > 0x46 )
v30 = (float)((float)((float)(180 - (int)v29) / 300.0) * 0.2) + 0.8;
else
v30 = 1.0;
}
else
{
v30 = 0.72;
}
sub_D153B8((int)&v129, v124);
cocos2d::CCPoint::CCPoint(&v137.origin, 0.5, 0.5);
v31 = (cocos2d::CCNode *)TextArea::create((__int64)&v129, "chatFont.fnt", &v137.origin, 1, 1.0, 320.0 / v30, 20.0);
v32 = (void *)(v129 - 24);
if ( (__int64 *)(v129 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v112 = (unsigned int *)(v129 - 8);
do
v113 = __ldaxr(v112);
while ( __stlxr(v113 - 1, v112) );
}
else
{
v113 = *(_DWORD *)(v129 - 8);
*(_DWORD *)(v129 - 8) = v113 - 1;
}
if ( v113 <= 0 )
operator delete(v32);
}
a1->m_mainLayer->addChild(a1->m_mainLayer, v31);
v33 = v31->setPosition;
cocos2d::CCPoint::CCPoint(&v135, 0.0, 1.0);
cocos2d::CCPoint::operator+(&v137, &v122, &v135);
v33(v31, &v137.origin);
v31->setScale(v31, v30);
a1->m_joystickConnected = -1;
v34 = cocos2d::CCMenu::create();
v35 = a1->m_mainLayer;
a1->m_buttonMenu = v34;
v36 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))v35->addChild_0)(
v35,
v34,
10);
v37 = (cocos2d::CCArray *)cocos2d::CCArray::create(v36);
v44 = (cocos2d::CCNode *)ButtonSprite::create((ButtonSprite *)"Cancel", v38, v39, v40, v41, v42, v43);
v141.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v141.adj = (size_t)ShareListLayer::onClose;
v45 = CCMenuItemSpriteExtra::create(v44, nullptr, v141);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v45);
cocos2d::CCArray::addObject(v37, v45);
v46 = ButtonSprite::create("Share List");
v142.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v142.adj = (size_t)ShareListLayer::onShare;
v47 = CCMenuItemSpriteExtra::create(v46, nullptr, v142);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v47);
cocos2d::CCArray::addObject(v37, v47);
m_buttonMenu = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v135, v120 * 0.5, (float)((float)(v121 * 0.5) + -150.0) + 25.0);
LODWORD(v144.x) = COERCE_UNSIGNED_INT(cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v135).y);
GameToolbox::alignItemsHorisontally(v37, 15.0, v144, (bool)&v137);
v49 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v143.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v143.adj = (size_t)ShareListLayer::onInfo;
v50 = CCMenuItemSpriteExtra::create(v49, nullptr, v143);
CCMenuItemSpriteExtra::setSizeMult(v50, 2.0);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v50);
v51 = a1->m_buttonMenu;
v52 = v50->setPosition;
cocos2d::CCPoint::CCPoint(
&v135,
(float)((float)(v120 * 0.5) + -210.0) + 20.0,
(float)((float)(v121 * 0.5) + 150.0) - 20.0);
v138 = cocos2d::CCNode::convertToNodeSpace(v51, &v135);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v52)(v50, &v137, v138.x, v138.y);
sub_D153B8((int)&v130, "Unlisted");
LODWORD(v119) = a1->m_list->m_unlisted;
v53 = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v135, (float)(v120 * 0.5) + -120.0, (float)(v121 * 0.5) + -70.0);
v54 = a1->m_mainLayer;
cocos2d::CCPoint::CCPoint(&v137.origin, 8.0, 0.0);
v55 = GameToolbox::createToggleButton(
0.8,
0.4,
0.0,
(__int64)&v130,
(void (__cdecl *)(cocos2d::CCObject *))ShareListLayer::onUnlisted,
0,
(bool)v119,
v53,
&v135,
a1,
v54,
(float *)&v137.origin,
(__int64)"bigFont.fnt",
0,
0,
nullptr);
v56 = (void *)(v130 - 24);
if ( (__int64 *)(v130 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v108 = (unsigned int *)(v130 - 8);
do
v109 = __ldaxr(v108);
while ( __stlxr(v109 - 1, v108) );
}
else
{
v109 = *(_DWORD *)(v130 - 8);
*(_DWORD *)(v130 - 8) = v109 - 1;
}
if ( v109 <= 0 )
operator delete(v56);
}
v55->setTag(v55, 0);
sub_D153B8((int)&v131, "Info");
sub_D153B8(
(int)&v132,
"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.");
v57 = (cocos2d::CCNode *)InfoAlertButton::create(0.8);
v58 = (void *)(v132 - 24);
if ( (__int64 *)(v132 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v106 = (unsigned int *)(v132 - 8);
do
v107 = __ldaxr(v106);
while ( __stlxr(v107 - 1, v106) );
}
else
{
v107 = *(_DWORD *)(v132 - 8);
*(_DWORD *)(v132 - 8) = v107 - 1;
}
if ( v107 <= 0 )
operator delete(v58);
}
v59 = (void *)(v131 - 24);
if ( (__int64 *)(v131 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v102 = (unsigned int *)(v131 - 8);
do
v103 = __ldaxr(v102);
while ( __stlxr(v103 - 1, v102) );
}
else
{
v103 = *(_DWORD *)(v131 - 8);
*(_DWORD *)(v131 - 8) = v103 - 1;
}
if ( v103 <= 0 )
operator delete(v59);
}
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v57);
v60 = a1->m_buttonMenu;
v61 = v57->setPosition;
cocos2d::CCPoint::CCPoint(&v135, (float)((float)(v120 * 0.5) + -120.0) - 30.0, (float)(v121 * 0.5) + -70.0);
v139 = cocos2d::CCNode::convertToNodeSpace(v60, &v135);
v62 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *, float, float))v61)(
v57,
&v137,
v139.x,
v139.y);
v63 = (cocos2d::CCArray *)cocos2d::CCArray::create(v62);
sub_D153B8((int)&v133, "Friends Only");
v64 = a1->m_buttonMenu;
LODWORD(v119) = a1->m_list->m_friendsOnly;
v118 = (cocos2d::CCSize *)v64;
cocos2d::CCPoint::CCPoint(&v135, (float)(v120 * 0.5) + 40.0, (float)(v121 * 0.5) + -70.0);
v117 = a1->m_mainLayer;
cocos2d::CCPoint::CCPoint(&v137.origin, 8.0, 0.0);
m_friendsOnlyToggler = GameToolbox::createToggleButton(
0.8,
0.4,
0.0,
(__int64)&v133,
(void (__cdecl *)(cocos2d::CCObject *))ShareListLayer::onUnlisted,
0,
(bool)v119,
(cocos2d::CCNode *)v118,
&v135,
a1,
v117,
(float *)&v137.origin,
(__int64)"bigFont.fnt",
0,
0,
v63);
a1->m_friendsOnlyToggler = m_friendsOnlyToggler;
v66 = (void *)(v133 - 24);
if ( (__int64 *)(v133 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v104 = (unsigned int *)(v133 - 8);
do
v105 = __ldaxr(v104);
while ( __stlxr(v105 - 1, v104) );
}
else
{
v105 = *(_DWORD *)(v133 - 8);
*(_DWORD *)(v133 - 8) = v105 - 1;
}
if ( v105 <= 0 )
operator delete(v66);
m_friendsOnlyToggler = a1->m_friendsOnlyToggler;
}
m_friendsOnlyToggler->setTag(m_friendsOnlyToggler, 1);
a1->m_friendsOnlyLabel = (cocos2d::CCLabelBMFont *)cocos2d::CCArray::objectAtIndex(v63, 1u);
sub_D153B8((int)&v135, "Info");
sub_D153B8(
(int)&v137,
"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.");
v67 = (cocos2d::CCNode *)InfoAlertButton::create(0.8);
v68 = (void *)(*(_QWORD *)&v137.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v137.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v100 = (unsigned int *)(*(_QWORD *)&v137.origin - 8LL);
do
v101 = __ldaxr(v100);
while ( __stlxr(v101 - 1, v100) );
}
else
{
v101 = *(_DWORD *)(*(_QWORD *)&v137.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v137.origin - 8LL) = v101 - 1;
}
if ( v101 <= 0 )
operator delete(v68);
}
v69 = (void *)(*(_QWORD *)&v135 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v135 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v96 = (unsigned int *)(*(_QWORD *)&v135 - 8LL);
do
v97 = __ldaxr(v96);
while ( __stlxr(v97 - 1, v96) );
}
else
{
v97 = *(_DWORD *)(*(_QWORD *)&v135 - 8LL);
*(_DWORD *)(*(_QWORD *)&v135 - 8LL) = v97 - 1;
}
if ( v97 <= 0 )
operator delete(v69);
}
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v67);
v70 = a1->m_buttonMenu;
v71 = v67->setPosition;
cocos2d::CCPoint::CCPoint(&v135, (float)((float)(v120 * 0.5) + 40.0) - 30.0, (float)(v121 * 0.5) + -70.0);
v140 = cocos2d::CCNode::convertToNodeSpace(v70, &v135);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *, float, float))v71)(v67, &v137, v140.x, v140.y);
ShareListLayer::updateUnlistedF(a1);
GJLevelList::frameForListDifficulty(a1->m_list->m_difficulty, 2, (__int64)&v134);
v72 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v134);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v72, 1);
v73 = v72->setPosition;
cocos2d::CCPoint::CCPoint(&v137.origin, (float)(v120 * 0.5) + -50.0, (float)(v121 * 0.5) + -25.0);
v73(v72, &v137.origin);
v74 = GJLevelList::totalLevels(a1->m_list);
v75 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i Levels", (const char *)v74);
cocos2d::CCString::getCString(v75);
v76 = cocos2d::CCLabelBMFont::create();
v76->setScale(v76, 0.8);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v76, 1);
setAnchorPoint = v76->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v137.origin, 0.0, 0.5);
setAnchorPoint(v76, &v137.origin);
v78 = v76->setPosition;
v79 = (__int64)v72->getPosition(v72);
cocos2d::CCPoint::CCPoint(&v135, 30.0, 0.0);
cocos2d::CCPoint::operator+(&v137, v79, &v135);
v78(v76, &v137.origin);
p_m_fBrVertexMod = (char *)&v134[-1].m_fBrVertexMod;
if ( (__int64 *)&v134[-1].m_fBrVertexMod != &qword_124B6B0 )
{
if ( &pthread_create )
{
p_m_fTextureTop = (unsigned int *)&v134[-1].m_fTextureTop;
do
m_fTextureTop_low = __ldaxr(p_m_fTextureTop);
while ( __stlxr(m_fTextureTop_low - 1, p_m_fTextureTop) );
}
else
{
m_fTextureTop_low = LODWORD(v134[-1].m_fTextureTop);
LODWORD(v134[-1].m_fTextureTop) = m_fTextureTop_low - 1;
}
if ( m_fTextureTop_low <= 0 )
operator delete(p_m_fBrVertexMod);
}
v81 = (void *)(v128 - 24);
if ( (__int64 *)(v128 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v94 = (unsigned int *)(v128 - 8);
do
v95 = __ldaxr(v94);
while ( __stlxr(v95 - 1, v94) );
}
else
{
v95 = *(_DWORD *)(v128 - 8);
*(_DWORD *)(v128 - 8) = v95 - 1;
}
if ( v95 <= 0 )
operator delete(v81);
}
v82 = v127 - 24;
if ( v127 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v92 = (unsigned int *)(v127 - 8);
do
v93 = __ldaxr(v92);
while ( __stlxr(v93 - 1, v92) );
}
else
{
v93 = *((_DWORD *)v127 - 2);
*((_DWORD *)v127 - 2) = v93 - 1;
}
if ( v93 <= 0 )
operator delete(v82);
}
v83 = v125 - 24;
if ( v125 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v90 = (unsigned int *)(v125 - 8);
do
v91 = __ldaxr(v90);
while ( __stlxr(v91 - 1, v90) );
}
else
{
v91 = *((_DWORD *)v125 - 2);
*((_DWORD *)v125 - 2) = v91 - 1;
}
if ( v91 <= 0 )
operator delete(v83);
}
v84 = v124 - 24;
if ( v124 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v85 = (unsigned int *)(v124 - 8);
do
v86 = __ldaxr(v85);
while ( __stlxr(v86 - 1, v85) );
}
else
{
v86 = *((_DWORD *)v124 - 2);
*((_DWORD *)v124 - 2) = v86 - 1;
}
if ( v86 <= 0 )
operator delete(v84);
}
return v4;
}