//
// CommentCell::loadFromComment from 0x140151ea0 to 0x140154845 (10661 bytes)
//
// 4 xrefs:
// > CustomListView::loadCell @ 0x140145cc9
// > CommentCell::FLAlert_Clicked @ 0x140155095
// > CommentCell::onUnhide @ 0x1401550c5
// > ??> @ 0x140917894
//
// 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:27:19 +0000
//
// Hidden C++ exception states: #wind=32
void __fastcall CommentCell::loadFromComment(__int64 a1, __int64 a2)
{
__int64 v2; // r12
__int64 v4; // rdx
cocos2d::CCObject *v5; // rcx
bool v6; // al
__int64 v7; // rdi
__int64 v8; // rcx
__int64 v9; // rcx
__int64 Username; // rbx
void *v11; // rcx
__int64 v12; // rax
__int64 v13; // rbx
void **v14; // rcx
void *v15; // rdx
int v16; // r13d
__int64 v17; // rcx
cocos2d::CCString *v18; // rax
__int64 v19; // rdx
void **v20; // rcx
struct cocos2d::CCLabelBMFont *v21; // r15
float v22; // xmm2_4
float v23; // xmm1_4
int v24; // ecx
float v25; // xmm8_4
__int64 v26; // rsi
float v27; // xmm0_4
__int64 v28; // rbx
__int64 v29; // rax
__int64 v30; // rcx
void (__fastcall **v31)(__int64, __int64); // rbx
__int64 v32; // rax
unsigned int v33; // ebx
__int64 v34; // rcx
__int64 v35; // rax
__int64 v36; // rcx
bool v37; // al
__int64 v38; // rdx
unsigned int v39; // ebx
__int64 v40; // rbx
__int64 v41; // rax
__int64 v42; // rbx
__int64 v43; // rax
__int64 v44; // rbx
char v45; // bl
float v46; // xmm6_4
double v47; // xmm0_8
int v48; // eax
float v49; // xmm7_4
float v50; // xmm0_4
float v51; // xmm6_4
float v52; // xmm9_4
struct cocos2d::CCSprite *v53; // rdi
__int64 v54; // rbx
__int64 v55; // rax
int v56; // eax
struct cocos2d::CCSprite *v57; // rdi
__int64 v58; // rbx
__int64 v59; // rax
int v60; // eax
int v61; // edx
cocos2d::CCString *v62; // rax
const char *CString; // rax
struct cocos2d::CCLabelBMFont *v64; // rdi
__int64 v65; // rbx
__int64 v66; // rax
__int64 v67; // rdx
float v68; // xmm0_4
__int64 v69; // rbx
float v70; // xmm7_4
float v71; // xmm6_4
double v72; // xmm0_8
__int64 v73; // rax
int v74; // eax
float v75; // xmm6_4
cocos2d::CCObject *v76; // rsi
__int64 v77; // rdi
float *v78; // r12
float v79; // xmm7_4
float v80; // xmm6_4
double v81; // xmm0_8
__int64 v82; // rbx
__int64 v83; // rax
__int64 v84; // rax
__int64 v85; // rax
__int64 v86; // rbx
__int64 v87; // rax
__int64 v88; // rbx
__int64 v89; // rax
char v90; // cl
float v91; // xmm1_4
int v92; // eax
float v93; // xmm7_4
float v94; // xmm2_4
int v95; // eax
float v96; // xmm6_4
char v97; // dl
const char *v98; // rbx
int v99; // eax
double v100; // xmm3_8
size_t v101; // rsi
__int64 v102; // rax
void (__fastcall ***v103)(_QWORD, _QWORD); // rbx
__int64 v104; // rdx
void **v105; // rdx
__int64 v106; // rdi
size_t v107; // r8
__int64 v108; // rdx
__int64 v109; // rcx
__int64 v110; // r8
float v111; // xmm6_4
int v112; // ebx
int v113; // r12d
__int64 v114; // r8
__int64 v115; // rdx
__int64 v116; // rcx
__int64 v117; // r8
__int64 v118; // r8
int v119; // eax
__int64 v120; // rcx
float v121; // xmm2_4
double v122; // xmm3_8
__int64 v123; // r15
unsigned __int64 v124; // rdi
_BYTE *v125; // rbx
__int64 v126; // rcx
__int64 v127; // r13
_WORD *v128; // rbx
void *v129; // rcx
int v130; // r13d
__int64 v131; // r9
unsigned __int64 v132; // rbx
unsigned __int64 v133; // r12
char *v134; // r8
signed __int64 v135; // rcx
unsigned __int64 v136; // rdx
size_t v137; // r8
void **v138; // rdx
bool v139; // al
char v140; // dl
__int64 v141; // rax
size_t v142; // rax
void **v143; // rdx
void *v144; // rcx
_BYTE *v145; // rbx
__int64 v146; // rcx
__int64 v147; // r13
void **v148; // rcx
struct cocos2d::CCLabelBMFont *v149; // rdi
__int64 v150; // rbx
__int64 v151; // rax
__int64 v152; // rbx
__int64 v153; // rax
__int64 v154; // rcx
_DWORD *v155; // rdx
int v156; // ebx
__int64 v157; // rax
__int64 v158; // rdx
__int64 v159; // rdx
__int64 j; // rcx
__int64 v161; // rcx
void *v162; // r8
float v163; // xmm7_4
char v164; // bl
void **v165; // rdx
__int64 v166; // rdx
__int64 v167; // rcx
__int64 v168; // r8
int v169; // edi
const struct cocos2d::CCPoint *v170; // rax
char *v171; // rdi
__int64 v172; // rbx
__int64 v173; // rax
__int64 v174; // rbx
__int64 v175; // rax
__int64 v176; // rcx
_DWORD *SavedLevel; // rdx
__int64 v178; // rcx
int v179; // ebx
__int64 v180; // rax
__int64 v181; // rdx
__int64 v182; // rdx
__int64 i; // rcx
__int64 v184; // rax
__int64 v185; // rax
signed int v186; // esi
unsigned __int64 v187; // rdi
_BYTE *v188; // rbx
unsigned __int64 v189; // rcx
char *v190; // rbx
void *v191; // rcx
char v192; // bl
_QWORD *v193; // rax
void **v194; // rcx
cocos2d::CCObject *v195; // rbx
unsigned __int64 v196; // rdi
_BYTE *v197; // rbx
unsigned __int64 v198; // rcx
cocos2d::CCObject *v199; // rsi
__int64 v200; // r15
__int64 v201; // rcx
char v202; // dl
int v203; // ecx
int v204; // eax
int v205; // ecx
float v206; // xmm0_4
__int64 v207; // rdi
__int64 v208; // rbx
__int64 v209; // rax
__int64 v210; // rax
__int64 v211; // rax
void *v212; // rcx
__int64 v213; // rax
cocos2d::CCObject *v214; // rbx
cocos2d::CCObject *v215; // rsi
__int64 v216; // rdi
float v217; // xmm6_4
float *v218; // rax
__int64 v219; // rbx
__int64 v220; // rax
__int64 v221; // rax
__int64 v222; // rax
int v223; // r12d
char v224; // cl
int v225; // esi
int v226; // eax
float v227; // xmm6_4
float v228; // xmm7_4
float v229; // xmm9_4
struct cocos2d::CCSprite *v230; // rdi
__int64 v231; // rbx
char v232; // dl
int v233; // eax
float v234; // xmm1_4
int v235; // eax
float v236; // xmm1_4
__int64 v237; // rax
int v238; // esi
__int64 v239; // rdi
__int64 v240; // rbx
cocos2d::CCSpriteFrameCache *v241; // rcx
const char *v242; // rdx
struct cocos2d::CCSpriteFrame *v243; // rax
cocos2d::CCString *v244; // rax
const char *v245; // rax
struct cocos2d::CCLabelBMFont *v246; // rax
__int64 v247; // rdi
__int64 v248; // rbx
__int64 v249; // rax
char v250; // cl
float v251; // xmm2_4
float v252; // xmm2_4
int v253; // eax
__int64 v254; // rax
__int64 v255; // rbx
__int64 v256; // rax
int v257; // eax
__int64 v258; // rax
__int64 v259; // rbx
__int64 v260; // rax
const struct cocos2d::CCPoint *v261; // rax
cocos2d::CCObject *v262; // r13
__int64 v263; // rbx
__int64 v264; // rax
__int64 v265; // rax
__int64 v266; // rax
int v267; // ecx
__int64 v268; // rcx
__int64 v269; // rax
__int64 v270; // rbx
_DWORD *v271; // rcx
int v272; // edx
char v273; // bl
_DWORD *v274; // rdx
int v275; // eax
bool v276; // r15
bool v277; // di
int v278; // esi
cocos2d::CCObject *v279; // rdi
__int64 v280; // r15
__int64 v281; // rax
struct cocos2d::CCSprite *v282; // rbx
int v283; // ecx
__int64 v284; // rax
__int64 v285; // rbx
__int64 v286; // rax
struct cocos2d::CCSprite *v287; // rbx
struct cocos2d::CCSprite *v288; // r15
cocos2d::CCMenuItem *v289; // rax
__int64 v290; // rcx
__int64 v291; // rax
cocos2d::CCObject *v292; // rcx
const struct cocos2d::CCPoint *v293; // rax
__int64 v294; // rax
struct cocos2d::CCLabelBMFont *v295; // rbx
__int64 v296; // rdx
cocos2d::CCObject *v297; // rsi
__int64 v298; // rdi
char v299; // dl
__int64 v300; // rbx
int v301; // ecx
int v302; // eax
__int64 v303; // rax
__int64 v304; // rax
__int64 v305; // rax
bool v306; // bl
const char *p_Src; // rdx
cocos2d::CCString *v308; // rax
const char *v309; // rax
struct cocos2d::CCLabelBMFont *v310; // rdi
__int64 v311; // rbx
__int64 v312; // rax
__int64 v313; // rdx
__int64 v314; // rbx
__int64 v315; // rax
__int16 v316; // [rsp+58h] [rbp-B0h] BYREF
char v317; // [rsp+5Ah] [rbp-AEh]
void **v318; // [rsp+68h] [rbp-A0h] BYREF
void *v319; // [rsp+70h] [rbp-98h] BYREF
void *v320; // [rsp+78h] [rbp-90h] BYREF
__int64 v321; // [rsp+80h] [rbp-88h] BYREF
int v322; // [rsp+88h] [rbp-80h] BYREF
char v323[8]; // [rsp+90h] [rbp-78h] BYREF
void *v324[2]; // [rsp+98h] [rbp-70h] BYREF
__int64 v325; // [rsp+A8h] [rbp-60h]
unsigned __int64 v326; // [rsp+B0h] [rbp-58h]
void *v327[2]; // [rsp+B8h] [rbp-50h] BYREF
__int128 v328; // [rsp+C8h] [rbp-40h]
__int128 Src; // [rsp+D8h] [rbp-30h] BYREF
__int128 v330; // [rsp+E8h] [rbp-20h]
void *Block[2]; // [rsp+F8h] [rbp-10h] BYREF
__int128 v332; // [rsp+108h] [rbp+0h]
v2 = a2;
LODWORD(v320) = 0;
LOBYTE(a2) = -1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(*(_QWORD *)(a1 + 536) + 408LL) + 40LL))(
*(_QWORD *)(a1 + 536) + 408LL,
a2);
cocos2d::CCObject::retain((cocos2d::CCObject *)v2);
v5 = *(cocos2d::CCObject **)(a1 + 592);
if ( v5 )
cocos2d::CCObject::release(v5);
*(_QWORD *)(a1 + 592) = v2;
v6 = !*(_DWORD *)(v2 + 396) && *(int *)(v2 + 404) > 0;
*(_BYTE *)(a1 + 600) = v6;
LOBYTE(v4) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 544) + 576LL))(*(_QWORD *)(a1 + 544), v4);
if ( !*(_BYTE *)(*(_QWORD *)(a1 + 592) + 440LL) )
{
v7 = cocos2d::CCMenu::create();
v321 = v7;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(*(_QWORD *)(a1 + 544), v7, 2);
if ( !*(_BYTE *)(*(_QWORD *)(a1 + 592) + 457LL) )
{
v8 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v319 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v319);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v8 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::userNameForUserID(v8, Block, *(unsigned int *)(*(_QWORD *)(a1 + 592) + 388LL));
if ( *(_BYTE *)(a1 + 600) )
{
v9 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v319 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v319);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v9 = *(_QWORD *)&qword_14090BFB0;
}
Username = GameLevelManager::tryGetUsername(v9, v324, *(unsigned int *)(*(_QWORD *)(a1 + 592) + 404LL));
if ( Block != (void **)Username )
{
if ( *((_QWORD *)&v332 + 1) > 0xFu )
{
v11 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v332 + 1) + 1LL) >= 0x1000 )
{
v11 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v11);
}
*(_OWORD *)Block = *(_OWORD *)Username;
v332 = *(_OWORD *)(Username + 16);
*(_QWORD *)(Username + 16) = 0;
*(_QWORD *)(Username + 24) = 15;
*(_BYTE *)Username = 0;
}
sub_14003D310((__int64)v324);
}
v12 = sub_14003F4F0((__int64)v324, (__int64)Block);
v13 = v12;
v319 = (void *)v12;
v14 = (void **)(*(_QWORD *)(a1 + 592) + 352LL);
if ( v14 != (void **)v12 )
{
v15 = (void *)v12;
if ( *(_QWORD *)(v12 + 24) > 0xFu )
v15 = *(void **)v12;
sub_1400405A0(v14, v15, *(_QWORD *)(v12 + 16));
}
sub_14003D310(v13);
sub_14003D310((__int64)Block);
}
v16 = *(_DWORD *)(*(_QWORD *)(a1 + 592) + 404LL);
if ( !*(_BYTE *)(a1 + 600) && !v16 )
{
v17 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v319 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v319);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v17 = *(_QWORD *)&qword_14090BFB0;
}
v18 = cocos2d::CCDictionary::valueForKey(
*(cocos2d::CCDictionary **)(v17 + 1080),
*(int *)(*(_QWORD *)(a1 + 592) + 388LL));
v16 = cocos2d::CCString::intValue(v18);
*(_DWORD *)(*(_QWORD *)(a1 + 592) + 404LL) = v16;
}
v19 = *(_QWORD *)(a1 + 592);
v322 = *(_DWORD *)(v19 + 404);
sub_14003F4F0((__int64)v324, v19 + 352);
v20 = v324;
if ( v326 > 0xF )
v20 = (void **)v324[0];
v21 = cocos2d::CCLabelBMFont::create((const char *)v20, "goldFont.fnt");
sub_14003D310((__int64)v324);
if ( *(_BYTE *)(a1 + 602) )
{
v22 = 0.5;
v23 = 150.0;
}
else
{
v24 = 150;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 592) + 456LL) )
v24 = 100;
v23 = (float)v24;
v22 = 0.69999999;
}
cocos2d::CCLabelBMFont::limitLabelWidth(v21, v23, v22, 0.0);
v25 = 0.0;
if ( !*(_BYTE *)(a1 + 600) )
{
if ( *(_QWORD *)(*(_QWORD *)(a1 + 592) + 472LL) )
{
v26 = SimplePlayer::create(1);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v26,
1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v26 + 160LL))(v26);
if ( *(_BYTE *)(a1 + 602) )
v27 = 11.0;
else
v27 = 19.5;
v28 = *(_QWORD *)v26;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v319, 20.0, *(float *)(a1 + 532) - v27);
(*(void (__fastcall **)(__int64, __int64))(v28 + 184))(v26, v29);
v30 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v320 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v320);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v30 = qword_14090BFD0;
}
v31 = *(void (__fastcall ***)(__int64, __int64))(v26 + 320);
v32 = GameManager::colorForIdx(
v30,
&v316,
*(unsigned int *)(*(_QWORD *)(*(_QWORD *)(a1 + 592) + 472LL) + 432LL));
(*v31)(v26 + 320, v32);
v33 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 592) + 472LL) + 436LL);
v34 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v319 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v319);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v34 = qword_14090BFD0;
}
v35 = GameManager::colorForIdx(v34, &v320, v33);
(**(void (__fastcall ***)(__int64, __int64))(*(_QWORD *)(v26 + 608) + 320LL))(
*(_QWORD *)(v26 + 608) + 320LL,
v35);
SimplePlayer::updateColors(v26);
SimplePlayer::tryEnableCustomGlowColor(
v26,
*(unsigned int *)(*(_QWORD *)(*(_QWORD *)(a1 + 592) + 472LL) + 440LL));
v36 = *(_QWORD *)(*(_QWORD *)(a1 + 592) + 472LL);
v37 = *(_DWORD *)(v36 + 444) == 2 || *(_BYTE *)(v36 + 744);
*(_BYTE *)(v26 + 660) = v37;
v38 = *(_QWORD *)(*(_QWORD *)(a1 + 592) + 472LL);
v39 = *(_DWORD *)(v38 + 448);
SimplePlayer::updatePlayerFrame(v26, *(unsigned int *)(v38 + 428), v39);
SimplePlayer::updateColors(v26);
if ( v39 == 4 )
{
v40 = *(_QWORD *)v26;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v26 + 168LL))(v26);
(*(void (__fastcall **)(__int64))(v40 + 160))(v26);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v319, 1.0, 0.0);
v42 = v41;
v43 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v26 + 200LL))(v26);
cocos2d::CCPoint::operator+(v43, &v320, v42);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v26 + 184LL))(v26, &v320);
}
else if ( v39 == 6 || v39 == 1 || v39 == 3 )
{
v44 = *(_QWORD *)v26;
(*(float (__fastcall **)(__int64))(*(_QWORD *)v26 + 168LL))(v26);
(*(void (__fastcall **)(__int64))(v44 + 160))(v26);
}
v25 = 26.0;
}
v45 = *(_BYTE *)(a1 + 602);
v46 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 320LL))(v21);
v47 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 168LL))(v21);
v48 = 12;
if ( v45 )
v48 = 8;
v49 = (float)((float)(*(float *)&v47 * v46) + (float)(v25 + 10.0)) + (float)v48;
if ( *(_BYTE *)(a1 + 602) )
v50 = 11.5;
else
v50 = 19.5;
v51 = *(float *)(a1 + 532) - v50;
v52 = 0.0;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 592) + 452LL) )
{
v53 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sFriendsIcon_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v53 + 160LL))(v53);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v53,
10);
v54 = *(_QWORD *)v53;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v319, v49 + 0.0, v51);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v54 + 184))(v53, v55);
v56 = 20;
if ( *(_BYTE *)(a1 + 602) )
v56 = 15;
v52 = (float)v56 + 0.0;
}
if ( *(_DWORD *)(*(_QWORD *)(a1 + 592) + 448LL) == 2 )
{
v57 = cocos2d::CCSprite::createWithSpriteFrameName("modBadge_02_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v57 + 160LL))(v57);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v57,
10);
v58 = *(_QWORD *)v57;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v319, v52 + v49, v51);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v58 + 184))(v57, v59);
v60 = 22;
if ( *(_BYTE *)(a1 + 602) )
v60 = 15;
v52 = v52 + (float)v60;
}
v61 = *(_DWORD *)(*(_QWORD *)(a1 + 592) + 444LL);
if ( v61 > 0 )
{
v62 = cocos2d::CCString::createWithFormat("%i%%", v61);
CString = cocos2d::CCString::getCString(v62);
v64 = cocos2d::CCLabelBMFont::create(CString, "chatFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 544) + 464LL))(
*(_QWORD *)(a1 + 544),
v64);
v65 = *(_QWORD *)v64;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v319, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v65 + 288))(v64, v66);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v64 + 160LL))(v64);
(**((void (__fastcall ***)(__int64, __int16 *))v64 + 46))((__int64)v64 + 368, &word_140702F60);
LOBYTE(v67) = -106;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v64 + 46) + 40LL))((__int64)v64 + 368, v67);
if ( *(_BYTE *)(a1 + 602) )
v68 = 11.5;
else
v68 = 19.5;
v69 = *(_QWORD *)v64;
v70 = *(float *)(a1 + 532) - v68;
v71 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 320LL))(v21);
v72 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 168LL))(v21);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v319,
(float)((float)(*(float *)&v72 * v71) + (float)((float)(v25 + 10.0) + v52)) + 4.0,
v70);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v69 + 184))(v64, v73);
}
v7 = v321;
}
v74 = 18;
if ( *(_BYTE *)(a1 + 602) )
v74 = 10;
v75 = (float)v74;
if ( !v16 || *(_BYTE *)(a1 + 600) || *(_BYTE *)(v2 + 456) )
{
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 544) + 464LL))(
*(_QWORD *)(a1 + 544),
v21);
v86 = *(_QWORD *)v21;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v86 + 288))(v21, v87);
v88 = *(_QWORD *)v21;
v78 = (float *)(a1 + 532);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, v25 + 10.0, *(float *)(a1 + 532) - v75);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v88 + 184))(v21, v89);
if ( v322 != 71 && !*(_BYTE *)(a1 + 600) && v16 <= 0 )
{
v316 = -166;
v317 = -1;
(**((void (__fastcall ***)(__int64, __int16 *))v21 + 46))((__int64)v21 + 368, &v316);
}
}
else
{
v76 = CCMenuItemSpriteExtra::create((int)v21, 0, a1, (__int64)CommentCell::onViewProfile);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v7 + 464LL))(v7, v76);
v77 = *(_QWORD *)v76;
v78 = (float *)(a1 + 532);
v79 = *(float *)(a1 + 532) - v75;
v80 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 320LL))(v21) * 0.5;
v81 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 168LL))(v21);
v82 = *(_QWORD *)(a1 + 544);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v319, (float)(*(float *)&v81 * v80) + (float)(v25 + 10.0), v79);
cocos2d::CCNode::convertToWorldSpace(v82, &v320, v83);
cocos2d::CCNode::convertToNodeSpace(v321, &v318, v84);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v77 + 184))(v76, v85);
}
v90 = *(_BYTE *)(a1 + 602);
v91 = *(float *)(a1 + 528);
v92 = 10;
if ( v90 )
v92 = 8;
v93 = v91 - (float)v92;
v94 = *v78;
v95 = 12;
if ( v90 )
v95 = 8;
v96 = v94 - (float)v95;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v323, v91 * 0.5, v94 * 0.5);
v97 = *(_BYTE *)(a1 + 602);
v98 = "square02b_001.png";
if ( v97 )
v98 = "square02b_small.png";
v99 = 80;
if ( v97 )
v99 = 40;
*(_QWORD *)&v100 = COERCE_UNSIGNED_INT((float)v99);
v101 = -1;
if ( !v97 )
{
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v324, 0.0, 0.0, *(float *)&v100, *(float *)&v100);
v102 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)&Src, (const struct cocos2d::CCRect *)v324);
v103 = (void (__fastcall ***)(_QWORD, _QWORD))cocos2d::extension::CCScale9Sprite::create(v98, v102);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v320, v93, v96);
((void (__fastcall **)(_QWORD, void **))*v103)[39](v103, &v320);
(*(void (__fastcall **)(_QWORD, void (__fastcall ***)(_QWORD, _QWORD), __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v103,
0xFFFFFFFFLL);
((void (__fastcall **)(_QWORD, char *))*v103)[23](v103, v323);
v316 = 16514;
v317 = 33;
(*v103[40])(v103 + 40, &v316);
LOBYTE(v104) = 100;
v103[40][5](v103 + 40, v104);
}
sub_14003F4F0((__int64)v324, *(_QWORD *)(a1 + 592) + 320LL);
v105 = v324;
if ( v326 > 0xF )
v105 = (void **)v324[0];
*(_OWORD *)v327 = 0;
v106 = 0;
v328 = 0u;
v107 = -1;
do
++v107;
while ( *((_BYTE *)v105 + v107) );
sub_14003D230(v327, v105, v107);
sub_14003D310((__int64)v324);
GameToolbox::stripNonBreakingSpaces((unsigned __int64 *)v327);
v111 = 1.0;
v112 = 180;
v113 = 100;
if ( !*(_BYTE *)(a1 + 600) )
v112 = 100;
ensureEmotesAreLoaded(v109, v108, v110, v100);
if ( (int)EmoteSprite::effectiveLength(v327, dword_1408FE3A4, v114, v100) >= v112 )
{
v119 = v112;
}
else
{
ensureEmotesAreLoaded(v116, v115, v117, v100);
v119 = EmoteSprite::effectiveLength(v327, dword_1408FE3A4, v118, v100);
}
v120 = *(unsigned __int8 *)(a1 + 602);
if ( (_BYTE)v120 )
v121 = 0.60000002;
else
v121 = 0.69999999;
*(_QWORD *)&v122 = COERCE_UNSIGNED_INT((float)v112);
if ( (float)v119 > (float)(*(float *)&v122 * 0.5) )
v111 = (float)((float)((float)(v112 - v119) / *(float *)&v122) * (float)(1.0 - v121)) + v121;
v123 = 0x7FFFFFFFFFFFFFFFLL;
if ( !*(_BYTE *)(*(_QWORD *)(a1 + 592) + 400LL) )
{
LABEL_127:
v130 = 11;
if ( !*(_BYTE *)(a1 + 602) )
{
v163 = (float)((float)(v93 - 45.0) * 1.1) / v111;
v318 = v324;
v164 = *(_BYTE *)(*(_QWORD *)(a1 + 592) + 400LL);
v165 = v327;
if ( *((_QWORD *)&v328 + 1) > 0xFu )
v165 = (void **)v327[0];
*(_OWORD *)v324 = 0;
v325 = 0;
v326 = 0;
do
++v101;
while ( *((_BYTE *)v165 + v101) );
sub_14003D230(v324, v165, v101);
ensureEmotesAreLoaded(v167, v166, v168, v122);
v169 = dword_1408FE3A4;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v319, 0.0, 1.0);
v171 = TextArea::create((__int64)v324, "chatFont.fnt", 1.0, v163, v170, 1101004800, v164 == 0, v169);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 544) + 464LL))(*(_QWORD *)(a1 + 544), v171);
v172 = *(_QWORD *)v171;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, 0.0, 0.5);
(*(void (__fastcall **)(char *, __int64))(v172 + 288))(v171, v173);
v174 = *(_QWORD *)v171;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v318,
10.0,
(float)(*(float *)(a1 + 532) * 0.5) - (float)(*(_BYTE *)(a1 + 602) != 0 ? 3 : 0));
(*(void (__fastcall **)(char *, __int64))(v174 + 184))(v171, v175);
(*(void (__fastcall **)(char *))(*(_QWORD *)v171 + 160LL))(v171);
if ( v322 == 71 )
{
v316 = -206;
v317 = -1;
}
else
{
v176 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v318 = (void **)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v318);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v176 = *(_QWORD *)&qword_14090BFB0;
}
SavedLevel = (_DWORD *)GameLevelManager::getSavedLevel(v176, *(unsigned int *)(*(_QWORD *)(a1 + 592) + 396LL));
if ( !SavedLevel )
{
v178 = *(_QWORD *)(a1 + 592);
v179 = *(_DWORD *)(v178 + 396);
v180 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v318 = (void **)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v318);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v178 = *(_QWORD *)(a1 + 592);
v180 = *(_QWORD *)&qword_14090BFB0;
}
v181 = *(_QWORD *)(v180 + 944);
if ( !v181 )
goto LABEL_205;
v182 = *(_QWORD *)(v181 + 56);
if ( !v182 )
goto LABEL_205;
for ( i = *(_QWORD *)(v182 + 288); ; i = *(_QWORD *)(i + 288) )
{
SavedLevel = *(_DWORD **)(v182 + 264);
if ( SavedLevel[82] - SavedLevel[83] == v179 )
break;
v182 = i;
if ( !i )
{
v178 = *(_QWORD *)(a1 + 592);
goto LABEL_205;
}
}
v178 = *(_QWORD *)(a1 + 592);
if ( !SavedLevel )
goto LABEL_205;
}
v178 = *(_QWORD *)(a1 + 592);
if ( SavedLevel[162] - SavedLevel[163] == *(_DWORD *)(v178 + 388) )
{
v316 = -1;
v317 = 75;
}
else
{
LABEL_205:
if ( *(int *)(v178 + 448) <= 0 || *(_BYTE *)(a1 + 600) )
goto LABEL_209;
v316 = *(_WORD *)(v178 + 453);
v317 = *(_BYTE *)(v178 + 455);
}
}
TextArea::colorAllCharactersTo((__int64)v171, (__int64)&v316);
LABEL_209:
if ( !*(_BYTE *)(*(_QWORD *)(a1 + 592) + 456LL) )
goto LABEL_264;
v184 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v318 = (void **)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v318);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v184 = qword_14090BFD0;
}
if ( *(_QWORD *)(v184 + 560) || *(_QWORD *)(v184 + 568) )
{
LABEL_264:
v200 = v321;
goto LABEL_265;
}
*(_OWORD *)v324 = 0;
v325 = 0;
v326 = 0;
v324[0] = sub_14003D460(0x20u);
v325 = 16;
v326 = 31;
strcpy((char *)v324[0], "GJ_button_01.png");
v185 = *(_QWORD *)(a1 + 592);
v186 = *(_DWORD *)(v185 + 396);
if ( v186 >= 0 )
{
if ( *(_DWORD *)(v185 + 460) != 3 )
goto LABEL_228;
v196 = v326;
if ( v326 >= 0x10 )
{
v197 = v324[0];
v325 = 16;
memmove(v324[0], "GJ_button_05.png", 0x10u);
v197[16] = 0;
goto LABEL_228;
}
v198 = v326 >> 1;
if ( v326 <= 0x7FFFFFFFFFFFFFFFLL - (v326 >> 1) )
{
v123 = 31;
if ( v198 + v326 > 0x1F )
v123 = v198 + v326;
}
v190 = (char *)sub_14003D460(v123 + 1);
v325 = 16;
v326 = v123;
strcpy(v190, "GJ_button_05.png");
if ( v196 <= 0xF )
goto LABEL_227;
v191 = v324[0];
if ( v196 + 1 < 0x1000 )
goto LABEL_226;
v191 = *((void **)v324[0] - 1);
if ( (unsigned __int64)((char *)v324[0] - (char *)v191 - 8) <= 0x1F )
goto LABEL_226;
}
else
{
v186 = -v186;
v187 = v326;
if ( v326 >= 0x10 )
{
v188 = v324[0];
v325 = 16;
memmove(v324[0], "GJ_button_03.png", 0x10u);
v188[16] = 0;
LABEL_228:
v192 = *(_BYTE *)(a1 + 602);
v193 = GameToolbox::intToString(&Src, v186);
v194 = v324;
if ( v326 > 0xF )
v194 = (void **)v324[0];
if ( v193[3] > 0xFu )
v193 = (_QWORD *)*v193;
if ( v192 )
v113 = 120;
v195 = ButtonSprite::create_1(
(int)v193,
v113,
0,
1.0,
1,
(__int64)&qword_140704F78,
(__int64)v194,
1106247680);
sub_14003D310((__int64)&Src);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v195 + 160LL))(v195);
v199 = CCMenuItemSpriteExtra::create((int)v195, 0, a1, (__int64)CommentCell::onGoToLevel);
*((_DWORD *)v199 + 93) = 1067030938;
v200 = v321;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v321 + 464LL))(v321, v199);
if ( *(_BYTE *)(a1 + 600) )
goto LABEL_254;
v201 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v318 = (void **)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v318);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v201 = qword_14090BFD0;
}
if ( *(_DWORD *)(v201 + 1064) - *(_DWORD *)(v201 + 1068) != 2 )
{
LABEL_254:
v202 = *(_BYTE *)(a1 + 602);
v205 = 135;
if ( v202 )
v205 = 111;
}
else
{
v202 = *(_BYTE *)(a1 + 602);
v203 = 135;
if ( v202 )
v203 = 111;
v204 = 25;
if ( v202 )
v204 = 20;
v205 = v204 + v203;
}
if ( v202 )
v206 = 11.5;
else
v206 = 19.5;
v207 = *(_QWORD *)v199;
v208 = *(_QWORD *)(a1 + 544);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v318,
*(float *)(a1 + 528) - (float)v205,
*(float *)(a1 + 532) - v206);
cocos2d::CCNode::convertToWorldSpace(v208, &v319, v209);
cocos2d::CCNode::convertToNodeSpace(v200, &v320, v210);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v207 + 184))(v199, v211);
if ( v326 > 0xF )
{
v212 = v324[0];
if ( v326 + 1 >= 0x1000 )
{
v212 = *((void **)v324[0] - 1);
if ( (unsigned __int64)((char *)v324[0] - (char *)v212 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v212);
}
LABEL_265:
v213 = *(_QWORD *)(a1 + 592);
if ( *(_BYTE *)(v213 + 400) )
{
v318 = (void **)operator new(0x2C8u);
v214 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v318);
if ( v214 )
{
if ( ButtonSprite::init_1(
(__int64)v214,
(__int64)"Show",
40,
0,
1058642330,
1,
"goldFont.fnt",
(__int64)"GJ_button_04.png",
1106247680) )
{
cocos2d::CCObject::autorelease(v214);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v214 + 8LL))(v214, 1);
v214 = nullptr;
}
}
if ( *(_BYTE *)(a1 + 602) )
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v214 + 160LL))(v214);
v215 = CCMenuItemSpriteExtra::create((int)v214, 0, a1, (__int64)CommentCell::onUnhide);
*((_DWORD *)v215 + 93) = 1067030938;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v200 + 464LL))(v200, v215);
v216 = *(_QWORD *)v215;
v217 = *(float *)(a1 + 532) * 0.5;
v218 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v214 + 320LL))(v214);
v219 = *(_QWORD *)(a1 + 544);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v318,
(float)(*(float *)(a1 + 528) - (float)(*v218 * 0.5)) - 9.0,
v217);
cocos2d::CCNode::convertToWorldSpace(v219, &v319, v220);
cocos2d::CCNode::convertToNodeSpace(v200, &v321, v221);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v216 + 184))(v215, v222);
LABEL_360:
sub_14003D310((__int64)v327);
return;
}
v223 = 14;
if ( *(_BYTE *)(v213 + 457) )
{
LABEL_354:
sub_14003F4F0((__int64)v324, *(_QWORD *)(a1 + 592) + 408LL);
v306 = v325 != 0;
sub_14003D310((__int64)v324);
if ( v306 )
{
sub_14003F4F0((__int64)&Src, *(_QWORD *)(a1 + 592) + 408LL);
p_Src = (const char *)&Src;
if ( *((_QWORD *)&v330 + 1) > 0xFu )
p_Src = (const char *)Src;
v308 = cocos2d::CCString::createWithFormat("%s ago", p_Src);
v309 = cocos2d::CCString::getCString(v308);
v310 = cocos2d::CCLabelBMFont::create(v309, "chatFont.fnt");
sub_14003D310((__int64)&Src);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 544)
+ 456LL))(
*(_QWORD *)(a1 + 544),
v310,
1);
v311 = *(_QWORD *)v310;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v324, 1.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v311 + 288))(v310, v312);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v310 + 160LL))(v310);
(**((void (__fastcall ***)(__int64, __int16 *))v310 + 46))((__int64)v310 + 368, &word_140702F60);
LOBYTE(v313) = -116;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v310 + 46) + 40LL))((__int64)v310 + 368, v313);
v314 = *(_QWORD *)v310;
if ( *(_BYTE *)(a1 + 602) )
{
v223 = 7;
v130 = 8;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v324, *(float *)(a1 + 528) - (float)v130, (float)v223);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v314 + 184))(v310, v315);
}
goto LABEL_360;
}
v224 = *(_BYTE *)(a1 + 602);
v225 = 20;
v226 = 20;
if ( v224 )
v226 = 14;
v227 = *(float *)(a1 + 532) - (float)v226;
if ( v224 )
v228 = 0.30000001;
else
v228 = 0.40000001;
v229 = (float)(13 - (v224 != 0));
v230 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likesIcon_001.png");
*(_QWORD *)(a1 + 576) = v230;
v231 = *(_QWORD *)v230;
v232 = *(_BYTE *)(a1 + 602);
v233 = 35;
if ( v232 )
v233 = 32;
v234 = *(float *)(a1 + 528) - (float)v233;
v235 = 4;
if ( v232 )
v235 = 0;
v236 = v234 - (float)v235;
if ( v232 )
v225 = 16;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, v236 - (float)v225, v227);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v231 + 184))(v230, v237);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 160LL))(*(_QWORD *)(a1 + 576));
v238 = *(_DWORD *)(*(_QWORD *)(a1 + 592) + 392LL);
v239 = **(_QWORD **)(a1 + 576);
v240 = *(_QWORD *)(a1 + 576);
v241 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v242 = "GJ_likesIcon_001.png";
if ( v238 < 0 )
v242 = "GJ_dislikesIcon_001.png";
v243 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v241, v242);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSpriteFrame *))(v239 + 1008))(v240, v243);
v244 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)v238);
v245 = cocos2d::CCString::getCString(v244);
v246 = cocos2d::CCLabelBMFont::create(v245, (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 584) = v246;
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 544) + 464LL))(
*(_QWORD *)(a1 + 544),
v246);
v247 = **(_QWORD **)(a1 + 584);
v248 = *(_QWORD *)(a1 + 584);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, 0.5, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v247 + 288))(v248, v249);
v250 = *(_BYTE *)(a1 + 602);
if ( v250 )
v251 = 1.0;
else
v251 = 0.5;
v252 = v251 + 0.0;
v253 = 14;
if ( v250 )
v253 = 8;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, (float)v253 + v229, v252);
v255 = v254;
v256 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 200LL))(*(_QWORD *)(a1 + 576));
cocos2d::CCPoint::operator+(v256, &v320, v255);
(*(void (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 584) + 184LL))(*(_QWORD *)(a1 + 584), &v320);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 584) + 160LL))(*(_QWORD *)(a1 + 584));
v257 = 28;
if ( *(_BYTE *)(a1 + 602) )
v257 = 15;
cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 584), (float)v257, v228, 0.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&Src, 0.0, 2.0);
v259 = v258;
v260 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 200LL))(*(_QWORD *)(a1 + 576));
cocos2d::CCPoint::operator+(v260, &v320, v259);
(*(void (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 576) + 184LL))(*(_QWORD *)(a1 + 576), &v320);
v261 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 200LL))(*(_QWORD *)(a1 + 576));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v319, v261);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 576) + 184LL))(
*(_QWORD *)(a1 + 576),
&unk_14090A3E8);
v262 = CCMenuItemSpriteExtra::create(*(_QWORD *)(a1 + 576), 0, a1, (__int64)CommentCell::onLike);
*((_DWORD *)v262 + 93) = 0x40000000;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v200 + 464LL))(v200, v262);
v263 = *(_QWORD *)v262;
cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 544), v324, &v319);
cocos2d::CCNode::convertToNodeSpace(v200, &Src, v264);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v263 + 184))(v262, v265);
v266 = *(_QWORD *)(a1 + 592);
v267 = *(_DWORD *)(v266 + 460);
if ( v267 != 4 )
{
if ( *(int *)(v266 + 396) <= 0 || v267 == 3 )
{
if ( v322 != 71 && *(_BYTE *)(v266 + 458) )
{
v271 = (_DWORD *)qword_14090BFD0;
v273 = 1;
goto LABEL_311;
}
}
else
{
v268 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v318 = (void **)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v318);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v268 = *(_QWORD *)&qword_14090BFB0;
}
v269 = GameLevelManager::getSavedLevel(v268, *(unsigned int *)(*(_QWORD *)(a1 + 592) + 396LL));
v270 = v269;
if ( v322 != 71 && v269 )
{
v271 = (_DWORD *)qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v318 = (void **)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v318);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v271 = (_DWORD *)qword_14090BFD0;
}
v272 = v271[173] - v271[174];
if ( v272 == *(_DWORD *)(v270 + 648) - *(_DWORD *)(v270 + 652) && v272 > 0 )
{
v273 = 1;
LABEL_311:
v274 = *(_DWORD **)(a1 + 592);
v275 = v274[115];
v276 = v275 == 4 || v275 == 5;
if ( !v271 )
{
v318 = (void **)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v318);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v274 = *(_DWORD **)(a1 + 592);
v271 = (_DWORD *)qword_14090BFD0;
}
v277 = v271[173] - v271[174] > 0 && v271[173] - v271[174] == v274[97];
v278 = -24;
if ( v276 )
{
if ( !v277 && (v271[266] - v271[267] != 2 || v274[112] == 2) )
{
v279 = nullptr;
v280 = v321;
goto LABEL_338;
}
}
else
{
if ( *(_BYTE *)(a1 + 600) )
{
v281 = GJAccountManager::sharedState(v271);
v274 = *(_DWORD **)(a1 + 592);
if ( v274[101] == *(_DWORD *)(v281 + 360) - *(_DWORD *)(v281 + 364) )
goto LABEL_335;
v271 = (_DWORD *)qword_14090BFD0;
}
if ( !v277 && !v273 )
{
if ( !v271 )
{
v318 = (void **)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v318);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v274 = *(_DWORD **)(a1 + 592);
v271 = (_DWORD *)qword_14090BFD0;
}
if ( v271[266] - v271[267] != 2 )
{
v279 = nullptr;
v280 = v321;
LABEL_338:
*(_QWORD *)(a1 + 608) = 0;
if ( !*(_BYTE *)(a1 + 600) && v274[115] != 5 )
{
if ( !v271 )
{
v320 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v320);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v271 = (_DWORD *)qword_14090BFD0;
}
if ( v271[266] - v271[267] == 2 )
{
v287 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png");
v288 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v287 + 160LL))(v287);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v288 + 160LL))(v288);
v289 = CCMenuItemToggler::create(
(int)v288,
(int)v287,
a1,
(__int64)CommentCell::onBulkSelectToggle);
*(_QWORD *)(a1 + 608) = v289;
CCMenuItemToggler::toggle(
(__int64)v289,
*(unsigned __int8 *)(*(_QWORD *)(a1 + 592) + 464LL));
v290 = *(_QWORD *)(a1 + 608);
*(_DWORD *)(*(_QWORD *)(v290 + 376) + 372LL) = 1067869798;
*(_DWORD *)(*(_QWORD *)(v290 + 384) + 372LL) = 1067869798;
CCMenuItemToggler::toggle(v290, *(unsigned __int8 *)(v290 + 392));
*(_BYTE *)(*(_QWORD *)(a1 + 608) + 393LL) = 1;
v280 = v321;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v321 + 464LL))(
v321,
*(_QWORD *)(a1 + 608));
if ( v279 )
{
v291 = *(_QWORD *)v279;
v292 = v279;
}
else
{
v291 = *(_QWORD *)v262;
v292 = v262;
}
v293 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(v291 + 200))(v292);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v322, v293);
if ( *(_BYTE *)(a1 + 602) )
v278 = -21;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v324, (float)v278, 0.0);
cocos2d::CCPoint::operator+(&v322, &v321, v294);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 608) + 184LL))(
*(_QWORD *)(a1 + 608),
&v321);
}
}
v295 = cocos2d::CCLabelBMFont::create("...", (const char *)&qword_140704F78);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v295 + 160LL))(v295);
LOBYTE(v296) = 120;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v295 + 46) + 40LL))(
(__int64)v295 + 368,
v296);
v297 = CCMenuItemSpriteExtra::create((int)v295, 0, a1, (__int64)CommentCell::onMoreOptions);
*((_DWORD *)v297 + 93) = 1070386381;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v280 + 464LL))(v280, v297);
v298 = *(_QWORD *)v297;
v299 = *(_BYTE *)(a1 + 602);
v300 = *(_QWORD *)(a1 + 544);
v301 = 9;
if ( v299 )
v301 = 7;
v302 = 12;
if ( v299 )
v302 = 10;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v324,
*(float *)(a1 + 528) - (float)v302,
*(float *)(a1 + 532) - (float)v301);
cocos2d::CCNode::convertToWorldSpace(v300, &Src, v303);
cocos2d::CCNode::convertToNodeSpace(v280, &v318, v304);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v298 + 184))(v297, v305);
v130 = 11;
goto LABEL_354;
}
}
}
LABEL_335:
v282 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteIcon_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v282 + 160LL))(v282);
v279 = CCMenuItemSpriteExtra::create((int)v282, 0, a1, (__int64)CommentCell::onConfirmDelete);
*((_DWORD *)v279 + 93) = 0x40000000;
v280 = v321;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v321 + 464LL))(v321, v279);
v283 = -24;
if ( *(_BYTE *)(a1 + 602) )
v283 = -20;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, (float)v283, -1.0);
v285 = v284;
v286 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v262 + 200LL))(v262);
cocos2d::CCPoint::operator+(v286, &v322, v285);
(*(void (__fastcall **)(cocos2d::CCObject *, int *))(*(_QWORD *)v279 + 184LL))(v279, &v322);
v274 = *(_DWORD **)(a1 + 592);
v271 = (_DWORD *)qword_14090BFD0;
goto LABEL_338;
}
LABEL_310:
v273 = 0;
goto LABEL_311;
}
}
}
v271 = (_DWORD *)qword_14090BFD0;
goto LABEL_310;
}
v189 = v326 >> 1;
if ( v326 <= 0x7FFFFFFFFFFFFFFFLL - (v326 >> 1) )
{
v123 = 31;
if ( v326 + v189 > 0x1F )
v123 = v326 + v189;
}
v190 = (char *)sub_14003D460(v123 + 1);
v325 = 16;
v326 = v123;
strcpy(v190, "GJ_button_03.png");
if ( v187 <= 0xF )
{
LABEL_227:
v324[0] = v190;
goto LABEL_228;
}
v191 = v324[0];
if ( v187 + 1 < 0x1000
|| (v191 = *((void **)v324[0] - 1), (unsigned __int64)((char *)v324[0] - (char *)v191 - 8) <= 0x1F) )
{
LABEL_226:
j_j_free(v191);
goto LABEL_227;
}
}
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
*(_OWORD *)v324 = 0;
v325 = 0;
ensureEmotesAreLoaded(v120, v115, v117, v122);
EmoteSprite::parseTokens(v327, (__int64)v324, dword_1408FE3A4, v122);
if ( v324[0] != v324[1] )
{
Src = 0;
*(_QWORD *)&v330 = 0;
*((_QWORD *)&v330 + 1) = 15;
LOBYTE(Src) = 0;
LODWORD(v320) = 11;
sub_140059AB0((void **)&Src, v328);
v132 = 0;
v133 = 0;
v134 = (char *)v324[0];
v135 = (char *)v324[1] - (char *)v324[0];
v136 = ((char *)v324[1] - (char *)v324[0]) / 24;
if ( v136 )
{
do
{
if ( (unsigned __int64)v328 < v132 )
goto LABEL_362;
v137 = *(_QWORD *)&v134[v106] - v132;
if ( (unsigned __int64)v328 - v132 < v137 )
v137 = v328 - v132;
v138 = v327;
if ( *((_QWORD *)&v328 + 1) > 0xFu )
v138 = (void **)v327[0];
sub_140044D80(&Src, (char *)v138 + v132, v137);
v132 = *(_QWORD *)((char *)v324[0] + v106) + *(_QWORD *)((char *)v324[0] + v106 + 8);
*(_QWORD *)((char *)v324[0] + v106) = v330;
*(_QWORD *)((char *)v324[0] + v106 + 8) = 1;
v139 = sub_14007FD40(*(_QWORD *)((char *)v324[0] + v106 + 16), 0.0);
v140 = 127;
if ( v139 )
v140 = 30;
sub_14003DBD0((void **)&Src, v140);
++v133;
v106 += 24;
v134 = (char *)v324[0];
v135 = (char *)v324[1] - (char *)v324[0];
v136 = ((char *)v324[1] - (char *)v324[0]) / 24;
}
while ( v133 < v136 );
v141 = v328;
if ( (unsigned __int64)v328 < v132 )
LABEL_362:
sub_14003F4D0(v135, v136, v134, v131);
}
else
{
v141 = v328;
}
v142 = v141 - v132;
if ( v142 != -1 )
v101 = v142;
v143 = v327;
if ( *((_QWORD *)&v328 + 1) > 0xFu )
v143 = (void **)v327[0];
sub_140044D80(&Src, (char *)v143 + v132, v101);
if ( *((_QWORD *)&v328 + 1) > 0xFu )
{
v144 = v327[0];
if ( (unsigned __int64)(*((_QWORD *)&v328 + 1) + 1LL) >= 0x1000 )
{
v144 = *((void **)v327[0] - 1);
if ( (unsigned __int64)((char *)v327[0] - (char *)v144 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v144);
}
*(_OWORD *)v327 = Src;
v328 = v330;
v113 = 100;
}
v148 = v327;
if ( *((_QWORD *)&v328 + 1) > 0xFu )
v148 = (void **)v327[0];
v149 = cocos2d::CCLabelBMFont::create((const char *)v148, "chatFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 544) + 464LL))(
*(_QWORD *)(a1 + 544),
v149);
v150 = *(_QWORD *)v149;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v150 + 288))(v149, v151);
v152 = *(_QWORD *)v149;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v318, 10.0, (float)(*(float *)(a1 + 532) * 0.5) - 9.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v152 + 184))(v149, v153);
cocos2d::CCLabelBMFont::limitLabelWidth(v149, 270.0, 0.69999999, 0.0);
if ( v322 == 71 )
{
v316 = -206;
v317 = -1;
}
else
{
v154 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v318 = (void **)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v318);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v154 = *(_QWORD *)&qword_14090BFB0;
}
v155 = (_DWORD *)GameLevelManager::getSavedLevel(v154, *(unsigned int *)(*(_QWORD *)(a1 + 592) + 396LL));
if ( !v155 )
{
v156 = *(_DWORD *)(*(_QWORD *)(a1 + 592) + 396LL);
v157 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v318 = (void **)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v318);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v157 = *(_QWORD *)&qword_14090BFB0;
}
v158 = *(_QWORD *)(v157 + 944);
if ( !v158 )
goto LABEL_178;
v159 = *(_QWORD *)(v158 + 56);
if ( !v159 )
goto LABEL_178;
for ( j = *(_QWORD *)(v159 + 288); ; j = *(_QWORD *)(j + 288) )
{
v155 = *(_DWORD **)(v159 + 264);
if ( v155[82] - v155[83] == v156 )
break;
v159 = j;
if ( !j )
goto LABEL_178;
}
if ( !v155 )
goto LABEL_178;
}
if ( v155[162] - v155[163] == *(_DWORD *)(*(_QWORD *)(a1 + 592) + 388LL) )
{
v316 = -1;
v317 = 75;
}
else
{
LABEL_178:
v161 = *(_QWORD *)(a1 + 592);
if ( *(int *)(v161 + 448) <= 0 || *(_BYTE *)(a1 + 600) )
{
LABEL_182:
EmoteSprite::attachToLabel(v149, *(__int64 **)(a1 + 544), (__int64 *)v324, 0.0);
v162 = v324[0];
if ( v324[0] )
{
if ( (unsigned __int64)(24 * ((signed __int64)(v325 - (unsigned __int64)v324[0]) / 24)) >= 0x1000 )
{
v162 = *((void **)v324[0] - 1);
if ( (unsigned __int64)((char *)v324[0] - (char *)v162 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v162);
*(_OWORD *)v324 = 0;
v325 = 0;
}
goto LABEL_209;
}
v316 = *(_WORD *)(v161 + 453);
v317 = *(_BYTE *)(v161 + 455);
}
}
(**((void (__fastcall ***)(__int64, __int16 *))v149 + 46))((__int64)v149 + 368, &v316);
goto LABEL_182;
}
v124 = *((_QWORD *)&v328 + 1);
if ( (_BYTE)v120 )
{
if ( *((_QWORD *)&v328 + 1) >= 0x17u )
{
v145 = v327[0];
*(_QWORD *)&v328 = 23;
memmove(v327[0], "Comment flagged as spam", 0x17u);
v145[23] = 0;
goto LABEL_126;
}
v146 = *((_QWORD *)&v328 + 1) >> 1;
if ( *((_QWORD *)&v328 + 1) <= (unsigned __int64)(0x7FFFFFFFFFFFFFFFLL - (*((_QWORD *)&v328 + 1) >> 1)) )
{
v147 = 31;
if ( (unsigned __int64)(v146 + *((_QWORD *)&v328 + 1)) > 0x1F )
v147 = v146 + *((_QWORD *)&v328 + 1);
}
else
{
v147 = 0x7FFFFFFFFFFFFFFFLL;
}
v128 = sub_14003D460(v147 + 1);
*(_QWORD *)&v328 = 23;
*((_QWORD *)&v328 + 1) = v147;
qmemcpy(v128, "Comment flagged as spa", 22);
v120 = *(unsigned __int16 *)"pam";
v128[11] = (unsigned __int8)aCommentFlagged[22];
if ( v124 <= 0xF )
goto LABEL_125;
v129 = v327[0];
if ( v124 + 1 < 0x1000 )
goto LABEL_124;
v129 = *((void **)v327[0] - 1);
if ( (unsigned __int64)((char *)v327[0] - (char *)v129 - 8) <= 0x1F )
goto LABEL_124;
}
else
{
if ( *((_QWORD *)&v328 + 1) >= 0x1Fu )
{
v125 = v327[0];
*(_QWORD *)&v328 = 31;
memmove(v327[0], "Comment flagged as spam", 0x1Fu);
v125[31] = 0;
LABEL_126:
v106 = 0;
goto LABEL_127;
}
v126 = *((_QWORD *)&v328 + 1) >> 1;
if ( *((_QWORD *)&v328 + 1) <= (unsigned __int64)(0x7FFFFFFFFFFFFFFFLL - (*((_QWORD *)&v328 + 1) >> 1)) )
{
v127 = 31;
if ( (unsigned __int64)(v126 + *((_QWORD *)&v328 + 1)) > 0x1F )
v127 = v126 + *((_QWORD *)&v328 + 1);
}
else
{
v127 = 0x7FFFFFFFFFFFFFFFLL;
}
v128 = sub_14003D460(v127 + 1);
*(_QWORD *)&v328 = 31;
*((_QWORD *)&v328 + 1) = v127;
qmemcpy(v128, "Comment flagged as spam";
v128[15] = (unsigned __int8)aCyCommentFlagg[30];
if ( v124 <= 0xF )
{
LABEL_125:
v327[0] = v128;
goto LABEL_126;
}
v129 = v327[0];
if ( v124 + 1 < 0x1000
|| (v129 = *((void **)v327[0] - 1), (unsigned __int64)((char *)v327[0] - (char *)v129 - 8) <= 0x1F) )
{
LABEL_124:
j_j_free(v129);
goto LABEL_125;
}
}
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
}