//
// GJNotificationCell::loadFromNotification from 0x14015b0d0 to 0x14015c19c (4300 bytes)
//
// 2 xrefs:
// > CustomListView::loadCell @ 0x140146020
// > ??> @ 0x140917b1c
//
// 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:23 +0000
//
// Hidden C++ exception states: #wind=14
void __fastcall GJNotificationCell::loadFromNotification(__int64 a1, cocos2d::CCObject *a2, __int64 a3, double a4)
{
cocos2d::CCObject *v4; // rbx
__int64 v6; // rdx
cocos2d::CCObject *v7; // rcx
float v8; // xmm6_4
float v9; // xmm15_4
float v10; // xmm13_4
__int64 v11; // r8
bool v12; // r13
bool v13; // r12
int v14; // eax
float v15; // xmm0_4
__int64 v16; // xmm7_8
__int64 v17; // rcx
void **v18; // r15
size_t v19; // rdi
__int64 v20; // rsi
size_t v21; // rbx
__int64 v22; // rdi
__int64 v23; // rdx
__int64 v24; // rcx
__int64 v25; // r8
int v26; // ebx
double v27; // xmm3_8
const struct cocos2d::CCPoint *v28; // rax
__int64 *v29; // rax
char v30; // r12
void **v31; // rdx
__int64 v32; // rdx
__int64 v33; // rcx
__int64 v34; // r8
void **v35; // rdi
size_t v36; // rbx
int v37; // ebx
const struct cocos2d::CCPoint *v38; // rax
__int64 *v39; // rax
int v40; // r15d
double v41; // xmm8_8
float v42; // xmm6_4
__int64 v43; // rdi
__int64 v44; // rdx
__int64 v45; // rcx
__int64 v46; // r8
int v47; // ebx
const struct cocos2d::CCPoint *v48; // rax
char *v49; // rsi
__int64 v50; // rbx
__int64 v51; // rax
__int64 v52; // rbx
__int64 v53; // rax
cocos2d::CCArray *v54; // rdi
unsigned int i; // ebx
__int64 v56; // rdx
struct cocos2d::CCObject *v57; // rax
__int64 v58; // rcx
__int64 v59; // rdx
size_t v60; // rbx
const char *v61; // rax
size_t v62; // r8
__int64 v63; // rdx
__int64 v64; // r8
__int64 v65; // rax
char v66; // di
void *v67; // rcx
__int64 v68; // rax
__int64 v69; // rdx
__int64 v70; // rcx
__int64 v71; // r8
__int64 *v72; // rdi
const char *v73; // rax
__int64 v74; // rdx
__int64 v75; // r8
__int64 v76; // rax
void *v77; // rcx
__int64 v78; // rbx
__int64 v79; // rax
const char *v80; // rcx
cocos2d::CCLabelBMFont *v81; // rdi
__int64 v82; // rbx
__int64 v83; // rax
__int64 v84; // rbx
__int64 v85; // rax
float v86; // xmm6_4
double v87; // xmm0_8
float v88; // xmm7_4
const char *v89; // rdx
cocos2d::CCString *v90; // rax
const char *CString; // rax
struct cocos2d::CCLabelBMFont *v92; // rdi
__int64 v93; // rbx
__int64 v94; // rax
__int64 v95; // rdx
__int64 v96; // rbx
__int64 v97; // rax
__int64 v98; // rdx
__int64 v99; // r8
struct cocos2d::CCSprite *v100; // rdi
__int64 v101; // rbx
__int64 v102; // rax
__int64 v103; // rax
int v104; // eax
__int64 v105; // rcx
__int64 *v106; // rsi
__int64 v107; // r8
void **v108; // rbx
__int64 v109; // rdi
__int64 v110; // rbx
__int64 v111; // rax
__int64 v112; // rbx
float v113; // xmm6_4
float *v114; // rax
__int64 v115; // rax
__int64 v116; // r15
__int64 v117; // rsi
__int64 v118; // rbx
__int64 v119; // rdi
__int64 v120; // rax
__int64 v121; // rax
__int64 v122; // rax
__int64 v123; // rcx
__int64 v124; // rcx
_BYTE *v125; // rbx
__int64 v126; // rdi
__int64 v127; // rcx
__int64 v128; // r8
unsigned __int8 isSpecialChestUnlocked; // r15
__int64 v130; // rax
__int64 v131; // rdx
unsigned int *v132; // rdi
__int64 v133; // rax
__int64 *v134; // rdi
__int64 *j; // rsi
__int64 v136; // rbx
__int64 *v137; // rbx
cocos2d::CCObject *v138; // rsi
cocos2d::CCObject *v139; // rbx
__int64 (__fastcall *v140)(); // r9
cocos2d::CCObject *v141; // rsi
__int64 v142; // rdi
__int64 v143; // rbx
__int64 v144; // rax
__int64 v145; // rax
__int64 v146; // rax
__int64 v147; // rdi
__int64 v148; // rbx
__int64 v149; // rax
__int64 v150; // rax
__int64 v151; // rax
__int64 v152[2]; // [rsp+58h] [rbp-B0h] BYREF
__int16 v153; // [rsp+68h] [rbp-A0h] BYREF
char v154; // [rsp+6Ah] [rbp-9Eh]
__int64 v155; // [rsp+78h] [rbp-90h] BYREF
void **v156; // [rsp+80h] [rbp-88h] BYREF
void *v157; // [rsp+88h] [rbp-80h] BYREF
__int64 v158; // [rsp+90h] [rbp-78h]
char v159[16]; // [rsp+98h] [rbp-70h] BYREF
__int64 v160; // [rsp+A8h] [rbp-60h]
__int64 v161; // [rsp+B0h] [rbp-58h]
_OWORD *v162; // [rsp+B8h] [rbp-50h] BYREF
void *Block[2]; // [rsp+C0h] [rbp-48h] BYREF
size_t v164; // [rsp+D0h] [rbp-38h]
unsigned __int64 v165; // [rsp+D8h] [rbp-30h]
void *v166[2]; // [rsp+E0h] [rbp-28h] BYREF
size_t v167; // [rsp+F0h] [rbp-18h]
unsigned __int64 v168; // [rsp+F8h] [rbp-10h]
void *Src[2]; // [rsp+100h] [rbp-8h] BYREF
size_t Size; // [rsp+110h] [rbp+8h]
unsigned __int64 v171; // [rsp+118h] [rbp+10h]
_OWORD v172[2]; // [rsp+120h] [rbp+18h] BYREF
_BYTE v173[32]; // [rsp+140h] [rbp+38h] BYREF
v4 = a2;
LODWORD(v155) = 0;
LOBYTE(a2) = -1;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)(*(_QWORD *)(a1 + 536) + 408LL) + 40LL))(
*(_QWORD *)(a1 + 536) + 408LL,
a2);
cocos2d::CCObject::retain(v4);
v7 = *(cocos2d::CCObject **)(a1 + 568);
if ( v7 )
cocos2d::CCObject::release(v7);
*(_QWORD *)(a1 + 568) = v4;
*(_QWORD *)(a1 + 576) = 0;
LOBYTE(v6) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 544) + 576LL))(*(_QWORD *)(a1 + 544), v6);
v158 = cocos2d::CCMenu::create();
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(*(_QWORD *)(a1 + 544), v158, 2);
v8 = *(float *)(a1 + 532) - 15.0;
v9 = v8 + 3.0;
v10 = v8 - 4.0;
v11 = *(_QWORD *)(a1 + 568);
v12 = *(int *)(v11 + 200) > 0 && *(_DWORD *)(v11 + 196);
v13 = *(int *)(v11 + 248) > 0 || v12;
v14 = 14;
if ( v13 )
v14 = 70;
v15 = (float)v14;
if ( *(int *)(v11 + 256) > 0 )
v15 = v15 + 32.0;
v16 = *(unsigned int *)(a1 + 528);
*(float *)&v16 = (float)(*(float *)&v16 - 36.0) - v15;
GameToolbox::singleLineSnippet((unsigned __int64 *)Src, v11 + 128, *(_QWORD *)(v11 + 144));
*(_OWORD *)v166 = 0;
v167 = 0;
v168 = 0;
v18 = Src;
if ( v171 > 0xF )
v18 = (void **)Src[0];
v19 = Size;
v20 = 0x7FFFFFFFFFFFFFFFLL;
if ( Size > 0x7FFFFFFFFFFFFFFFLL )
sub_140009D90(v17);
if ( Size > 0xF )
{
v21 = Size | 0xF;
if ( (Size | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
if ( v21 < 0x16 )
v21 = 22;
}
else
{
v21 = 0x7FFFFFFFFFFFFFFFLL;
}
v166[0] = sub_14003D460(v21 + 1);
v167 = v19;
v168 = v21;
memcpy(v166[0], v18, v19 + 1);
}
else
{
v167 = Size;
v168 = 15;
*(_OWORD *)v166 = *(_OWORD *)v18;
}
v162 = v172;
v22 = sub_14003F4F0((__int64)v172, (__int64)v166);
ensureEmotesAreLoaded(v24, v23, v25, a4);
v26 = dword_1408FE3A4;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v156, 0.0, 1.0);
HIDWORD(v27) = HIDWORD(v16);
*(float *)&v27 = *(float *)&v16 / 0.54000002;
v29 = (__int64 *)TextArea::create(v22, "chatFont.fnt", 1.0, *(float *)&v16 / 0.54000002, v28, 1101004800, 0, v26);
if ( !sub_14015ADD0(v29, v166) || v13 )
{
v30 = 0;
}
else
{
v30 = 1;
v16 = *(unsigned int *)(a1 + 528);
*(float *)&v16 = (float)(*(float *)&v16 - 36.0) - 70.0;
v31 = Src;
if ( v171 > 0xF )
v31 = (void **)Src[0];
sub_1400405A0(v166, v31, Size);
v156 = Block;
*(_OWORD *)Block = 0;
v164 = 0;
v165 = 0;
v35 = v166;
if ( v168 > 0xF )
v35 = (void **)v166[0];
v36 = v167;
if ( v167 > 0x7FFFFFFFFFFFFFFFLL )
sub_140009D90(v33);
if ( v167 > 0xF )
{
if ( (v167 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
v20 = v167 | 0xF;
if ( (v167 | 0xF) < 0x16 )
v20 = 22;
}
Block[0] = sub_14003D460(v20 + 1);
v164 = v36;
v165 = v20;
memcpy(Block[0], v35, v36 + 1);
}
else
{
v164 = v167;
v165 = 15;
*(_OWORD *)Block = *(_OWORD *)v35;
}
ensureEmotesAreLoaded(v33, v32, v34, v27);
v37 = dword_1408FE3A4;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v162, 0.0, 1.0);
HIDWORD(v27) = HIDWORD(v16);
*(float *)&v27 = *(float *)&v16 / 0.54000002;
v39 = (__int64 *)TextArea::create(
(__int64)Block,
"chatFont.fnt",
1.0,
*(float *)&v16 / 0.54000002,
v38,
1101004800,
0,
v37);
sub_14015ADD0(v39, v166);
}
v40 = 0;
HIDWORD(v41) = HIDWORD(v16);
*(float *)&v41 = *(float *)&v16 / 0.54000002;
v42 = v8 - 10.0;
do
{
v156 = (void **)v172;
v43 = sub_14003F4F0((__int64)v172, (__int64)v166);
ensureEmotesAreLoaded(v45, v44, v46, v27);
v47 = dword_1408FE3A4;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v162, 0.0, 1.0);
v27 = v41;
v49 = TextArea::create(v43, "chatFont.fnt", 1.0, *(float *)&v41, v48, 1101004800, 0, v47);
v50 = *(_QWORD *)v49;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v157, 0.0, 1.0);
(*(void (__fastcall **)(char *, __int64))(v50 + 288))(v49, v51);
(*(void (__fastcall **)(char *))(*(_QWORD *)v49 + 160LL))(v49);
v52 = *(_QWORD *)v49;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v152,
(float)((float)v40 * 0.5) + 36.0,
v42 - (float)((float)v40 * 0.5));
(*(void (__fastcall **)(char *, __int64))(v52 + 184))(v49, v53);
if ( v40 == 1 )
{
v153 = 0;
v154 = 0;
v54 = *(cocos2d::CCArray **)(*((_QWORD *)v49 + 77) + 648LL);
for ( i = 0; i < cocos2d::CCArray::count(v54); ++i )
{
v57 = cocos2d::CCArray::objectAtIndex(v54, i);
(**((void (__fastcall ***)(__int64, __int16 *))v57 + 46))((__int64)v57 + 368, &v153);
}
LOBYTE(v56) = 100;
(*(void (__fastcall **)(char *, __int64))(*((_QWORD *)v49 + 40) + 40LL))(v49 + 320, v56);
v58 = *(_QWORD *)(*((_QWORD *)v49 + 77) + 624LL);
if ( v58 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v58 + 336LL))(v58, 0);
}
(*(void (__fastcall **)(_QWORD, char *, _QWORD))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v49,
(unsigned int)(1 - v40++));
}
while ( v40 < 2 );
v59 = *(_QWORD *)(a1 + 568);
v60 = -1;
if ( *(_QWORD *)(v59 + 80) )
{
v65 = sub_14003F4F0((__int64)v173, v59 + 64);
v66 = 2;
}
else
{
v61 = sub_14015AD20(*(_DWORD *)(v59 + 60));
*(_OWORD *)Block = 0;
v164 = 0;
v165 = 0;
v62 = -1;
do
++v62;
while ( v61[v62] );
sub_14003D230(Block, v61, v62);
v65 = (__int64)Block;
v66 = 1;
}
v172[0] = *(_OWORD *)v65;
v172[1] = *(_OWORD *)(v65 + 16);
*(_QWORD *)(v65 + 16) = 0;
*(_QWORD *)(v65 + 24) = 15;
*(_BYTE *)v65 = 0;
if ( (v66 & 2) != 0 )
{
v66 &= ~2u;
sub_14003D310((__int64)v173);
}
if ( (v66 & 1) != 0 )
{
v63 = v165;
if ( v165 > 0xF )
{
v67 = Block[0];
if ( v165 + 1 >= 0x1000 )
{
v67 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v67 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v67);
}
}
v68 = EmoteSprite::defForName((__int64)v172, v63, v64, v41);
if ( v68 )
v72 = EmoteSprite::createWithDef(v68);
else
v72 = nullptr;
if ( v72 )
goto LABEL_75;
v73 = sub_14015AD20(*(_DWORD *)(*(_QWORD *)(a1 + 568) + 60LL));
*(_OWORD *)Block = 0;
v164 = 0;
v165 = 0;
do
++v60;
while ( v73[v60] );
sub_14003D230(Block, v73, v60);
v76 = EmoteSprite::defForName((__int64)Block, v74, v75, v41);
if ( v76 )
v72 = EmoteSprite::createWithDef(v76);
else
v72 = nullptr;
v69 = v165;
if ( v165 > 0xF )
{
v77 = Block[0];
if ( v165 + 1 >= 0x1000 )
{
v77 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v77 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v77);
}
if ( v72 )
{
LABEL_75:
ensureEmotesAreLoaded(v70, v69, v71, v41);
EmoteSprite::fitToHeight(v72, *(float *)&dword_1408FE390 * 18.0, 1.22);
v78 = *v72;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, 18.0, v10);
(*(void (__fastcall **)(__int64 *, __int64))(v78 + 184))(v72, v79);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v72,
1);
}
v80 = (const char *)(*(_QWORD *)(a1 + 568) + 96LL);
if ( *(_QWORD *)(*(_QWORD *)(a1 + 568) + 120LL) > 0xFu )
v80 = *(const char **)v80;
v81 = cocos2d::CCLabelBMFont::create(v80, (const char *)&qword_140704F78);
cocos2d::CCLabelBMFont::limitLabelWidth(v81, *(float *)&v16 - 60.0, 0.5, 0.2);
v82 = *(_QWORD *)v81;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, 0.0, 0.5);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(v82 + 288))(v81, v83);
v84 = *(_QWORD *)v81;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, 36.0, v9);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(v84 + 184))(v81, v85);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v81,
1);
v86 = *(float *)(*(__int64 (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_QWORD *)v81 + 320LL))(v81);
v87 = (*(double (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_QWORD *)v81 + 168LL))(v81);
v88 = (float)((float)(*(float *)&v87 * v86) + 36.0) + 6.0;
v89 = (const char *)(*(_QWORD *)(a1 + 568) + 160LL);
if ( *(_QWORD *)(*(_QWORD *)(a1 + 568) + 184LL) > 0xFu )
v89 = *(const char **)v89;
v90 = cocos2d::CCString::createWithFormat("%s ago", v89);
CString = cocos2d::CCString::getCString(v90);
v92 = cocos2d::CCLabelBMFont::create(CString, "chatFont.fnt");
v93 = *(_QWORD *)v92;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v93 + 288))(v92, v94);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v92 + 160LL))(v92);
(**((void (__fastcall ***)(__int64, __int16 *))v92 + 46))((__int64)v92 + 368, &word_140702F60);
LOBYTE(v95) = -106;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v92 + 46) + 40LL))((__int64)v92 + 368, v95);
v96 = *(_QWORD *)v92;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, v88, v9 - 1.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v96 + 184))(v92, v97);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v92,
1);
if ( *(_BYTE *)(*(_QWORD *)(a1 + 568) + 192LL) )
{
v100 = cocos2d::CCSprite::createWithSpriteFrameName("d_ball_01_001.png");
(**((void (__fastcall ***)(__int64, void *))v100 + 40))((__int64)v100 + 320, &unk_140702F68);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v100 + 160LL))(v100);
v101 = *(_QWORD *)v100;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, 6.0, v10 + 9.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v101 + 184))(v100, v102);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 544) + 456LL))(
*(_QWORD *)(a1 + 544),
v100,
10);
}
v103 = *(_QWORD *)(a1 + 568);
if ( *(int *)(v103 + 248) > 0 )
{
v104 = *(_DWORD *)(v103 + 252);
v105 = 1;
if ( v104 > 0 )
v105 = (unsigned int)v104;
v106 = (__int64 *)GJChestSprite::create(v105, v98, v99);
LOBYTE(v107) = 1;
GJChestSprite::switchToState(v106, 2, v107);
(*(void (__fastcall **)(__int64 *))(*v106 + 160))(v106);
v152[0] = (__int64)operator new(0x208u);
v108 = (void **)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v152[0]);
if ( v108 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v108, v106, 0, a1, (__int64)GJNotificationCell::onClaimReward) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v108);
goto LABEL_90;
}
(*((void (__fastcall **)(void **, __int64))*v108 + 1))(v108, 1);
}
v108 = nullptr;
LABEL_90:
*(_QWORD *)(a1 + 576) = v108;
v159[15] = 0;
v160 = 14;
v161 = 15;
strcpy(v159, "chestClick.ogg");
v152[0] = (__int64)v159;
if ( v108 + 56 != (void **)v159 )
sub_1400405A0(v108 + 56, v159, 0xEu);
sub_14003D310((__int64)v159);
v109 = **(_QWORD **)(a1 + 576);
v110 = *(_QWORD *)(a1 + 576);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v152, 23.4, 18.719999);
(*(void (__fastcall **)(__int64, __int64))(v109 + 312))(v110, v111);
v112 = *v106;
v113 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 320LL))(*(_QWORD *)(a1 + 576)) + 4)
* 0.5;
v114 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 320LL))(*(_QWORD *)(a1 + 576));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, *v114 * 0.5, v113);
(*(void (__fastcall **)(__int64 *, __int64))(v112 + 184))(v106, v115);
*(_BYTE *)(*(_QWORD *)(a1 + 576) + 408LL) = 0;
*(_BYTE *)(*(_QWORD *)(a1 + 576) + 409LL) = 1;
v116 = v158;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v158 + 464LL))(v158, *(_QWORD *)(a1 + 576));
v117 = **(_QWORD **)(a1 + 576);
v118 = *(_QWORD *)(a1 + 544);
v119 = *(_QWORD *)(a1 + 576);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, *(float *)(a1 + 528) - 34.0, *(float *)(a1 + 532) * 0.5);
cocos2d::CCNode::convertToWorldSpace(v118, &v157, v120);
cocos2d::CCNode::convertToNodeSpace(v116, &v156, v121);
(*(void (__fastcall **)(__int64, __int64))(v117 + 184))(v119, v122);
v123 = *(_QWORD *)(a1 + 576);
if ( v123 && *(_QWORD *)(a1 + 568) )
{
v125 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v123 + 952LL))(v123);
v152[0] = (__int64)Block;
v126 = *(_QWORD *)(a1 + 568);
if ( !qword_14090BFE0 )
{
v157 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v157);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
}
GameStatsManager::getNotificationRewardKey(v124, Block, *(unsigned int *)(v126 + 56));
v127 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v157 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v157);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v127 = qword_14090BFE0;
}
isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v127, Block);
if ( isSpecialChestUnlocked )
{
v125[608] = 0;
LOBYTE(v128) = 1;
GJChestSprite::switchToState(v125, 4, v128);
v130 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v125 + 480LL))(v125);
if ( v130 )
{
v132 = *(unsigned int **)(v130 + 56);
v133 = *v132;
if ( (_DWORD)v133 )
{
v134 = *((__int64 **)v132 + 2);
for ( j = &v134[v133 - 1]; v134 <= j; ++v134 )
{
v136 = *v134;
if ( !*v134 )
break;
LOBYTE(v131) = -106;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(v136 + 320) + 40LL))(v136 + 320, v131);
v153 = -26986;
LOWORD(v155) = -26986;
BYTE2(v155) = -106;
(**(void (__fastcall ***)(__int64, __int64 *))(v136 + 320))(v136 + 320, &v155);
}
}
}
}
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 576) + 936LL))(
*(_QWORD *)(a1 + 576),
isSpecialChestUnlocked ^ 1u);
goto LABEL_105;
}
goto LABEL_106;
}
if ( !v12 && !v30 )
{
LABEL_105:
v116 = v158;
goto LABEL_106;
}
v152[0] = (__int64)operator new(0x2C8u);
v139 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite(v152[0]);
if ( v139 )
{
if ( ButtonSprite::init_1(
(__int64)v139,
(__int64)"View",
50,
0,
1058642330,
0,
&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 = GJNotificationCell::onShowBody;
if ( v12 )
v140 = GJNotificationCell::onViewTarget;
v141 = CCMenuItemSpriteExtra::create((int)v139, 0, a1, (__int64)v140);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v141 + 160LL))(v141);
*((_DWORD *)v141 + 101) = 1061997773;
*((_DWORD *)v141 + 93) = 1066192077;
v116 = v158;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v158 + 464LL))(v158, v141);
v142 = *(_QWORD *)v141;
v143 = *(_QWORD *)(a1 + 544);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, *(float *)(a1 + 528) - 34.0, *(float *)(a1 + 532) * 0.5);
cocos2d::CCNode::convertToWorldSpace(v143, &v157, v144);
cocos2d::CCNode::convertToNodeSpace(v116, &v156, v145);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v142 + 184))(v141, v146);
LABEL_106:
if ( *(int *)(*(_QWORD *)(a1 + 568) + 256LL) > 0 )
{
v137 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("accountBtn_notifications_001.png");
(*(void (__fastcall **)(__int64 *))(*v137 + 160))(v137);
v152[0] = (__int64)operator new(0x208u);
v138 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v152[0]);
if ( v138 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v138, v137, 0, a1, (__int64)GJNotificationCell::onMute) )
{
cocos2d::CCObject::autorelease(v138);
LABEL_121:
*((_DWORD *)v138 + 93) = 1067030938;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v116 + 464LL))(v116, v138);
v147 = *(_QWORD *)v138;
v148 = *(_QWORD *)(a1 + 544);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v152, *(float *)(a1 + 528) - 74.0, *(float *)(a1 + 532) * 0.5);
cocos2d::CCNode::convertToWorldSpace(v148, &v157, v149);
cocos2d::CCNode::convertToNodeSpace(v116, &v156, v150);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v147 + 184))(v138, v151);
goto LABEL_122;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v138 + 8LL))(v138, 1);
}
v138 = nullptr;
goto LABEL_121;
}
LABEL_122:
sub_14003D310((__int64)v172);
sub_14003D310((__int64)v166);
sub_14003D310((__int64)Src);
}