//
// GJAccountSettingsLayer::init from 0x5e2e98 to 0x5e42f2 (5210 bytes)
//
// 1 xrefs:
// > GJAccountSettingsLayer::create @ 0x5e43ac
//
// 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:54:18 +0000
//
int __fastcall GJAccountSettingsLayer::init(GJAccountSettingsLayer *this, int a2)
{
int v4; // r3
GameLevelManager *v5; // r0
cocos2d::CCDictionary **v6; // r0
GameManager *v7; // r0
GameManager *v8; // r6
int v9; // r3
int v10; // r3
_DWORD *v11; // r8
int v12; // r1
int v13; // r2
_DWORD *v14; // r8
int v15; // r1
int v16; // r2
_DWORD *v17; // r8
int v18; // r1
int v19; // r2
_DWORD *v20; // r8
int v21; // r1
int v22; // r2
_DWORD *v23; // r8
int v24; // r1
int v25; // r2
_DWORD *v26; // r8
int v27; // r1
int v28; // r2
_DWORD *v29; // r7
int v30; // r1
int v31; // r2
int v32; // r3
GameManager *v33; // r0
cocos2d::CCDirector *v34; // r0
cocos2d::CCLayer *WinSize; // r0
int v36; // r0
int v37; // r3
int v38; // r6
void (__fastcall *v39)(int, int *); // r7
void (__fastcall *v40)(int, int *); // r7
const char *v41; // r2
int v42; // r8
void (__fastcall *v43)(int, int *); // r7
cocos2d::CCMenu *v44; // r0
int v45; // r0
cocos2d::CCArray *v46; // r0
cocos2d::CCObject *v47; // r0
int v48; // r10
void (__fastcall *v49)(int, int *); // r8
const char *v50; // r2
int v51; // r8
int v52; // r11
void (__fastcall *v53)(int, int *); // r10
float *v54; // r0
const cocos2d::CCPoint *v55; // r10
cocos2d::CCObject *ToggleButton; // r8
const cocos2d::CCPoint *v57; // r11
float v58; // r1
cocos2d::CCNodeRGBA *v59; // r10
int v60; // r3
const cocos2d::CCPoint *v61; // r11
float v62; // r1
cocos2d::CCObject *v63; // r9
cocos2d::CCArray *v64; // r0
cocos2d::CCObject *v65; // r0
int v66; // r10
void (__fastcall *v67)(int, int *); // r7
const char *v68; // r2
int v69; // r7
int v70; // r11
void (__fastcall *v71)(int, int *); // r10
float *v72; // r0
const cocos2d::CCPoint *v73; // r10
cocos2d::CCObject *v74; // r9
const cocos2d::CCPoint *v75; // r11
cocos2d::CCObject *v76; // r10
const cocos2d::CCPoint *v77; // r11
cocos2d::CCNodeRGBA *v78; // r11
int v79; // r3
cocos2d::CCArray *v80; // r0
cocos2d::CCObject *v81; // r0
int v82; // r9
void (__fastcall *v83)(int, int *); // r8
const char *v84; // r2
int v85; // r7
int v86; // r8
const cocos2d::CCPoint *v87; // r11
float *v88; // r0
const cocos2d::CCPoint *v89; // r9
cocos2d::CCObject *v90; // r7
const cocos2d::CCPoint *v91; // r9
float v92; // r1
cocos2d::CCNodeRGBA *v93; // r7
int v94; // r3
const cocos2d::CCPoint *v95; // r8
float v96; // r1
cocos2d::CCObject *v97; // r6
cocos2d::CCArray *v98; // r0
cocos2d::CCObject *v99; // r0
int v100; // r10
void (__fastcall *v101)(int, int *); // r8
const char *v102; // r2
int v103; // r8
const cocos2d::CCPoint *v104; // r10
cocos2d::CCObject *v105; // r10
const cocos2d::CCPoint *v106; // r11
cocos2d::CCNodeRGBA *v107; // r11
int v108; // r3
const cocos2d::CCPoint *v109; // r8
cocos2d::CCNodeRGBA *v110; // r7
int v111; // r3
ButtonSprite *v112; // r7
int v113; // r9
const cocos2d::CCPoint *v114; // r11
cocos2d::CCArray *v115; // r0
cocos2d::CCArray *v116; // r7
ButtonSprite *v117; // r0
cocos2d::CCObject *v118; // r10
ButtonSprite *v119; // r0
cocos2d::CCObject *v120; // r6
const cocos2d::CCPoint *v121; // r9
int v122; // r8
int v123; // r3
_DWORD *v124; // r3
int *v125; // r7
int *v126; // r4
int v127; // r5
int v128; // t1
float v130; // [sp+10h] [bp-10Ch]
float v131; // [sp+10h] [bp-10Ch]
float v132; // [sp+10h] [bp-10Ch]
int v133; // [sp+18h] [bp-104h]
int (__fastcall *v134)(int, int *); // [sp+18h] [bp-104h]
cocos2d::CCPoint *v135; // [sp+20h] [bp-FCh]
cocos2d::CCPoint *v136; // [sp+20h] [bp-FCh]
int v137; // [sp+28h] [bp-F4h]
cocos2d::CCDirector *v138; // [sp+2Ch] [bp-F0h]
cocos2d::CCPoint *v139; // [sp+34h] [bp-E8h]
float v140; // [sp+3Ch] [bp-E0h] BYREF
float v141; // [sp+40h] [bp-DCh]
_BYTE v142[8]; // [sp+44h] [bp-D8h] BYREF
_BYTE v143[8]; // [sp+4Ch] [bp-D0h] BYREF
_BYTE v144[8]; // [sp+54h] [bp-C8h] BYREF
_BYTE v145[8]; // [sp+5Ch] [bp-C0h] BYREF
_BYTE v146[8]; // [sp+64h] [bp-B8h] BYREF
char v147[8]; // [sp+6Ch] [bp-B0h] BYREF
_BYTE v148[8]; // [sp+74h] [bp-A8h] BYREF
int (__fastcall *v149)(int, cocos2d::CCObject *); // [sp+7Ch] [bp-A0h]
int v150; // [sp+80h] [bp-9Ch]
int (__fastcall *v151)(int, cocos2d::CCObject *); // [sp+84h] [bp-98h]
int v152; // [sp+88h] [bp-94h]
int (__fastcall *v153)(int, cocos2d::CCObject *); // [sp+8Ch] [bp-90h]
int v154; // [sp+90h] [bp-8Ch]
int (__fastcall *v155)(int, cocos2d::CCObject *); // [sp+94h] [bp-88h]
int v156; // [sp+98h] [bp-84h]
int (__fastcall *v157)(int, cocos2d::CCObject *); // [sp+9Ch] [bp-80h]
int v158; // [sp+A0h] [bp-7Ch]
int (__fastcall *v159)(int, cocos2d::CCObject *); // [sp+A4h] [bp-78h]
int v160; // [sp+A8h] [bp-74h]
int (__fastcall *v161)(int, cocos2d::CCObject *); // [sp+ACh] [bp-70h]
int v162; // [sp+B0h] [bp-6Ch]
int (__fastcall *v163)(int, cocos2d::CCObject *); // [sp+B4h] [bp-68h]
int v164; // [sp+B8h] [bp-64h]
int (__fastcall *v165)(int, cocos2d::CCObject *); // [sp+BCh] [bp-60h]
int v166; // [sp+C0h] [bp-5Ch]
int (__fastcall *v167)(int, cocos2d::CCObject *); // [sp+C4h] [bp-58h]
int v168; // [sp+C8h] [bp-54h]
int (__fastcall *v169)(int, cocos2d::CCObject *); // [sp+CCh] [bp-50h]
int v170; // [sp+D0h] [bp-4Ch]
int (__fastcall *v171)(int, cocos2d::CCObject *); // [sp+D4h] [bp-48h]
int v172; // [sp+D8h] [bp-44h]
_DWORD v173[2]; // [sp+DCh] [bp-40h] BYREF
_DWORD v174[2]; // [sp+E4h] [bp-38h] BYREF
int v175; // [sp+ECh] [bp-30h] BYREF
int v176; // [sp+F0h] [bp-2Ch]
int v177; // [sp+F4h] [bp-28h]
int v178; // [sp+F8h] [bp-24h] BYREF
int v179; // [sp+FCh] [bp-20h]
int v180; // [sp+100h] [bp-1Ch]
int v181[4]; // [sp+104h] [bp-18h] BYREF
FLAlertLayer::incrementForcePrio(this);
v181[0] = -1778384896;
v137 = cocos2d::CCLayerColor::initWithColor(this, v181);
if ( v137 )
{
v4 = *(_DWORD *)this;
*((_BYTE *)this + 468) = 1;
(*(void (__fastcall **)(GJAccountSettingsLayer *, int))(v4 + 500))(this, 1);
(*(void (__fastcall **)(GJAccountSettingsLayer *, int))(*(_DWORD *)this + 536))(this, 1);
v5 = (GameLevelManager *)(*(int (__fastcall **)(GJAccountSettingsLayer *, int))(*(_DWORD *)this + 544))(this, 1);
*((_DWORD *)this + 130) = a2;
v6 = (cocos2d::CCDictionary **)GameLevelManager::sharedState(v5);
v7 = (GameManager *)GameLevelManager::userInfoForAccountID(v6, a2);
v8 = v7;
if ( !v7 )
goto LABEL_3;
*((_DWORD *)this + 131) = *((_DWORD *)v7 + 89);
*((_DWORD *)this + 132) = *((_DWORD *)v7 + 90);
*((_DWORD *)this + 133) = *((_DWORD *)v7 + 91);
v10 = *((_DWORD *)v7 + 92);
v181[0] = 0;
*((_DWORD *)this + 134) = v10;
v11 = std::map::operator[]((int **)this + 137, v181);
std::string::basic_string(&v178, (int)v8 + 380);
if ( (*(_BYTE *)v11 & 1) != 0 )
{
*(_BYTE *)v11[2] = 0;
v11[1] = 0;
}
else
{
*((_BYTE *)v11 + 1) = 0;
*(_BYTE *)v11 = 0;
}
std::string::reserve(v11, 0);
v12 = v179;
v13 = v180;
*v11 = v178;
v11[1] = v12;
v11[2] = v13;
v178 = 0;
v179 = 0;
v180 = 0;
std::string::~string((int)&v178);
v181[0] = 1;
v14 = std::map::operator[]((int **)this + 137, v181);
std::string::basic_string(&v178, (int)v8 + 392);
if ( (*(_BYTE *)v14 & 1) != 0 )
{
*(_BYTE *)v14[2] = 0;
v14[1] = 0;
}
else
{
*((_BYTE *)v14 + 1) = 0;
*(_BYTE *)v14 = 0;
}
std::string::reserve(v14, 0);
v15 = v179;
v16 = v180;
*v14 = v178;
v14[1] = v15;
v14[2] = v16;
v178 = 0;
v179 = 0;
v180 = 0;
std::string::~string((int)&v178);
v181[0] = 2;
v17 = std::map::operator[]((int **)this + 137, v181);
std::string::basic_string(&v178, (int)v8 + 404);
if ( (*(_BYTE *)v17 & 1) != 0 )
{
*(_BYTE *)v17[2] = 0;
v17[1] = 0;
}
else
{
*((_BYTE *)v17 + 1) = 0;
*(_BYTE *)v17 = 0;
}
std::string::reserve(v17, 0);
v18 = v179;
v19 = v180;
*v17 = v178;
v17[1] = v18;
v17[2] = v19;
v178 = 0;
v179 = 0;
v180 = 0;
std::string::~string((int)&v178);
v181[0] = 3;
v20 = std::map::operator[]((int **)this + 137, v181);
std::string::basic_string(&v178, (int)v8 + 428);
if ( (*(_BYTE *)v20 & 1) != 0 )
{
*(_BYTE *)v20[2] = 0;
v20[1] = 0;
}
else
{
*((_BYTE *)v20 + 1) = 0;
*(_BYTE *)v20 = 0;
}
std::string::reserve(v20, 0);
v21 = v179;
v22 = v180;
*v20 = v178;
v20[1] = v21;
v20[2] = v22;
v178 = 0;
v179 = 0;
v180 = 0;
std::string::~string((int)&v178);
v181[0] = 4;
v23 = std::map::operator[]((int **)this + 137, v181);
std::string::basic_string(&v178, (int)v8 + 440);
if ( (*(_BYTE *)v23 & 1) != 0 )
{
*(_BYTE *)v23[2] = 0;
v23[1] = 0;
}
else
{
*((_BYTE *)v23 + 1) = 0;
*(_BYTE *)v23 = 0;
}
std::string::reserve(v23, 0);
v24 = v179;
v25 = v180;
*v23 = v178;
v23[1] = v24;
v23[2] = v25;
v178 = 0;
v179 = 0;
v180 = 0;
std::string::~string((int)&v178);
v181[0] = 5;
v26 = std::map::operator[]((int **)this + 137, v181);
std::string::basic_string(&v178, (int)v8 + 416);
if ( (*(_BYTE *)v26 & 1) != 0 )
{
*(_BYTE *)v26[2] = 0;
v26[1] = 0;
}
else
{
*((_BYTE *)v26 + 1) = 0;
*(_BYTE *)v26 = 0;
}
std::string::reserve(v26, 0);
v27 = v179;
v28 = v180;
*v26 = v178;
v26[1] = v27;
v26[2] = v28;
v178 = 0;
v179 = 0;
v180 = 0;
std::string::~string((int)&v178);
v181[0] = 6;
v29 = std::map::operator[]((int **)this + 137, v181);
std::string::basic_string(&v178, (int)v8 + 452);
if ( (*(_BYTE *)v29 & 1) != 0 )
{
*(_BYTE *)v29[2] = 0;
v29[1] = 0;
}
else
{
*((_BYTE *)v29 + 1) = 0;
*(_BYTE *)v29 = 0;
}
std::string::reserve(v29, 0);
v30 = v179;
v31 = v180;
*v29 = v178;
v29[1] = v30;
v29[2] = v31;
v178 = 0;
v179 = 0;
v180 = 0;
v7 = (GameManager *)std::string::~string((int)&v178);
if ( *((_BYTE *)v8 + 553) || (unsigned int)(*((_DWORD *)v8 + 128) - 1) <= 1 )
v9 = 1;
else
LABEL_3:
v9 = 0;
v133 = v9;
if ( !*((_DWORD *)this + 131) && !v9 )
*((_DWORD *)this + 131) = 1;
if ( !*((_DWORD *)this + 134) )
*((_DWORD *)this + 134) = 1;
if ( v8 && (v32 = *((_DWORD *)v8 + 93), v133) )
{
if ( !v32 )
v32 = 1;
}
else
{
v32 = 2;
}
*((_DWORD *)this + 135) = v32;
v33 = (GameManager *)GameManager::sharedState(v7);
v34 = (cocos2d::CCDirector *)GameManager::privacyPushWanted(v33);
v138 = v34;
if ( v34 )
{
*((_DWORD *)this + 131) = 2;
*((_DWORD *)this + 132) = 1;
*((_DWORD *)this + 134) = 2;
*((_DWORD *)this + 135) = 2;
}
cocos2d::CCDirector::sharedDirector(v34);
WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v140);
v36 = cocos2d::CCLayer::create(WinSize);
v37 = *(_DWORD *)this;
*((_DWORD *)this + 115) = v36;
(*(void (__fastcall **)(GJAccountSettingsLayer *, int))(v37 + 228))(this, v36);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v181, 0.0, 0.0, 80.0, 80.0);
v38 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v181);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v38 + 456))(v38, 255);
v39 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v38 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v181, 400.0, 280.0);
v39(v38, v181);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v38, -1);
v40 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v38 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v181, v140 * 0.5, v141 * 0.5);
v40(v38, v181);
v42 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Account Settings", "goldFont.fnt", v41);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v42 + 80))(v42, 1060320051);
v43 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v42 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v181, v140 * 0.5, (float)((float)(v141 * 0.5) + 140.0) - 18.0);
v43(v42, v181);
v44 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(
*((_DWORD *)this + 115),
v42);
v45 = cocos2d::CCMenu::create(v44);
*((_DWORD *)this + 111) = v45;
v46 = (cocos2d::CCArray *)(*(int (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
v45,
10);
*((_DWORD *)this + 125) = -1;
v47 = (cocos2d::CCObject *)cocos2d::CCArray::create(v46);
*((_DWORD *)this + 140) = v47;
cocos2d::CCObject::retain(v47);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v142, v140 * 0.5, (float)(v141 * 0.5) + 96.0);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v143, 400.0, 30.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v181, 0.0, 0.0, 40.0, 40.0);
v48 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v181);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v48 + 456))(v48, 50);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 160))(v48, v143);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v48 + 80))(v48, 1060320051);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v48, -1);
v49 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v48 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, 0.0, -20.0);
cocos2d::CCPoint::operator+(v181, v142, v174);
v49(v48, v181);
v51 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Direct messages:", "goldFont.fnt", v50);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v51, 20);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v51 + 92))(v51, v142);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v51 + 80))(v51, 1053609165);
if ( v133 )
{
v175 = 0;
v176 = 0;
v177 = 0;
std::string::__init(&v175, "Direct Messages", 0xFu);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(
&v178,
"Who can send you direct messages?\n"
"All: Anyone, as a message request you accept or ignore.\n"
"Friends: Friends can message you.\n"
"Off: No messages.",
0xADu);
v52 = ((int (__fastcall *)(_DWORD, _DWORD, _DWORD))InfoAlertButton::create)(&v175, &v178, 0.5);
std::string::~string((int)&v178);
std::string::~string((int)&v175);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v52);
v53 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v52 + 92);
v139 = *((cocos2d::CCPoint **)this + 111);
v54 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v51 + 164))(v51);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, (float)((float)(*v54 * 0.4) * 0.5) + 10.0, 0.0);
cocos2d::CCPoint::operator+(v174, v142, v173);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v181, v139);
v53(v52, v181);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "All", 3u);
v149 = GJAccountSettingsLayer::onMessageSetting;
v150 = 0;
v55 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, -105.0, -20.0);
cocos2d::CCPoint::operator+(v181, v142, v174);
ToggleButton = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v149,
v150,
1,
v55,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
*((_BYTE *)ToggleButton + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)ToggleButton + 36))(ToggleButton, 0);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 140), ToggleButton);
}
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "Friends", 7u);
v151 = GJAccountSettingsLayer::onMessageSetting;
v152 = 0;
v57 = *((const cocos2d::CCPoint **)this + 111);
if ( v133 )
v58 = -30.0;
else
v58 = -70.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, v58, -20.0);
cocos2d::CCPoint::operator+(v181, v142, v174);
v59 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v151,
v152,
1,
v57,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
v60 = *(_DWORD *)v59;
*((_BYTE *)v59 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCNodeRGBA *))(v60 + 36))(v59);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "Off", 3u);
v154 = 0;
v153 = GJAccountSettingsLayer::onMessageSetting;
v61 = *((const cocos2d::CCPoint **)this + 111);
if ( v133 )
v62 = 70.0;
else
v62 = 30.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, v62, -20.0);
cocos2d::CCPoint::operator+(v181, v142, v174);
v63 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v153,
v154,
1,
v61,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
*((_BYTE *)v63 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v63 + 36))(v63, 2);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 140), v59);
v64 = (cocos2d::CCArray *)cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 140), v63);
v65 = (cocos2d::CCObject *)cocos2d::CCArray::create(v64);
*((_DWORD *)this + 141) = v65;
cocos2d::CCObject::retain(v65);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v181, 0.0, -40.0);
cocos2d::CCPoint::operator+(v144, v142, v181);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v181, 0.0, 0.0, 40.0, 40.0);
v66 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v181);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v66 + 456))(v66, 50);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v66 + 160))(v66, v143);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v66 + 80))(v66, 1060320051);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v66, -1);
v67 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v66 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, 0.0, -20.0);
cocos2d::CCPoint::operator+(v181, v144, v174);
v67(v66, v181);
v69 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Friend requests:", "goldFont.fnt", v68);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v69, 20);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v69 + 92))(v69, v144);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v69 + 80))(v69, 1053609165);
v175 = 0;
v176 = 0;
v177 = 0;
std::string::__init(&v175, "Friend Requests", 0xFu);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(
&v178,
"Who can send you friend requests?\n"
"Messages: Anyone, and a request can carry a short message.\n"
"On: Anyone, without a message.\n"
"Off: No requests.",
0xADu);
v70 = InfoAlertButton::create(&v175, &v178, 1056964608);
std::string::~string((int)&v178);
std::string::~string((int)&v175);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v70);
v71 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v70 + 92);
v135 = *((cocos2d::CCPoint **)this + 111);
v72 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v69 + 164))(v69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, (float)((float)(*v72 * 0.4) * 0.5) + 10.0, 0.0);
cocos2d::CCPoint::operator+(v174, v144, v173);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v181, v135);
v71(v70, v181);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "Messages", 8u);
v73 = *((const cocos2d::CCPoint **)this + 111);
v156 = 0;
v155 = GJAccountSettingsLayer::onFriendRequests;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, -112.0, -20.0);
cocos2d::CCPoint::operator+(v181, v144, v174);
v74 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v155,
v156,
1,
v73,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
*((_BYTE *)v74 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v74 + 36))(v74, 2);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "On", 2u);
v157 = GJAccountSettingsLayer::onFriendRequests;
v158 = 0;
v75 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, -10.0, -20.0);
cocos2d::CCPoint::operator+(v181, v144, v174);
v76 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v157,
v158,
1,
v75,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
*((_BYTE *)v76 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v76 + 36))(v76, 0);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "Off", 3u);
v159 = GJAccountSettingsLayer::onFriendRequests;
v160 = 0;
v77 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, 68.0, -20.0);
cocos2d::CCPoint::operator+(v181, v144, v174);
v78 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v159,
v160,
1,
v77,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
v79 = *(_DWORD *)v78;
*((_BYTE *)v78 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCNodeRGBA *))(v79 + 36))(v78);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 141), v74);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 141), v76);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 141), v78);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v181, 0.0, -40.0);
v80 = (cocos2d::CCArray *)cocos2d::CCPoint::operator+(v145, v144, v181);
v81 = (cocos2d::CCObject *)cocos2d::CCArray::create(v80);
*((_DWORD *)this + 143) = v81;
cocos2d::CCObject::retain(v81);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v181, 0.0, 0.0, 40.0, 40.0);
v82 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v181);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v82 + 456))(v82, 50);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v82 + 160))(v82, v143);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v82 + 80))(v82, 1060320051);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v82, -1);
v83 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v82 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, 0.0, -20.0);
cocos2d::CCPoint::operator+(v181, v145, v174);
v83(v82, v181);
v85 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Group invites:", "goldFont.fnt", v84);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v85, 20);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v85 + 92))(v85, v145);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v85 + 80))(v85, 1053609165);
v175 = 0;
v176 = 0;
v177 = 0;
std::string::__init(&v175, "Group Chats", 0xBu);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(
&v178,
"Who can invite you to group chats?\n"
"All: Anyone can invite you.\n"
"Friends: Friends can invite you.\n"
"Off: No invites.\n"
"All invites must be accepted first.",
0xBCu);
v86 = InfoAlertButton::create(&v175, &v178, 1056964608);
std::string::~string((int)&v178);
std::string::~string((int)&v175);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v86);
v87 = *((const cocos2d::CCPoint **)this + 111);
v136 = *(cocos2d::CCPoint **)(*(_DWORD *)v86 + 92);
v88 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v85 + 164))(v85);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, (float)((float)(*v88 * 0.4) * 0.5) + 10.0, 0.0);
cocos2d::CCPoint::operator+(v174, v145, v173);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v181, v87);
((void (__fastcall *)(int, int *))v136)(v86, v181);
if ( v133 )
{
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "All", 3u);
v162 = 0;
v161 = GJAccountSettingsLayer::onGroupFriends;
v89 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, -105.0, -20.0);
cocos2d::CCPoint::operator+(v181, v145, v174);
v90 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v161,
v162,
1,
v89,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
*((_BYTE *)v90 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v90 + 36))(v90, 3);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 143), v90);
}
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "Friends", 7u);
v164 = 0;
v163 = GJAccountSettingsLayer::onGroupFriends;
v91 = *((const cocos2d::CCPoint **)this + 111);
if ( v133 )
v92 = -30.0;
else
v92 = -70.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, v92, -20.0);
cocos2d::CCPoint::operator+(v181, v145, v174);
v93 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v163,
v164,
1,
v91,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
v94 = *(_DWORD *)v93;
*((_BYTE *)v93 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCNodeRGBA *))(v94 + 36))(v93);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "Off", 3u);
v166 = 0;
v165 = GJAccountSettingsLayer::onGroupFriends;
v95 = *((const cocos2d::CCPoint **)this + 111);
if ( v133 )
v96 = 70.0;
else
v96 = 30.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, v96, -20.0);
cocos2d::CCPoint::operator+(v181, v145, v174);
v97 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v165,
v166,
1,
v95,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
*((_BYTE *)v97 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v97 + 36))(v97, 2);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 143), v93);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 143), v97);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v181, 0.0, -40.0);
v98 = (cocos2d::CCArray *)cocos2d::CCPoint::operator+(v146, v145, v181);
v99 = (cocos2d::CCObject *)cocos2d::CCArray::create(v98);
*((_DWORD *)this + 142) = v99;
cocos2d::CCObject::retain(v99);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v181, 0.0, 0.0, 40.0, 40.0);
v100 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v181);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v100 + 456))(v100, 50);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v100 + 160))(v100, v143);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v100 + 80))(v100, 1060320051);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v100, -1);
v101 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v100 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, 0.0, -20.0);
cocos2d::CCPoint::operator+(v181, v146, v174);
v101(v100, v181);
v103 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Show Comment History to:", "goldFont.fnt", v102);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v103, 20);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v103 + 92))(v103, v146);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v103 + 80))(v103, 1053609165);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "All", 3u);
v168 = 0;
v167 = GJAccountSettingsLayer::onCommentSetting;
v104 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, -105.0, -20.0);
cocos2d::CCPoint::operator+(v181, v146, v174);
v105 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v167,
v168,
1,
v104,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
*((_BYTE *)v105 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v105 + 36))(v105, 0);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "Friends", 7u);
v170 = 0;
v169 = GJAccountSettingsLayer::onCommentSetting;
v106 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, -30.0, -20.0);
cocos2d::CCPoint::operator+(v181, v146, v174);
v107 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v169,
v170,
1,
v106,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
v108 = *(_DWORD *)v107;
*((_BYTE *)v107 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCNodeRGBA *))(v108 + 36))(v107);
v178 = 0;
v179 = 0;
v180 = 0;
std::string::__init(&v178, "Me", 2u);
v171 = GJAccountSettingsLayer::onCommentSetting;
v172 = 0;
v109 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, 70.0, -20.0);
cocos2d::CCPoint::operator+(v181, v146, v174);
v110 = GJAccountSettingsLayer::createToggleButton(
(int)this,
(int)&v178,
(int)v171,
v172,
1,
v109,
(int)v181,
50.0,
0.4);
std::string::~string((int)&v178);
v111 = *(_DWORD *)v110;
*((_BYTE *)v110 + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCNodeRGBA *, int))(v111 + 36))(v110, 2);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 142), v105);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 142), v107);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 142), v110);
v112 = ButtonSprite::create(
(ButtonSprite *)"Social Link Settings",
(const char *)&dword_A0,
0,
0.5,
1,
"bigFont.fnt",
"GJ_button_04.png",
(const char *)0x41E00000,
v130);
(*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v112 + 80))(v112, 1063675494);
v173[1] = 0;
v173[0] = GJAccountSettingsLayer::onSocialLinks;
v113 = CCMenuItemSpriteExtra::create((int)v112, 0, (int)this, (int)GJAccountSettingsLayer::onSocialLinks, 0);
CCMenuItemSpriteExtra::setSizeMult(v113, 1.1);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v113);
v114 = *((const cocos2d::CCPoint **)this + 111);
v134 = *(int (__fastcall **)(int, int *))(*(_DWORD *)v113 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v174, v140 * 0.5, (float)(v141 * 0.5) - 81.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v181, v114);
v115 = (cocos2d::CCArray *)v134(v113, v181);
v116 = (cocos2d::CCArray *)cocos2d::CCArray::create(v115);
v117 = ButtonSprite::create(
(ButtonSprite *)"Cancel",
(const char *)&word_32,
0,
0.5,
1,
"bigFont.fnt",
"GJ_button_05.png",
(const char *)0x41C80000,
v131);
v174[1] = 0;
v174[0] = GJAccountSettingsLayer::onClose;
v118 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(int)v117,
0,
(int)this,
(int)GJAccountSettingsLayer::onClose,
0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v118);
cocos2d::CCArray::addObject(v116, v118);
v119 = ButtonSprite::create(
(ButtonSprite *)"Update",
(const char *)&word_32,
0,
0.5,
1,
"bigFont.fnt",
"GJ_button_01.png",
(const char *)0x41C80000,
v132);
v181[1] = 0;
v181[0] = (int)GJAccountSettingsLayer::onUpdate;
v120 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(int)v119,
0,
(int)this,
(int)GJAccountSettingsLayer::onUpdate,
0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v120);
cocos2d::CCArray::addObject(v116, v120);
v121 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v147, v140 * 0.5, (float)(v141 * 0.5) - 118.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v148, v121);
GameToolbox::alignItemsHorisontally(*(float *)&v116, 15.0, (int)v148, 0);
GJAccountSettingsLayer::onMessageSetting((int)this, nullptr);
GJAccountSettingsLayer::onFriendRequests((int)this, nullptr);
GJAccountSettingsLayer::onCommentSetting((int)this, nullptr);
GJAccountSettingsLayer::onGroupFriends((int)this, nullptr);
if ( v138 )
{
memset(v148, 150, 3);
v122 = 0;
v178 = *((_DWORD *)this + 140);
v179 = *((_DWORD *)this + 143);
v180 = *((_DWORD *)this + 141);
do
{
v123 = *(&v178 + v122);
if ( v123 )
{
v124 = *(_DWORD **)(v123 + 52);
if ( *v124 )
{
v125 = (int *)v124[3];
v126 = &v125[*v124 - 1];
while ( v125 <= v126 )
{
v128 = *v125++;
v127 = v128;
if ( !v128 )
break;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v127 + 528))(v127, 0);
CCMenuItemToggler::setSpriteColor(v127, (int)v148);
}
}
}
++v122;
}
while ( v122 != 3 );
}
}
return v137;
}