//
// GJAccountSettingsLayer::init from 0x14039c9d0 to 0x14039e66e (7326 bytes)
//
// 2 xrefs:
// > ProfilePage::onSettings @ 0x1405597b3
// > ??> @ 0x14092339c
//
// 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 11:31:16 +0000
//
// Hidden C++ exception states: #wind=9
bool __fastcall GJAccountSettingsLayer::init(__int64 a1, int a2)
{
__int64 v2; // rbx
bool result; // al
__int64 v5; // rdx
__int64 v6; // rdx
__int64 v7; // rdx
__int64 v8; // rcx
struct cocos2d::CCObject *v9; // rax
struct cocos2d::CCObject *v10; // rdi
__int64 v11; // r15
__int64 v12; // rax
__int64 v13; // rax
__int64 v14; // rax
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rax
__int64 v18; // rax
int v19; // eax
char v20; // r12
int v21; // eax
__int64 v22; // rbx
__int64 v23; // rcx
char v24; // r13
__int64 v25; // rax
__int64 v26; // rax
__int64 v27; // rax
__int64 *v28; // rdi
__int64 v29; // rdx
void (__fastcall *v30)(__int64 *, __int64); // r8
__int64 v31; // rbx
__int64 v32; // rax
__int64 v33; // rbx
__int64 v34; // rax
struct cocos2d::CCLabelBMFont *v35; // rdi
__int64 v36; // rbx
__int64 v37; // rax
__int64 v38; // rcx
__int64 v39; // rax
__int64 v40; // rcx
cocos2d::CCObject *v41; // rax
__int64 v42; // rax
_QWORD *v43; // rbx
__int64 v44; // rdx
void (__fastcall *v45)(_QWORD *, __int64); // r8
__int64 v46; // rax
struct cocos2d::CCLabelBMFont *v47; // rbx
__int64 *v48; // rdi
float *v49; // rax
__int64 v50; // rax
__int64 v51; // rbx
__int64 v52; // rax
__int64 v53; // rax
int v54; // r9d
struct cocos2d::CCObject *ToggleButton; // rbx
int v56; // eax
float v57; // xmm15_4
__int64 v58; // rax
int v59; // r9d
struct cocos2d::CCObject *v60; // rdi
int v61; // eax
__int64 v62; // rax
int v63; // r9d
struct cocos2d::CCObject *v64; // rbx
__int64 v65; // rcx
cocos2d::CCObject *v66; // rax
__int64 v67; // rax
__int64 v68; // rax
_QWORD *v69; // rbx
__int64 v70; // rdx
void (__fastcall *v71)(_QWORD *, __int64); // r8
__int64 v72; // rax
struct cocos2d::CCLabelBMFont *v73; // rbx
__int64 *v74; // rdi
float *v75; // rax
__int64 v76; // rax
__int64 v77; // rbx
__int64 v78; // rax
__int64 v79; // rax
int v80; // r9d
struct cocos2d::CCObject *v81; // rsi
__int64 v82; // rax
int v83; // r9d
struct cocos2d::CCObject *v84; // rdi
__int64 v85; // rax
int v86; // r9d
struct cocos2d::CCObject *v87; // rbx
__int64 v88; // rax
__int64 v89; // rcx
cocos2d::CCObject *v90; // rax
__int64 v91; // rax
_QWORD *v92; // rbx
__int64 v93; // rdx
void (__fastcall *v94)(_QWORD *, __int64); // r8
__int64 v95; // rax
struct cocos2d::CCLabelBMFont *v96; // rbx
__int64 *v97; // rdi
float *v98; // rax
__int64 v99; // rax
__int64 v100; // rbx
__int64 v101; // rax
__int64 v102; // rax
int v103; // r9d
struct cocos2d::CCObject *v104; // rbx
__int64 v105; // rax
int v106; // r9d
struct cocos2d::CCObject *v107; // rdi
__int64 v108; // rax
int v109; // r9d
struct cocos2d::CCObject *v110; // rbx
__int64 v111; // rax
__int64 v112; // rcx
cocos2d::CCObject *v113; // rax
__int64 v114; // rax
_QWORD *v115; // rbx
__int64 v116; // rdx
void (__fastcall *v117)(_QWORD *, __int64); // r9
__int64 v118; // rax
struct cocos2d::CCLabelBMFont *v119; // rbx
__int64 v120; // rax
int v121; // r9d
struct cocos2d::CCObject *v122; // rsi
__int64 v123; // rax
int v124; // r9d
struct cocos2d::CCObject *v125; // rdi
__int64 v126; // rax
int v127; // r9d
struct cocos2d::CCObject *v128; // rbx
cocos2d::CCObject *v129; // rbx
cocos2d::CCObject *v130; // rsi
__int64 v131; // rdi
__int64 v132; // rbx
__int64 v133; // rax
__int64 v134; // rax
__int64 v135; // rcx
cocos2d::CCArray *v136; // rdi
cocos2d::CCObject *v137; // rbx
struct cocos2d::CCObject *v138; // rbx
cocos2d::CCObject *v139; // rbx
struct cocos2d::CCObject *v140; // rbx
__int64 v141; // rbx
__int64 v142; // rax
__int64 v143; // rax
__int64 v144; // rdi
unsigned int *v145; // rdi
__int64 v146; // rax
__int64 *v147; // rdi
__int64 *i; // rsi
__int64 v149; // rbx
__int64 v150; // rdx
__int64 v151; // rax
unsigned int *v152; // rdi
__int64 v153; // rax
__int64 *v154; // rdi
__int64 *j; // rsi
__int64 v156; // rbx
__int64 v157; // rdx
__int64 v158; // rax
unsigned int *v159; // rdi
__int64 v160; // rax
__int64 *v161; // rdi
__int64 *k; // rsi
__int64 v163; // rbx
__int64 v164; // rdx
_QWORD *v165; // r14
unsigned int *v166; // rdi
__int64 v167; // rax
_QWORD *v168; // rdi
_QWORD *m; // rsi
_QWORD **v170; // rbx
__int64 v171; // rax
__int64 v172; // rax
__int64 v173; // [rsp+58h] [rbp-B0h] BYREF
__int64 *v174; // [rsp+60h] [rbp-A8h] BYREF
__int128 v175; // [rsp+68h] [rbp-A0h] BYREF
__int64 v176; // [rsp+78h] [rbp-90h]
__int64 v177; // [rsp+80h] [rbp-88h]
char v178[8]; // [rsp+88h] [rbp-80h] BYREF
__int64 v179[2]; // [rsp+90h] [rbp-78h] BYREF
__int64 v180; // [rsp+A0h] [rbp-68h]
__int64 v181; // [rsp+A8h] [rbp-60h]
float v182; // [rsp+B0h] [rbp-58h] BYREF
float v183; // [rsp+B4h] [rbp-54h]
__int128 *v184; // [rsp+B8h] [rbp-50h] BYREF
char v185[8]; // [rsp+C0h] [rbp-48h] BYREF
char v186[8]; // [rsp+C8h] [rbp-40h] BYREF
char v187[8]; // [rsp+D0h] [rbp-38h] BYREF
char v188[8]; // [rsp+D8h] [rbp-30h] BYREF
char v189[8]; // [rsp+E0h] [rbp-28h] BYREF
__int128 v190; // [rsp+E8h] [rbp-20h] BYREF
__int64 v191; // [rsp+F8h] [rbp-10h]
__int64 v192; // [rsp+100h] [rbp-8h]
char v193[8]; // [rsp+108h] [rbp+0h] BYREF
_BYTE v194[16]; // [rsp+110h] [rbp+8h] BYREF
char v195[8]; // [rsp+120h] [rbp+18h] BYREF
_QWORD v196[3]; // [rsp+128h] [rbp+20h] BYREF
__int128 v197; // [rsp+140h] [rbp+38h] BYREF
__int64 v198; // [rsp+150h] [rbp+48h]
__int64 v199; // [rsp+158h] [rbp+50h]
v2 = a2;
FLAlertLayer::incrementForcePrio((struct cocos2d::CCObject *)a1);
LODWORD(v173) = -1778384896;
result = cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v173);
if ( result )
{
*(_BYTE *)(a1 + 596) = 1;
LOBYTE(v5) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v5);
LOBYTE(v6) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v6);
LOBYTE(v7) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v7);
*(_DWORD *)(a1 + 664) = v2;
v8 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v174 = (__int64 *)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v174);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v8 = *(_QWORD *)&qword_14090BFB0;
}
v9 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v8 + 1232), v2);
v10 = v9;
v11 = 3;
if ( !v9 )
goto LABEL_9;
*(_DWORD *)(a1 + 668) = *((_DWORD *)v9 + 113);
*(_DWORD *)(a1 + 672) = *((_DWORD *)v9 + 114);
*(_DWORD *)(a1 + 676) = *((_DWORD *)v9 + 115);
*(_DWORD *)(a1 + 680) = *((_DWORD *)v9 + 116);
LODWORD(v173) = 0;
sub_14003F4F0((__int64)&v197, (__int64)v9 + 480);
v12 = sub_1402D6130((__int64 *)(a1 + 696), (int *)&v173);
sub_140059C40(v12, (__int64)&v197);
sub_14003D310((__int64)&v197);
LODWORD(v173) = 1;
sub_14003F4F0((__int64)&v197, (__int64)v10 + 512);
v13 = sub_1402D6130((__int64 *)(a1 + 696), (int *)&v173);
sub_140059C40(v13, (__int64)&v197);
sub_14003D310((__int64)&v197);
LODWORD(v173) = 2;
sub_14003F4F0((__int64)&v197, (__int64)v10 + 544);
v14 = sub_1402D6130((__int64 *)(a1 + 696), (int *)&v173);
sub_140059C40(v14, (__int64)&v197);
sub_14003D310((__int64)&v197);
LODWORD(v173) = 3;
sub_14003F4F0((__int64)&v197, (__int64)v10 + 608);
v15 = sub_1402D6130((__int64 *)(a1 + 696), (int *)&v173);
sub_140059C40(v15, (__int64)&v197);
sub_14003D310((__int64)&v197);
LODWORD(v173) = 4;
sub_14003F4F0((__int64)&v197, (__int64)v10 + 640);
v16 = sub_1402D6130((__int64 *)(a1 + 696), (int *)&v173);
sub_140059C40(v16, (__int64)&v197);
sub_14003D310((__int64)&v197);
LODWORD(v173) = 5;
sub_14003F4F0((__int64)&v197, (__int64)v10 + 576);
v17 = sub_1402D6130((__int64 *)(a1 + 696), (int *)&v173);
sub_140059C40(v17, (__int64)&v197);
sub_14003D310((__int64)&v197);
LODWORD(v173) = 6;
sub_14003F4F0((__int64)&v197, (__int64)v10 + 672);
v18 = sub_1402D6130((__int64 *)(a1 + 696), (int *)&v173);
sub_140059C40(v18, (__int64)&v197);
sub_14003D310((__int64)&v197);
if ( *((_BYTE *)v10 + 793) || (v19 = *((_DWORD *)v10 + 188), v19 == 1) || v19 == 2 )
v20 = 1;
else
LABEL_9:
v20 = 0;
if ( !*(_DWORD *)(a1 + 668) && !v20 )
*(_DWORD *)(a1 + 668) = 1;
if ( !*(_DWORD *)(a1 + 680) )
*(_DWORD *)(a1 + 680) = 1;
if ( v10 )
v21 = *((_DWORD *)v10 + 117);
else
v21 = 2;
*(_DWORD *)(a1 + 684) = v21;
if ( v20 )
{
if ( !v21 )
*(_DWORD *)(a1 + 684) = 1;
}
else
{
*(_DWORD *)(a1 + 684) = 2;
}
v22 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v174 = (__int64 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v174);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v22 = qword_14090BFD0;
}
if ( GameManager::getGameVariable(v22, "0218")
|| GameManager::getGameVariable(v22, "0219")
|| GameManager::getGameVariable(v22, "0243") )
{
v24 = 1;
*(_DWORD *)(a1 + 668) = 2;
*(_DWORD *)(a1 + 672) = 1;
*(_DWORD *)(a1 + 680) = 2;
*(_DWORD *)(a1 + 684) = 2;
}
else
{
v24 = 0;
}
v25 = cocos2d::CCDirector::sharedDirector(v23);
cocos2d::CCDirector::getWinSize(v25, &v182);
v26 = cocos2d::CCLayer::create();
*(_QWORD *)(a1 + 584) = v26;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v26);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v179, 0.0, 0.0, 80.0, 80.0);
v28 = (__int64 *)cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v27);
v29 = v28[40];
v30 = *(void (__fastcall **)(__int64 *, __int64))(v29 + 40);
LOBYTE(v29) = -1;
v30(v28 + 40, v29);
v31 = *v28;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v174, 400.0, 280.0);
(*(void (__fastcall **)(__int64 *, __int64))(v31 + 312))(v28, v32);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v28,
0xFFFFFFFFLL);
v33 = *v28;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v174, v182 * 0.5, v183 * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v33 + 184))(v28, v34);
v35 = cocos2d::CCLabelBMFont::create("Account Settings", "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v35 + 160LL))(v35);
v36 = *(_QWORD *)v35;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v174, v182 * 0.5, (float)((float)(v183 * 0.5) + 140.0) - 18.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v36 + 184))(v35, v37);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v35);
v39 = cocos2d::CCMenu::create(v38);
*(_QWORD *)(a1 + 552) = v39;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v39, 10);
*(_DWORD *)(a1 + 640) = -1;
v41 = (cocos2d::CCObject *)cocos2d::CCArray::create(v40);
*(_QWORD *)(a1 + 712) = v41;
cocos2d::CCObject::retain(v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v185, v182 * 0.5, (float)(v183 * 0.5) + 96.0);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v193, 400.0, 30.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v179, 0.0, 0.0, 40.0, 40.0);
v43 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v42);
v44 = v43[40];
v45 = *(void (__fastcall **)(_QWORD *, __int64))(v44 + 40);
LOBYTE(v44) = 50;
v45(v43 + 40, v44);
(*(void (__fastcall **)(_QWORD *, char *))(*v43 + 312LL))(v43, v193);
(*(void (__fastcall **)(_QWORD *))(*v43 + 160LL))(v43);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v43,
0xFFFFFFFFLL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v174, 0.0, -20.0);
cocos2d::CCPoint::operator+(v185, &v173, v46);
(*(void (__fastcall **)(_QWORD *, __int64 *))(*v43 + 184LL))(v43, &v173);
v47 = cocos2d::CCLabelBMFont::create("Direct messages:", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v47,
20);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v47 + 184LL))(v47, v185);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v47 + 160LL))(v47);
if ( v20 )
{
v174 = (__int64 *)&v197;
v197 = 0;
v198 = 0;
v199 = 0;
sub_14003D230(
&v197,
"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);
v180 = 15;
v181 = 15;
strcpy((char *)v179, "Direct Messages");
v48 = (__int64 *)InfoAlertButton::create(v179, &v197);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v48);
v49 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v47 + 320LL))(v47);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v174, (float)((float)(*v49 * 0.40000001) * 0.5) + 10.0, 0.0);
cocos2d::CCPoint::operator+(v185, &v173, v50);
v51 = *v48;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), v178, &v173);
(*(void (__fastcall **)(__int64 *, __int64))(v51 + 184))(v48, v52);
v174 = (__int64 *)&v175;
v175 = 0;
v176 = 3;
v177 = 15;
LOWORD(v175) = *(_WORD *)"All";
WORD1(v175) = (unsigned __int8)aAll[2];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v178, -105.0, -20.0);
cocos2d::CCPoint::operator+(v185, &v173, v53);
ToggleButton = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v175,
(unsigned int)GJAccountSettingsLayer::onMessageSetting,
v54,
*(_QWORD *)(a1 + 552),
(__int64)&v173,
1112014848,
1053609165);
*((_BYTE *)ToggleButton + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)ToggleButton + 64LL))(ToggleButton, 0);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 712), ToggleButton);
}
v174 = v179;
HIWORD(v179[1]) = 0;
v180 = 7;
v181 = 15;
qmemcpy(v179, "Friend", 6);
*(__int64 *)((char *)v179 + 6) = (unsigned __int8)aFriends[6];
v56 = -70;
if ( v20 )
v56 = -30;
v57 = (float)v56;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v195, (float)v56, -20.0);
cocos2d::CCPoint::operator+(v185, v189, v58);
v60 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)v179,
(unsigned int)GJAccountSettingsLayer::onMessageSetting,
v59,
*(_QWORD *)(a1 + 552),
(__int64)v189,
1112014848,
1053609165);
*((_BYTE *)v60 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v60 + 64LL))(v60, 1);
v174 = (__int64 *)&v175;
v175 = 0;
v176 = 3;
v177 = 15;
LODWORD(v175) = 6710863;
v61 = 30;
if ( v20 )
v61 = 70;
*(float *)&v173 = (float)v61;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, (float)v61, -20.0);
cocos2d::CCPoint::operator+(v185, v178, v62);
v64 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v175,
(unsigned int)GJAccountSettingsLayer::onMessageSetting,
v63,
*(_QWORD *)(a1 + 552),
(__int64)v178,
1112014848,
1053609165);
*((_BYTE *)v64 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v64 + 64LL))(v64, 2);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 712), v60);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 712), v64);
v66 = (cocos2d::CCObject *)cocos2d::CCArray::create(v65);
*(_QWORD *)(a1 + 720) = v66;
cocos2d::CCObject::retain(v66);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, 0.0, -40.0);
cocos2d::CCPoint::operator+(v185, v186, v67);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v179, 0.0, 0.0, 40.0, 40.0);
v69 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v68);
v70 = v69[40];
v71 = *(void (__fastcall **)(_QWORD *, __int64))(v70 + 40);
LOBYTE(v70) = 50;
v71(v69 + 40, v70);
(*(void (__fastcall **)(_QWORD *, char *))(*v69 + 312LL))(v69, v193);
(*(void (__fastcall **)(_QWORD *))(*v69 + 160LL))(v69);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v69,
0xFFFFFFFFLL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, 0.0, -20.0);
cocos2d::CCPoint::operator+(v186, v178, v72);
(*(void (__fastcall **)(_QWORD *, char *))(*v69 + 184LL))(v69, v178);
v73 = cocos2d::CCLabelBMFont::create("Friend requests:", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v73,
20);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v73 + 184LL))(v73, v186);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v73 + 160LL))(v73);
v184 = &v197;
v197 = 0;
v198 = 0;
v199 = 0;
sub_14003D230(
&v197,
"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);
v180 = 15;
v181 = 15;
qmemcpy(v179, "Friend Request", 14);
HIWORD(v179[1]) = (unsigned __int8)aFriendRequests[14];
v74 = (__int64 *)InfoAlertButton::create(v179, &v197);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v74);
v75 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v73 + 320LL))(v73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, (float)((float)(*v75 * 0.40000001) * 0.5) + 10.0, 0.0);
cocos2d::CCPoint::operator+(v186, v178, v76);
v77 = *v74;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), v195, v178);
(*(void (__fastcall **)(__int64 *, __int64))(v77 + 184))(v74, v78);
v184 = &v190;
v191 = 8;
v192 = 15;
v190 = *(unsigned __int64 *)"Messages";
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v195, -112.0, -20.0);
cocos2d::CCPoint::operator+(v186, v178, v79);
v81 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v190,
(unsigned int)GJAccountSettingsLayer::onFriendRequests,
v80,
*(_QWORD *)(a1 + 552),
(__int64)v178,
1112014848,
1053609165);
*((_BYTE *)v81 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v81 + 64LL))(v81, 2);
v184 = &v197;
v197 = 0;
v198 = 2;
v199 = 15;
strcpy((char *)&v197, "On");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v194, -10.0, -20.0);
cocos2d::CCPoint::operator+(v186, v189, v82);
v84 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v197,
(unsigned int)GJAccountSettingsLayer::onFriendRequests,
v83,
*(_QWORD *)(a1 + 552),
(__int64)v189,
1112014848,
1053609165);
*((_BYTE *)v84 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v84 + 64LL))(v84, 0);
v184 = &v175;
v175 = 0;
v176 = 3;
v177 = 15;
LODWORD(v175) = 6710863;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, 68.0, -20.0);
cocos2d::CCPoint::operator+(v186, &v174, v85);
v87 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v175,
(unsigned int)GJAccountSettingsLayer::onFriendRequests,
v86,
*(_QWORD *)(a1 + 552),
(__int64)&v174,
1112014848,
1053609165);
*((_BYTE *)v87 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v87 + 64LL))(v87, 1);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 720), v81);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 720), v84);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 720), v87);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, 0.0, -40.0);
cocos2d::CCPoint::operator+(v186, v187, v88);
v90 = (cocos2d::CCObject *)cocos2d::CCArray::create(v89);
*(_QWORD *)(a1 + 736) = v90;
cocos2d::CCObject::retain(v90);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v194, 0.0, 0.0, 40.0, 40.0);
v92 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v91);
v93 = v92[40];
v94 = *(void (__fastcall **)(_QWORD *, __int64))(v93 + 40);
LOBYTE(v93) = 50;
v94(v92 + 40, v93);
(*(void (__fastcall **)(_QWORD *, char *))(*v92 + 312LL))(v92, v193);
(*(void (__fastcall **)(_QWORD *))(*v92 + 160LL))(v92);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v92,
0xFFFFFFFFLL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, 0.0, -20.0);
cocos2d::CCPoint::operator+(v187, &v174, v95);
(*(void (__fastcall **)(_QWORD *, __int64 **))(*v92 + 184LL))(v92, &v174);
v96 = cocos2d::CCLabelBMFont::create("Group invites:", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v96,
20);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v96 + 184LL))(v96, v187);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v96 + 160LL))(v96);
v179[0] = (__int64)&v197;
v197 = 0;
v198 = 0;
v199 = 0;
sub_14003D230(
&v197,
"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);
v176 = 11;
v177 = 15;
*(_QWORD *)&v175 = 0x68432070756F7247LL;
*((_QWORD *)&v175 + 1) = 7566433;
v97 = (__int64 *)InfoAlertButton::create(&v175, &v197);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v97);
v98 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v96 + 320LL))(v96);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, (float)((float)(*v98 * 0.40000001) * 0.5) + 10.0, 0.0);
cocos2d::CCPoint::operator+(v187, &v174, v99);
v100 = *v97;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), v194, &v174);
(*(void (__fastcall **)(__int64 *, __int64))(v100 + 184))(v97, v101);
if ( v20 )
{
v179[0] = (__int64)&v175;
v175 = 0;
v176 = 3;
v177 = 15;
LOWORD(v175) = *(_WORD *)"All";
WORD1(v175) = (unsigned __int8)aAll[2];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v194, -105.0, -20.0);
cocos2d::CCPoint::operator+(v187, &v174, v102);
v104 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v175,
(unsigned int)GJAccountSettingsLayer::onGroupFriends,
v103,
*(_QWORD *)(a1 + 552),
(__int64)&v174,
1112014848,
1053609165);
*((_BYTE *)v104 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v104 + 64LL))(v104, 3);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 736), v104);
}
v179[0] = (__int64)&v175;
HIWORD(v175) = 0;
v176 = 7;
v177 = 15;
qmemcpy(&v175, "Friend", 6);
*(_QWORD *)((char *)&v175 + 6) = (unsigned __int8)aFriends[6];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v194, v57, -20.0);
cocos2d::CCPoint::operator+(v187, &v174, v105);
v107 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v175,
(unsigned int)GJAccountSettingsLayer::onGroupFriends,
v106,
*(_QWORD *)(a1 + 552),
(__int64)&v174,
1112014848,
1053609165);
*((_BYTE *)v107 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v107 + 64LL))(v107, 1);
v179[0] = (__int64)&v190;
v190 = 0;
v191 = 3;
v192 = 15;
LODWORD(v190) = 6710863;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, *(float *)&v173, -20.0);
cocos2d::CCPoint::operator+(v187, v178, v108);
v110 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v190,
(unsigned int)GJAccountSettingsLayer::onGroupFriends,
v109,
*(_QWORD *)(a1 + 552),
(__int64)v178,
1112014848,
1053609165);
*((_BYTE *)v110 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v110 + 64LL))(v110, 2);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 736), v107);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 736), v110);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, 0.0, -40.0);
cocos2d::CCPoint::operator+(v187, v188, v111);
v113 = (cocos2d::CCObject *)cocos2d::CCArray::create(v112);
*(_QWORD *)(a1 + 728) = v113;
cocos2d::CCObject::retain(v113);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v194, 0.0, 0.0, 40.0, 40.0);
v115 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v114);
v116 = v115[40];
v117 = *(void (__fastcall **)(_QWORD *, __int64))(v116 + 40);
LOBYTE(v116) = 50;
v117(v115 + 40, v116);
(*(void (__fastcall **)(_QWORD *, char *))(*v115 + 312LL))(v115, v193);
(*(void (__fastcall **)(_QWORD *))(*v115 + 160LL))(v115);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v115,
0xFFFFFFFFLL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, 0.0, -20.0);
cocos2d::CCPoint::operator+(v188, &v174, v118);
(*(void (__fastcall **)(_QWORD *, __int64 **))(*v115 + 184LL))(v115, &v174);
v119 = cocos2d::CCLabelBMFont::create("Show Comment History to:", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v119,
20);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v119 + 184LL))(v119, v188);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v119 + 160LL))(v119);
v179[0] = (__int64)&v190;
v190 = 0;
v191 = 3;
v192 = 15;
LOWORD(v190) = *(_WORD *)"All";
WORD1(v190) = (unsigned __int8)aAll[2];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v194, -105.0, -20.0);
cocos2d::CCPoint::operator+(v188, &v174, v120);
v122 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v190,
(unsigned int)GJAccountSettingsLayer::onCommentSetting,
v121,
*(_QWORD *)(a1 + 552),
(__int64)&v174,
1112014848,
1053609165);
*((_BYTE *)v122 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v122 + 64LL))(v122, 0);
v179[0] = (__int64)&v175;
HIWORD(v175) = 0;
v176 = 7;
v177 = 15;
qmemcpy(&v175, "Friend", 6);
*(_QWORD *)((char *)&v175 + 6) = (unsigned __int8)aFriends[6];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, -30.0, -20.0);
cocos2d::CCPoint::operator+(v188, v178, v123);
v125 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v175,
(unsigned int)GJAccountSettingsLayer::onCommentSetting,
v124,
*(_QWORD *)(a1 + 552),
(__int64)v178,
1112014848,
1053609165);
*((_BYTE *)v125 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v125 + 64LL))(v125, 1);
v179[0] = (__int64)&v197;
v197 = 0;
v198 = 2;
v199 = 15;
strcpy((char *)&v197, "Me");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v195, 70.0, -20.0);
cocos2d::CCPoint::operator+(v188, v189, v126);
v128 = (struct cocos2d::CCObject *)GJAccountSettingsLayer::createToggleButton(
a1,
(unsigned int)&v197,
(unsigned int)GJAccountSettingsLayer::onCommentSetting,
v127,
*(_QWORD *)(a1 + 552),
(__int64)v189,
1112014848,
1053609165);
*((_BYTE *)v128 + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v128 + 64LL))(v128, 2);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 728), v122);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 728), v125);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 728), v128);
v179[0] = (__int64)operator new(0x2C8u);
v129 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite(v179[0]);
if ( v129 )
{
if ( ButtonSprite::init_1(
(__int64)v129,
(__int64)"Social Link Settings",
160,
0,
1056964608,
1,
&qword_140704F78,
(__int64)"GJ_button_04.png",
1105199104) )
{
cocos2d::CCObject::autorelease(v129);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v129 + 8LL))(v129, 1);
v129 = nullptr;
}
}
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v129 + 160LL))(v129);
v130 = CCMenuItemSpriteExtra::create((int)v129, 0, a1, (__int64)GJAccountSettingsLayer::onSocialLinks);
*((_DWORD *)v130 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v130);
v131 = *(_QWORD *)v130;
v132 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, v182 * 0.5, (float)(v183 * 0.5) - 81.0);
cocos2d::CCNode::convertToNodeSpace(v132, v194, v133);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v131 + 184))(v130, v134);
v136 = (cocos2d::CCArray *)cocos2d::CCArray::create(v135);
v179[0] = (__int64)operator new(0x2C8u);
v137 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite(v179[0]);
if ( v137 )
{
if ( ButtonSprite::init_1(
(__int64)v137,
(__int64)"Cancel",
50,
0,
1056964608,
1,
&qword_140704F78,
(__int64)"GJ_button_05.png",
1103626240) )
{
cocos2d::CCObject::autorelease(v137);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v137 + 8LL))(v137, 1);
LODWORD(v137) = 0;
}
}
v138 = CCMenuItemSpriteExtra::create((int)v137, 0, a1, (__int64)GJAccountSettingsLayer::onClose);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v138);
cocos2d::CCArray::addObject(v136, v138);
v179[0] = (__int64)operator new(0x2C8u);
v139 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite(v179[0]);
if ( v139 )
{
if ( ButtonSprite::init_1(
(__int64)v139,
(__int64)"Update",
50,
0,
1056964608,
1,
&qword_140704F78,
(__int64)"GJ_button_01.png",
1103626240) )
{
cocos2d::CCObject::autorelease(v139);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v139 + 8LL))(v139, 1);
LODWORD(v139) = 0;
}
}
v140 = CCMenuItemSpriteExtra::create((int)v139, 0, a1, (__int64)GJAccountSettingsLayer::onUpdate);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v140);
cocos2d::CCArray::addObject(v136, v140);
v141 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, v182 * 0.5, (float)(v183 * 0.5) - 118.0);
cocos2d::CCNode::convertToNodeSpace(v141, v194, v142);
GameToolbox::alignItemsHorisontally((__int64)v136, 15.0, v143, 0);
v144 = *(_QWORD *)(a1 + 712);
if ( v144 )
{
v145 = *(unsigned int **)(v144 + 56);
v146 = *v145;
if ( (_DWORD)v146 )
{
v147 = *((__int64 **)v145 + 2);
for ( i = &v147[v146 - 1]; v147 <= i; ++v147 )
{
v149 = *v147;
if ( !*v147 )
break;
LOBYTE(v150) = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v149 + 56LL))(*v147) != *(_DWORD *)(a1 + 668);
CCMenuItemToggler::toggle(v149, v150);
}
}
}
v151 = *(_QWORD *)(a1 + 720);
if ( v151 )
{
v152 = *(unsigned int **)(v151 + 56);
v153 = *v152;
if ( (_DWORD)v153 )
{
v154 = *((__int64 **)v152 + 2);
for ( j = &v154[v153 - 1]; v154 <= j; ++v154 )
{
v156 = *v154;
if ( !*v154 )
break;
LOBYTE(v157) = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v156 + 56LL))(*v154) != *(_DWORD *)(a1 + 672);
CCMenuItemToggler::toggle(v156, v157);
}
}
}
v158 = *(_QWORD *)(a1 + 728);
if ( v158 )
{
v159 = *(unsigned int **)(v158 + 56);
v160 = *v159;
if ( (_DWORD)v160 )
{
v161 = *((__int64 **)v159 + 2);
for ( k = &v161[v160 - 1]; v161 <= k; ++v161 )
{
v163 = *v161;
if ( !*v161 )
break;
LOBYTE(v164) = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v163 + 56LL))(*v161) != *(_DWORD *)(a1 + 676);
CCMenuItemToggler::toggle(v163, v164);
}
}
}
GJAccountSettingsLayer::onGroupFriends(a1, 0);
if ( v24 )
{
LOWORD(v173) = -26986;
BYTE2(v173) = -106;
v196[0] = *(_QWORD *)(a1 + 712);
v196[1] = *(_QWORD *)(a1 + 736);
v196[2] = *(_QWORD *)(a1 + 720);
v165 = v196;
do
{
if ( *v165 )
{
v166 = *(unsigned int **)(*v165 + 56LL);
v167 = *v166;
if ( (_DWORD)v167 )
{
v168 = *((_QWORD **)v166 + 2);
for ( m = &v168[v167 - 1]; v168 <= m; ++v168 )
{
v170 = (_QWORD **)*v168;
if ( !*v168 )
break;
((void (__fastcall *)(_QWORD, _QWORD))(*v170)[117])(*v168, 0);
v171 = (*(__int64 (__fastcall **)(_QWORD *))(*v170[47] + 952LL))(v170[47]);
(**(void (__fastcall ***)(__int64, __int64 *))(v171 + 320))(v171 + 320, &v173);
v172 = (*(__int64 (__fastcall **)(_QWORD *))(*v170[48] + 952LL))(v170[48]);
(**(void (__fastcall ***)(__int64, __int64 *))(v172 + 320))(v172 + 320, &v173);
}
}
}
++v165;
--v11;
}
while ( v11 );
}
return 1;
}
return result;
}