//
// MessageThreadsPage::init from 0x1400d4500 to 0x1400d5d30 (6192 bytes)
//
// 4 xrefs:
// > MessageThreadsPage::create @ 0x1400d44b8
// > MessageThreadsPage::create @ 0x1400d44a9
// > ??> @ 0x14072cf40
// > ??> @ 0x1409145b8
//
// 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:26:26 +0000
//
// Hidden C++ exception states: #wind=10
bool __fastcall MessageThreadsPage::init(__int64 a1)
{
bool result; // al
__int64 v3; // rdx
__int64 v4; // rdx
__int64 v5; // rdx
__int64 v6; // rcx
__int64 v7; // rax
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // rdi
__int64 v11; // rbx
__int64 v12; // rax
struct cocos2d::CCLabelBMFont *v13; // r15
__int64 v14; // rbx
__int64 v15; // rax
__int64 v16; // rax
_QWORD *v17; // r8
_OWORD *v18; // rcx
const char *v19; // rax
__int64 v20; // rdx
__int64 *v21; // rsi
float v22; // xmm6_4
double v23; // xmm0_8
float v24; // xmm7_4
__int64 v25; // rdi
double (__fastcall *v26)(struct cocos2d::CCLabelBMFont *); // rbx
double v27; // xmm0_8
float v28; // xmm6_4
double v29; // xmm0_8
__int64 v30; // rax
struct cocos2d::CCSprite *v31; // rax
cocos2d::CCObject *v32; // rdi
__int64 v33; // rbx
__int64 v34; // rax
cocos2d::CCObject *v35; // rbx
cocos2d::CCObject *v36; // rdi
__int64 v37; // rbx
__int64 v38; // rax
float v39; // xmm11_4
float v40; // xmm6_4
float v41; // xmm8_4
float v42; // xmm7_4
__int64 v43; // rax
__int64 v44; // rdi
__int64 v45; // rbx
__int64 v46; // rax
__int64 v47; // rbx
float v48; // xmm8_4
__int64 v49; // rax
__int64 v50; // rdx
__int64 v51; // rcx
char *InputNode; // rdi
__int64 v53; // rbx
__int64 v54; // rax
__int64 v55; // rcx
cocos2d::CCObject *v56; // rsi
cocos2d::CCObject *v57; // rdi
float v58; // xmm6_4
float v59; // xmm11_4
__int64 v60; // rbx
float v61; // xmm6_4
__int64 v62; // rax
struct cocos2d::CCSprite *v63; // rbx
float v64; // xmm8_4
float v65; // xmm8_4
cocos2d::CCObject *v66; // rdi
float v67; // xmm7_4
float v68; // xmm6_4
__int64 v69; // rbx
__int64 v70; // rax
struct cocos2d::CCSprite *v71; // rax
cocos2d::CCObject *v72; // rax
__int64 v73; // rdi
__int64 v74; // rbx
__int64 v75; // rax
__int64 v76; // rcx
cocos2d::CCObject *v77; // rax
struct cocos2d::CCSprite *v78; // rax
cocos2d::CCObject *v79; // rdi
__int64 v80; // rbx
__int64 v81; // rax
struct cocos2d::CCLabelBMFont *v82; // rax
__int64 v83; // rdi
float *v84; // rax
__int64 v85; // rbx
__int64 v86; // rax
float v87; // xmm6_4
int v88; // esi
__int64 **v89; // r15
const char *v90; // rcx
__int64 *v91; // rbx
cocos2d::CCObject *v92; // rdi
__int64 v93; // rbx
__int64 v94; // rax
cocos2d::CCLayerColor *v95; // rax
const struct cocos2d::CCPoint *v96; // rax
char *v97; // rax
__int64 *v98; // rdi
cocos2d::CCObject *v99; // rbx
__int64 v100; // rdi
__int64 v101; // rbx
__int64 v102; // rax
cocos2d::CCSprite *v103; // rdi
cocos2d::CCObject *v104; // rbx
__int64 v105; // rdi
__int64 v106; // rbx
__int64 v107; // rax
struct cocos2d::CCLabelBMFont *v108; // rax
__int64 v109; // rdx
__int64 v110; // rdi
__int64 v111; // rbx
__int64 v112; // rax
__int64 *v113; // rdi
cocos2d::CCObject *v114; // rbx
__int64 v115; // rdi
__int64 v116; // rbx
__int64 v117; // rax
cocos2d::CCSprite *v118; // rdi
cocos2d::CCObject *v119; // rbx
__int64 v120; // rdi
__int64 v121; // rbx
__int64 v122; // rax
__int64 v123; // rbx
__int64 v124; // rdi
int v125; // eax
int v126; // r9d
__int64 v127; // rax
__int64 v128; // rdx
_QWORD *v129; // rbx
int v130; // r8d
_QWORD *v131; // rax
int v132; // r8d
_BYTE *v133; // rdx
_QWORD *v134; // rbx
_QWORD *v135; // rax
_BYTE *v136; // rdx
__int64 v137; // rbx
unsigned int v138; // eax
__int64 v139; // r8
__int64 v140; // r9
__int64 *v141; // rsi
cocos2d::CCObject *v142; // rbx
__int64 v143; // rdi
__int64 v144; // rbx
__int64 v145; // rax
struct cocos2d::CCLabelBMFont *v146; // rdi
__int64 v147; // rdx
void (__fastcall *v148)(char *, __int64); // r8
__int64 v149; // rbx
__int64 v150; // rax
struct cocos2d::CCSprite *v151; // rax
struct cocos2d::CCLabelBMFont *v152; // rax
__int64 v153; // rdi
float v154; // xmm6_4
float *v155; // rax
__int64 v156; // rbx
__int64 v157; // rax
__int64 v158; // rax
__int64 v159; // rax
__int64 v160; // rax
float v161; // xmm6_4
float v162[2]; // [rsp+58h] [rbp-B0h] BYREF
char v163[16]; // [rsp+60h] [rbp-A8h] BYREF
__int64 v164; // [rsp+70h] [rbp-98h]
_QWORD v165[3]; // [rsp+78h] [rbp-90h] BYREF
__int64 v166; // [rsp+90h] [rbp-78h]
__int64 v167; // [rsp+98h] [rbp-70h]
_QWORD *v168; // [rsp+190h] [rbp+88h] BYREF
__int16 v169; // [rsp+198h] [rbp+90h] BYREF
char v170; // [rsp+19Ah] [rbp+92h]
float v171; // [rsp+1A0h] [rbp+98h] BYREF
float v172; // [rsp+1A4h] [rbp+9Ch]
LODWORD(v168) = -1778384896;
result = cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v168);
if ( !result )
return result;
LOBYTE(v3) = -106;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(a1 + 408) + 40LL))(a1 + 408, v3);
FLAlertLayer::incrementForcePrio((struct cocos2d::CCObject *)a1);
*(_BYTE *)(a1 + 596) = 1;
LOBYTE(v4) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v4);
LOBYTE(v5) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v5);
v7 = cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize(v7, v162);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v171, v162[0] * 0.5, v162[1] * 0.5);
v8 = cocos2d::CCLayer::create();
*(_QWORD *)(a1 + 584) = v8;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v8);
v9 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v163, 0.0, 0.0, 80.0, 80.0);
v10 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v9);
v11 = *(_QWORD *)v10;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v168, 440.0, 300.0);
(*(void (__fastcall **)(__int64, __int64))(v11 + 312))(v10, v12);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v10 + 184LL))(v10, &v171);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v10,
4294967294LL);
v13 = cocos2d::CCLabelBMFont::create("Messages", (const char *)&qword_140704F78);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v13 + 160LL))(v13);
v14 = *(_QWORD *)v13;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v171, (float)(v172 + 145.0) - 10.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v14 + 184))(v13, v15);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v13);
v16 = cocos2d::CCMenu::create();
*(_QWORD *)(a1 + 552) = v16;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v16, 10);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 184LL))(*(_QWORD *)(a1 + 552), &unk_14090A188);
*(_DWORD *)(a1 + 640) = -1;
v168 = &v165[1];
*(_OWORD *)&v165[1] = 0;
v166 = 0;
v167 = 0;
v17 = sub_14003D460(0x1B0u);
v165[1] = v17;
v166 = 424;
v167 = 431;
v18 = v17;
v19 = "1. Do not harass, threaten, or bully other players.\n"
"2. Do not share personal info such as your address, passwords, or contact details.\n"
"3. Do not spam, scam, or send inappropriate content.\n"
"4. Do not try to bypass filters or safety systems.\n"
"Messages are filtered automatically and may be reviewed when reported or flagged for safety.\n"
"Report or Block users who break these rules.";
v20 = 3;
do
{
*v18 = *(_OWORD *)v19;
v18[1] = *((_OWORD *)v19 + 1);
v18[2] = *((_OWORD *)v19 + 2);
v18[3] = *((_OWORD *)v19 + 3);
v18[4] = *((_OWORD *)v19 + 4);
v18[5] = *((_OWORD *)v19 + 5);
v18[6] = *((_OWORD *)v19 + 6);
v18 += 8;
*(v18 - 1) = *((_OWORD *)v19 + 7);
v19 += 128;
--v20;
}
while ( v20 );
*v18 = *(_OWORD *)v19;
v18[1] = *((_OWORD *)v19 + 1);
*((_QWORD *)v18 + 4) = *((_QWORD *)v19 + 4);
*((_BYTE *)v17 + 424) = 0;
v164 = 15;
v165[0] = 15;
strcpy(v163, "Messaging Rules");
v21 = (__int64 *)InfoAlertButton::create(v163, &v165[1]);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v21);
v22 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v13 + 320LL))(v13);
v23 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v13 + 168LL))(v13);
v24 = *(float *)&v23 * v22;
v25 = *v21;
v26 = *(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v13 + 232LL);
v27 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v13 + 216LL))(v13);
v28 = (float)(*(float *)&v27 - (float)(v24 * 0.5)) - 14.0;
v29 = v26(v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v28, *(float *)&v29);
(*(void (__fastcall **)(__int64 *, __int64))(v25 + 184))(v21, v30);
v31 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_backBtn_001.png");
LODWORD(v26) = (_DWORD)v31;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v31 + 160LL))(v31);
v32 = CCMenuItemSpriteExtra::create((int)v26, 0, a1, (__int64)MessageThreadsPage::onClose);
*((_DWORD *)v32 + 93) = 1069547520;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v32);
v33 = *(_QWORD *)v32;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, (float)(v171 - 220.0) + 5.0, (float)(v172 + 145.0) - 5.0);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v33 + 184))(v32, v34);
v168 = operator new(0x2C8u);
v35 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v168);
if ( v35 )
{
if ( ButtonSprite::init_1(
(__int64)v35,
(__int64)"Legacy",
48,
0,
1053609165,
1,
&qword_140704F78,
(__int64)"GJ_button_04.png",
1102053376) )
{
cocos2d::CCObject::autorelease(v35);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v35 + 8LL))(v35, 1);
v35 = nullptr;
}
}
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v35 + 160LL))(v35);
v36 = CCMenuItemSpriteExtra::create((int)v35, 0, a1, (__int64)MessageThreadsPage::onLegacyMessages);
*((_DWORD *)v36 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v36);
v37 = *(_QWORD *)v36;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, (float)(v171 + 220.0) - 32.0, (float)(v172 + 145.0) - 12.0);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v37 + 184))(v36, v38);
v39 = (float)(v172 + 145.0) - 39.0;
v40 = v171 - 170.0;
v41 = v171 - 20.0;
v42 = (float)(v171 - 20.0) - (float)(v171 - 170.0);
v43 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v163, 0.0, 0.0, 40.0, 40.0);
v44 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v43);
v45 = *(_QWORD *)v44;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v168, v42, 24.0);
(*(void (__fastcall **)(__int64, __int64))(v45 + 312))(v44, v46);
LOWORD(v168) = 13405;
BYTE2(v168) = 31;
(**(void (__fastcall ***)(__int64, _QWORD **))(v44 + 320))(v44 + 320, &v168);
v47 = *(_QWORD *)v44;
v48 = (float)(v41 + v40) * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v48, v39);
(*(void (__fastcall **)(__int64, __int64))(v47 + 184))(v44, v49);
(*(void (__fastcall **)(_QWORD, __int64, _QWORD))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v44, 0);
InputNode = GameToolbox::createInputNode(v51, v50, (__int64)"Search name or title", 30);
*(_QWORD *)(a1 + 784) = InputNode;
v53 = *(_QWORD *)InputNode;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v48, v39);
(*(void (__fastcall **)(char *, __int64))(v53 + 184))(InputNode, v54);
v55 = *(_QWORD *)(a1 + 784);
*(_DWORD *)(v55 + 568) = 1058642330;
CCTextInputNode::refreshLabel(v55);
*(_QWORD *)(*(_QWORD *)(a1 + 784) + 600LL) = a1 + 544;
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 784),
5);
v168 = operator new(0x2C8u);
v56 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v168);
if ( v56 )
{
if ( ButtonSprite::init_1(
(__int64)v56,
(__int64)"New",
72,
0,
1056964608,
1,
&qword_140704F78,
(__int64)"GJ_button_01.png",
1104150528) )
{
cocos2d::CCObject::autorelease(v56);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v56 + 8LL))(v56, 1);
v56 = nullptr;
}
}
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v56 + 160LL))(v56);
v57 = CCMenuItemSpriteExtra::create((int)v56, 0, a1, (__int64)MessageThreadsPage::onNewThread);
*((_DWORD *)v57 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v57);
v58 = (float)(v171 + 220.0) - 51.0;
v59 = v39 - 1.0;
v60 = *(_QWORD *)v57;
v61 = v58
- (float)((float)(*(float *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v56 + 320LL))(v56)
* 0.80000001)
* 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v61, v59);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v60 + 184))(v57, v62);
v63 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn06_001.png");
v64 = *(float *)((*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v56 + 320LL))(v56) + 4);
v65 = (float)(v64 * 0.80000001)
/ *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v63 + 320LL))(v63) + 4);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v63 + 160LL))(v63);
v66 = CCMenuItemSpriteExtra::create((int)v63, 0, a1, (__int64)MessageThreadsPage::onSearch);
*((_DWORD *)v66 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v66);
v67 = v65 * *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v63 + 320LL))(v63);
v68 = (float)((float)(v171 - 20.0) + 4.0) + (float)(v67 * 0.5);
v69 = *(_QWORD *)v66;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v68, v59);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v69 + 184))(v66, v70);
v71 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn07_001.png");
LODWORD(v69) = (_DWORD)v71;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v71 + 160LL))(v71);
v72 = CCMenuItemSpriteExtra::create(v69, 0, a1, (__int64)MessageThreadsPage::onClearSearch);
*(_QWORD *)(a1 + 744) = v72;
*((_DWORD *)v72 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 744));
v73 = **(_QWORD **)(a1 + 744);
v74 = *(_QWORD *)(a1 + 744);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, (float)(v68 + v67) + 4.0, v59);
(*(void (__fastcall **)(__int64, __int64))(v73 + 184))(v74, v75);
v77 = (cocos2d::CCObject *)cocos2d::CCArray::create(v76);
*(_QWORD *)(a1 + 888) = v77;
cocos2d::CCObject::retain(v77);
v78 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn05_001.png");
*(_QWORD *)(a1 + 928) = v78;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v78 + 160LL))(v78);
v79 = CCMenuItemSpriteExtra::create(*(_QWORD *)(a1 + 928), 0, a1, (__int64)MessageThreadsPage::onUserFilter);
*((_DWORD *)v79 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v79);
v80 = *(_QWORD *)v79;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, (float)((float)((float)(v67 * 1.5) + v68) + 4.0) + 28.0, v59);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v80 + 184))(v79, v81);
v82 = cocos2d::CCLabelBMFont::create(&byte_1406ED6E0, (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 936) = v82;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v82 + 160LL))(v82);
v83 = **(_QWORD **)(a1 + 936);
v84 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 928) + 320LL))(*(_QWORD *)(a1 + 928));
v85 = *(_QWORD *)(a1 + 936);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, *v84 - 8.0, 10.0);
(*(void (__fastcall **)(__int64, __int64))(v83 + 184))(v85, v86);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 928) + 456LL))(
*(_QWORD *)(a1 + 928),
*(_QWORD *)(a1 + 936),
1);
MessageThreadsPage::refreshUserFilterBtn(a1);
v87 = (float)(v171 - 220.0) + 26.0;
v88 = 0;
LOWORD(v168) = -3856;
v89 = (__int64 **)(a1 + 864);
do
{
if ( v88 == 1 )
{
v90 = "threadBtn_dm_001.png";
}
else
{
v90 = "threadBtn_groupOn_001.png";
if ( v88 != 2 )
v90 = "threadBtn_allOn_001.png";
}
v169 = -3856;
v170 = -16;
v91 = (__int64 *)sub_14006C4D0(v90, 0, (__int64)&v169);
*v89 = v91;
v168 = operator new(0x208u);
v92 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v168);
if ( v92 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v92, v91, 0, a1, (__int64)MessageThreadsPage::onSelectFilter) )
{
cocos2d::CCObject::autorelease(v92);
goto LABEL_22;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v92 + 8LL))(v92, 1);
}
v92 = nullptr;
LABEL_22:
*((_DWORD *)v92 + 93) = 1067030938;
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v92 + 64LL))(v92, (unsigned int)v88);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v92);
v93 = *(_QWORD *)v92;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v163, v87, (float)(v172 + 68.0) - (float)(37 * v88));
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v93 + 184))(v92, v94);
++v88;
++v89;
}
while ( v88 < 3 );
MessageThreadsPage::updateFilterButtons(a1);
v95 = LoadingCircle::create();
*(_QWORD *)(a1 + 696) = v95;
*((_QWORD *)v95 + 69) = *(_QWORD *)(a1 + 584);
*(_BYTE *)(*(_QWORD *)(a1 + 696) + 560LL) = 0;
LoadingCircle::show(*(_QWORD *)(a1 + 696));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 696) + 336LL))(*(_QWORD *)(a1 + 696), 0);
v168 = &v165[1];
*(_OWORD *)&v165[1] = 0;
v166 = 0;
v167 = 0;
v165[1] = sub_14003D460(0x20u);
v166 = 23;
v167 = 31;
strcpy((char *)v165[1], "Something went wrong...");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, 0.5, 1.0);
v97 = TextArea::create((__int64)&v165[1], &qword_140704F78, 1.0, 600.0, v96, 1101004800, 0, 0);
*(_QWORD *)(a1 + 704) = v97;
(*(void (__fastcall **)(char *))(*(_QWORD *)v97 + 160LL))(v97);
(*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 704) + 184LL))(*(_QWORD *)(a1 + 704), &v171);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 704) + 336LL))(*(_QWORD *)(a1 + 704), 0);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 704),
10);
v98 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
(*(void (__fastcall **)(__int64 *))(*v98 + 160))(v98);
v168 = operator new(0x208u);
v99 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v168);
if ( v99 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v99, v98, 0, a1, (__int64)MessageThreadsPage::onPrevPage) )
{
cocos2d::CCObject::autorelease(v99);
goto LABEL_28;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v99 + 8LL))(v99, 1);
}
v99 = nullptr;
LABEL_28:
*(_QWORD *)(a1 + 712) = v99;
*((_DWORD *)v99 + 93) = 0x40000000;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 712));
v100 = **(_QWORD **)(a1 + 712);
v101 = *(_QWORD *)(a1 + 712);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v171 - 195.0, v172 - 59.0);
(*(void (__fastcall **)(__int64, __int64))(v100 + 184))(v101, v102);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 712) + 336LL))(*(_QWORD *)(a1 + 712), 0);
v103 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
cocos2d::CCSprite::setFlipX(v103, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v103 + 160LL))(v103);
v168 = operator new(0x208u);
v104 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v168);
if ( v104 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v104, (__int64 *)v103, 0, a1, (__int64)MessageThreadsPage::onNextPage) )
{
cocos2d::CCObject::autorelease(v104);
goto LABEL_33;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v104 + 8LL))(v104, 1);
}
v104 = nullptr;
LABEL_33:
*(_QWORD *)(a1 + 720) = v104;
*((_DWORD *)v104 + 93) = 0x40000000;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 720));
v105 = **(_QWORD **)(a1 + 720);
v106 = *(_QWORD *)(a1 + 720);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v171 + 195.0, v172 - 59.0);
(*(void (__fastcall **)(__int64, __int64))(v105 + 184))(v106, v107);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 720) + 336LL))(*(_QWORD *)(a1 + 720), 0);
v108 = cocos2d::CCLabelBMFont::create(&byte_1406ED6E0, "chatFont.fnt");
*(_QWORD *)(a1 + 792) = v108;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v108 + 160LL))(v108);
(**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(a1 + 792) + 368LL))(
*(_QWORD *)(a1 + 792) + 368LL,
&unk_140702E6C);
LOBYTE(v109) = -106;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(*(_QWORD *)(a1 + 792) + 368LL) + 40LL))(
*(_QWORD *)(a1 + 792) + 368LL,
v109);
v110 = **(_QWORD **)(a1 + 792);
v111 = *(_QWORD *)(a1 + 792);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v171, (float)(v172 - 145.0) + 8.0);
(*(void (__fastcall **)(__int64, __int64))(v110 + 184))(v111, v112);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 792));
v113 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
(*(void (__fastcall **)(__int64 *))(*v113 + 160))(v113);
v168 = operator new(0x208u);
v114 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v168);
if ( v114 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v114, v113, 0, a1, (__int64)MessageThreadsPage::onRefresh) )
{
cocos2d::CCObject::autorelease(v114);
goto LABEL_38;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v114 + 8LL))(v114, 1);
}
v114 = nullptr;
LABEL_38:
*(_QWORD *)(a1 + 728) = v114;
*((_DWORD *)v114 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 728));
v115 = **(_QWORD **)(a1 + 728);
v116 = *(_QWORD *)(a1 + 728);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, (float)(v171 + 220.0) - 24.0, (float)(v172 - 145.0) + 21.0);
(*(void (__fastcall **)(__int64, __int64))(v115 + 184))(v116, v117);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 728) + 336LL))(*(_QWORD *)(a1 + 728), 0);
v118 = cocos2d::CCSprite::createWithSpriteFrameName("downArrowBtn_001.png");
cocos2d::CCSprite::setFlipY(v118, 1);
v168 = operator new(0x208u);
v119 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v168);
if ( v119 )
{
if ( CCMenuItemSpriteExtra::init(
(__int64 *)v119,
(__int64 *)v118,
0,
a1,
(__int64)MessageThreadsPage::onScrollToTop) )
{
cocos2d::CCObject::autorelease(v119);
goto LABEL_43;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v119 + 8LL))(v119, 1);
}
v119 = nullptr;
LABEL_43:
*(_QWORD *)(a1 + 736) = v119;
*((_DWORD *)v119 + 93) = 1069547520;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 736));
v120 = **(_QWORD **)(a1 + 736);
v121 = *(_QWORD *)(a1 + 736);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, v171, (float)((float)(v172 + 98.0) - 12.0) - 16.0);
(*(void (__fastcall **)(__int64, __int64))(v120 + 184))(v121, v122);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 736) + 336LL))(*(_QWORD *)(a1 + 736), 0);
v123 = *(_QWORD *)(a1 + 584);
v124 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v168,
(float)(v171 - 220.0) + 21.0,
(float)((float)(v172 - 145.0) + 13.0) + 3.0);
v127 = GJSelectionStrip::create(v124, v123, v125, v126, a1, (__int64)MessageThreadsPage::onSelectAll);
*(_QWORD *)(a1 + 752) = v127;
GJSelectionStrip::addCountLabel(v127, v128, 5);
v129 = *(_QWORD **)(a1 + 752);
v131 = (_QWORD *)GJSelectionStrip::addButton(
(_DWORD)v129,
(unsigned int)"threadBtn_markRead_001.png",
v130,
(unsigned int)MessageThreadsPage::onMarkRead,
1068708659);
v168 = v131;
v133 = (_BYTE *)v129[49];
if ( v133 == (_BYTE *)v129[50] )
{
sub_1400699B0(v129 + 48, v133, &v168);
}
else
{
*(_QWORD *)v133 = v131;
v129[49] += 8LL;
}
v134 = *(_QWORD **)(a1 + 752);
v135 = (_QWORD *)GJSelectionStrip::addButton(
(_DWORD)v134,
(unsigned int)"threadBtn_delete_001.png",
v132,
(unsigned int)MessageThreadsPage::onDeleteSelected,
1067030938);
v168 = v135;
v136 = (_BYTE *)v134[49];
if ( v136 == (_BYTE *)v134[50] )
{
sub_1400699B0(v134 + 48, v136, &v168);
}
else
{
*(_QWORD *)v136 = v135;
v134[49] += 8LL;
}
if ( *(_QWORD *)(a1 + 752) )
{
v137 = *(_QWORD *)(a1 + 752);
v138 = MessageThreadsPage::selectedCount(a1);
GJSelectionStrip::setCount(v137, v138, v139, v140);
}
v141 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("accountBtn_invites_001.png");
v168 = operator new(0x208u);
v142 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v168);
if ( v142 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v142, v141, 0, a1, (__int64)MessageThreadsPage::onShowInvites) )
{
cocos2d::CCObject::autorelease(v142);
goto LABEL_56;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v142 + 8LL))(v142, 1);
}
v142 = nullptr;
LABEL_56:
*(_QWORD *)(a1 + 760) = v142;
*((_DWORD *)v142 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 760));
v143 = **(_QWORD **)(a1 + 760);
v144 = *(_QWORD *)(a1 + 760);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, (float)(v171 + 220.0) - 26.0, v172 + 68.0);
(*(void (__fastcall **)(__int64, __int64))(v143 + 184))(v144, v145);
v146 = cocos2d::CCLabelBMFont::create("Invites", (const char *)&qword_140704F78);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v146 + 160LL))(v146);
v147 = *((_QWORD *)v146 + 46);
v148 = *(void (__fastcall **)(char *, __int64))(v147 + 40);
LOBYTE(v147) = -116;
v148((char *)v146 + 368, v147);
v149 = *(_QWORD *)v146;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, (float)(v171 + 220.0) - 26.0, v172 + 45.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v149 + 184))(v146, v150);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v146,
5);
v151 = cocos2d::CCSprite::createWithSpriteFrameName("d_ball_01_001.png");
*(_QWORD *)(a1 + 768) = v151;
(**((void (__fastcall ***)(__int64, void *))v151 + 40))((__int64)v151 + 320, &unk_140702E68);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 768) + 160LL))(*(_QWORD *)(a1 + 768));
v152 = cocos2d::CCLabelBMFont::create(&byte_1406ED6E0, (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 776) = v152;
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 768) + 464LL))(
*(_QWORD *)(a1 + 768),
v152);
(*(void (__fastcall **)(__int64 *, _QWORD, __int64))(*v141 + 456))(v141, *(_QWORD *)(a1 + 768), 1);
v153 = **(_QWORD **)(a1 + 768);
v154 = *(float *)((*(__int64 (__fastcall **)(__int64 *))(*v141 + 320))(v141) + 4) - 4.0;
v155 = (float *)(*(__int64 (__fastcall **)(__int64 *))(*v141 + 320))(v141);
v156 = *(_QWORD *)(a1 + 768);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v168, *v155 - 4.0, v154);
(*(void (__fastcall **)(__int64, __int64))(v153 + 184))(v156, v157);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 768) + 336LL))(*(_QWORD *)(a1 + 768), 0);
v158 = cocos2d::CCNotificationCenter::sharedNotificationCenter();
cocos2d::CCNotificationCenter::addObserver(
v158,
a1,
MessageThreadsPage::onThreadsChanged,
"ThreadsChangedNotification",
0);
v159 = cocos2d::CCNotificationCenter::sharedNotificationCenter();
cocos2d::CCNotificationCenter::addObserver(
v159,
a1,
MessageThreadsPage::onSelectionChanged,
"ThreadSelectionChangedNotification",
0);
v160 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v168 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v168);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v160 = *(_QWORD *)&qword_14090BFB0;
}
v161 = (float)*(int *)(v160 + 552);
cocos2d::CCNode::unschedule(a1, MessageThreadsPage::onInboxPoll);
if ( v161 > 0.0 )
cocos2d::CCNode::schedule(a1, MessageThreadsPage::onInboxPoll);
MessageThreadsPage::loadPage(a1, 0, 0);
return 1;
}