//
// AchievementCell::loadFromDict from 0x1400ac860 to 0x1400ade14 (5556 bytes)
//
// 2 xrefs:
// > CustomListView::loadCell @ 0x1400ab66b
// > ??> @ 0x1406c7998
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=8
void AchievementCell::loadFromDict(AchievementCell *a1, cocos2d::CCDictionary *a2)
{
cocos2d::CCDictionary *v2; // r15
AchievementCell *v3; // r13
_BOOL8 v4; // rdx
cocos2d::CCString *v5; // rax
const char *CString; // rbx
void *v7; // rcx
AchievementManager *v8; // rax
float v9; // xmm6_4
size_t v10; // rsi
struct cocos2d::CCSprite *v11; // r14
struct cocos2d::CCSprite *v12; // rdi
cocos2d::CCSprite_vtbl *v13; // rbx
const cocos2d::CCPoint *v14; // rax
UnlockType v15; // edi
__int64 v16; // rbx
void *v17; // rcx
cocos2d::CCString *v18; // rax
const char *v19; // rbx
void *v20; // rcx
size_t v21; // r8
cocos2d::CCArray *v22; // r14
cocos2d::CCString *v23; // rax
const char *v24; // rbx
cocos2d::CCString *v25; // rax
size_t v26; // r8
void **v27; // rcx
char *v28; // r14
unsigned __int64 v29; // r13
size_t v30; // r8
__int64 v31; // r12
char *v32; // rax
size_t v33; // r8
void **v34; // rcx
char *v35; // r14
unsigned __int64 v36; // r13
size_t v37; // r8
__int64 v38; // r12
char *v39; // rax
size_t v40; // r8
void **v41; // rcx
unsigned __int64 v42; // r12
size_t v43; // r8
__int64 v44; // r14
size_t v45; // r8
void **v46; // rcx
unsigned __int64 v47; // r13
char *v48; // r15
unsigned __int64 v49; // r12
size_t v50; // r8
__int64 v51; // r14
char *v52; // rax
size_t v53; // r8
void **v54; // rcx
unsigned __int64 v55; // r15
size_t v56; // r8
__int64 v57; // rdi
size_t v58; // r8
void **v59; // rcx
char *v60; // rdi
unsigned __int64 v61; // r13
size_t v62; // r8
__int64 v63; // r12
char *v64; // rax
size_t v65; // r8
void **v66; // rcx
unsigned __int64 v67; // r12
size_t v68; // r8
__int64 v69; // rdi
size_t v70; // r8
void **v71; // rcx
char *v72; // r14
size_t v73; // r8
__int64 v74; // r13
char *v75; // rax
size_t v76; // r8
int v77; // r14d
void *v78; // rcx
size_t v79; // r8
void **v80; // rcx
char *v81; // r14
size_t v82; // r8
__int64 v83; // r13
char *v84; // rax
__int128 v85; // xmm0
size_t v86; // r8
void **v87; // rcx
unsigned __int64 v88; // r13
char *v89; // r14
unsigned __int64 v90; // r12
size_t v91; // r8
__int64 v92; // rdi
char *v93; // rax
bool v94; // zf
size_t v95; // r8
void **v96; // rcx
char *v97; // rdi
unsigned __int64 v98; // r13
size_t v99; // r8
__int64 v100; // r12
char *v101; // rax
size_t v102; // r8
void **v103; // rcx
unsigned __int64 v104; // r14
size_t v105; // r8
__int64 v106; // rbx
cocos2d::CCSprite_vtbl *v107; // rbx
const cocos2d::CCPoint *v108; // rax
__int64 v109; // r12
float *v110; // rax
__int64 v111; // rbx
__int64 v112; // rax
cocos2d::CCString *v113; // rbx
const char *v114; // rax
struct cocos2d::CCLabelBMFont *v115; // rdi
cocos2d::CCLabelBMFont_vtbl *v116; // rbx
const cocos2d::CCPoint *v117; // rax
cocos2d::CCLabelBMFont_vtbl *v118; // rbx
_QWORD *v119; // rax
cocos2d::CCString *v120; // rax
char *v121; // rax
size_t v122; // r8
void *v123; // rcx
cocos2d::CCString *v124; // rax
char *v125; // rax
size_t v126; // r8
const struct cocos2d::CCPoint *v127; // rax
char *v128; // r15
__int64 v129; // rbx
__int64 v130; // rax
__int64 v131; // rbx
__int64 v132; // rax
void **v133; // rdx
float height; // xmm6_4
float v135; // xmm0_4
float v136; // xmm2_4
float v137; // xmm7_4
cocos2d::CCLabelBMFont_vtbl *v138; // rbx
const cocos2d::CCPoint *v139; // rax
__int64 v140; // rbx
__int64 v141; // rax
AchievementManager *v142; // rax
int v143; // eax
cocos2d::CCString *v144; // rax
const char *v145; // rax
struct cocos2d::CCLabelBMFont *v146; // rdi
__int64 v147; // rax
struct cocos2d::CCSprite *v148; // rdi
cocos2d::CCSprite_vtbl *v149; // rbx
const cocos2d::CCPoint *v150; // rax
cocos2d::CCSprite_vtbl *v151; // rbx
const cocos2d::CCPoint *v152; // rax
void *v153; // rcx
bool v154; // [rsp+30h] [rbp-D0h]
cocos2d::ccColor3B *v155; // [rsp+40h] [rbp-C0h]
bool v156; // [rsp+50h] [rbp-B0h]
bool v157; // [rsp+50h] [rbp-B0h]
bool v158; // [rsp+50h] [rbp-B0h]
bool v159; // [rsp+50h] [rbp-B0h]
bool v160; // [rsp+50h] [rbp-B0h]
bool v161; // [rsp+50h] [rbp-B0h]
bool v162; // [rsp+50h] [rbp-B0h]
bool v163; // [rsp+51h] [rbp-AFh]
cocos2d::ccColor3B v164[5]; // [rsp+60h] [rbp-A0h] BYREF
cocos2d::ccColor3B v165; // [rsp+70h] [rbp-90h] BYREF
void **v166; // [rsp+80h] [rbp-80h] BYREF
int v167; // [rsp+88h] [rbp-78h]
int v168; // [rsp+8Ch] [rbp-74h]
AchievementCell *v169; // [rsp+90h] [rbp-70h] BYREF
const char *v170; // [rsp+98h] [rbp-68h] BYREF
cocos2d::CCDictionary *v171; // [rsp+A0h] [rbp-60h]
void *Buf2[2]; // [rsp+A8h] [rbp-58h] BYREF
unsigned __int64 v173; // [rsp+B8h] [rbp-48h]
unsigned __int64 v174; // [rsp+C0h] [rbp-40h]
void *Buf1[2]; // [rsp+C8h] [rbp-38h] BYREF
unsigned __int64 v176; // [rsp+D8h] [rbp-28h]
unsigned __int64 v177; // [rsp+E0h] [rbp-20h]
void *Block[2]; // [rsp+E8h] [rbp-18h] BYREF
__int64 v179; // [rsp+F8h] [rbp-8h]
unsigned __int64 v180; // [rsp+100h] [rbp+0h]
void *v181[2]; // [rsp+108h] [rbp+8h] BYREF
__int64 v182; // [rsp+118h] [rbp+18h]
unsigned __int64 v183; // [rsp+120h] [rbp+20h]
v2 = a2;
v171 = a2;
v3 = a1;
v169 = a1;
LOBYTE(a2) = -1;
a1->m_backgroundLayer->setOpacity(&a1->m_backgroundLayer->cocos2d::CCRGBAProtocol, (GLubyte)a2);
LOBYTE(v4) = 1;
v3->m_mainLayer->removeAllChildrenWithCleanup(v3->m_mainLayer, v4);
Block[1] = (void *)29285;
v179 = 10;
v180 = 15;
Block[0] = (void *)0x696669746E656469LL;
v5 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v2, Block);
CString = cocos2d::CCString::getCString(v5);
v170 = CString;
if ( v180 > 0xF )
{
v7 = Block[0];
if ( v180 + 1 >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v7);
}
v179 = 0;
v180 = 15;
LOBYTE(Block[0]) = 0;
v8 = AchievementManager::sharedState();
v167 = AchievementManager::percentForAchievement(v8, CString);
v9 = 0.0;
v10 = -1;
if ( v167 < 100 )
{
v11 = cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png");
v12 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lock_001.png");
v11->addChild_1(v11, v12);
v13 = v12->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v169,
v11->m_obRect.size.width * 0.5,
v11->m_obRect.size.height * 0.5);
v13->setPosition_0(v12, v14);
*(_WORD *)&v164[0].r = -20561;
v164[0].b = -81;
v11->setColor(&v11->cocos2d::CCRGBAProtocol, v164);
goto LABEL_217;
}
*(_OWORD *)Buf2 = 0;
v15 = 4;
v173 = 4;
v174 = 15;
strcpy((char *)Buf2, "icon");
v16 = cocos2d::CCDictionary::objectForKey(v2, Buf2);
if ( v174 > 0xF )
{
v17 = Buf2[0];
if ( v174 + 1 >= 0x1000 )
{
v17 = *((void **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v17 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v17);
}
if ( v16 )
{
*(_OWORD *)Buf1 = 0;
v176 = 4;
v177 = 15;
strcpy((char *)Buf1, "icon");
v18 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v2, Buf1);
v19 = cocos2d::CCString::getCString(v18);
if ( v177 > 0xF )
{
v20 = Buf1[0];
if ( v177 + 1 >= 0x1000 )
{
v20 = *((void **)Buf1[0] - 1);
if ( (unsigned __int64)((char *)Buf1[0] - (char *)v20 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v20);
}
v176 = 0;
v177 = 15;
LOBYTE(Buf1[0]) = 0;
*(_OWORD *)Buf2 = 0;
v173 = 0;
v174 = 0;
v21 = -1;
do
++v21;
while ( v19[v21] );
sub_14003A930(Buf2, v19, v21);
v22 = sub_140080420((__int64 *)Buf2);
sub_14003A830((__int64)Buf2);
if ( cocos2d::CCArray::count(v22) >= 2 )
{
v23 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v22, 0);
v24 = cocos2d::CCString::getCString(v23);
v25 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v22, 1u);
v168 = cocos2d::CCString::intValue(v25);
*(_OWORD *)Buf2 = 0;
v173 = 4;
v174 = 15;
strcpy((char *)Buf2, "ship");
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v26 = -1;
do
++v26;
while ( v24[v26] );
sub_14003A930(Buf1, v24, v26);
v27 = Buf1;
v163 = v177 > 0xF;
v28 = (char *)Buf1[0];
if ( v177 > 0xF )
v27 = (void **)Buf1[0];
v29 = v176;
v30 = v176;
if ( v176 > 4 )
v30 = 4;
LODWORD(v31) = memcmp(v27, Buf2, v30);
if ( !(_DWORD)v31 )
{
if ( v29 >= 4 )
v31 = v29 > 4;
else
LODWORD(v31) = -1;
}
if ( v163 )
{
v32 = v28;
if ( v177 + 1 >= 0x1000 )
{
v28 = *((char **)v28 - 1);
if ( (unsigned __int64)(v32 - v28 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v28);
}
if ( (_DWORD)v31 )
{
*(_OWORD *)Buf2 = 0;
v173 = 4;
v174 = 15;
strcpy((char *)Buf2, "ball");
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v33 = -1;
do
++v33;
while ( v24[v33] );
sub_14003A930(Buf1, v24, v33);
v34 = Buf1;
v156 = v177 > 0xF;
v35 = (char *)Buf1[0];
if ( v177 > 0xF )
v34 = (void **)Buf1[0];
v36 = v176;
v37 = v176;
if ( v176 > 4 )
v37 = 4;
LODWORD(v38) = memcmp(v34, Buf2, v37);
if ( !(_DWORD)v38 )
{
if ( v36 >= 4 )
v38 = v36 > 4;
else
LODWORD(v38) = -1;
}
if ( v156 )
{
v39 = v35;
if ( v177 + 1 >= 0x1000 )
{
v35 = *((char **)v35 - 1);
if ( (unsigned __int64)(v39 - v35 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v35);
}
if ( (_DWORD)v38 )
{
*(_OWORD *)Buf2 = 0;
v173 = 4;
v174 = 15;
strcpy((char *)Buf2, "bird");
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v40 = -1;
do
++v40;
while ( v24[v40] );
sub_14003A930(Buf1, v24, v40);
v41 = Buf1;
if ( v177 > 0xF )
v41 = (void **)Buf1[0];
v42 = v176;
v43 = v176;
if ( v176 > 4 )
v43 = 4;
LODWORD(v44) = memcmp(v41, Buf2, v43);
if ( !(_DWORD)v44 )
{
if ( v42 >= 4 )
v44 = v42 > 4;
else
LODWORD(v44) = -1;
}
sub_14003A830((__int64)Buf1);
if ( (_DWORD)v44 )
{
*(_OWORD *)Buf1 = 0;
v176 = 4;
v177 = 15;
strcpy((char *)Buf1, "dart");
*(_OWORD *)Buf2 = 0;
v173 = 0;
v174 = 0;
v45 = -1;
do
++v45;
while ( v24[v45] );
sub_14003A930(Buf2, v24, v45);
v46 = Buf2;
v47 = v174;
v157 = v174 > 0xF;
v48 = (char *)Buf2[0];
if ( v174 > 0xF )
v46 = (void **)Buf2[0];
v49 = v173;
v50 = v173;
if ( v173 > 4 )
v50 = 4;
LODWORD(v51) = memcmp(v46, Buf1, v50);
if ( !(_DWORD)v51 )
{
if ( v49 >= 4 )
v51 = v49 > 4;
else
LODWORD(v51) = -1;
}
if ( v157 )
{
v52 = v48;
if ( v47 + 1 >= 0x1000 )
{
v48 = *((char **)v48 - 1);
if ( (unsigned __int64)(v52 - v48 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v48);
}
sub_14003A830((__int64)Buf1);
if ( (_DWORD)v51 )
{
*(_OWORD *)Buf2 = 0;
v173 = 5;
v174 = 15;
strcpy((char *)Buf2, "robot");
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v53 = -1;
do
++v53;
while ( v24[v53] );
sub_14003A930(Buf1, v24, v53);
v54 = Buf1;
if ( v177 > 0xF )
v54 = (void **)Buf1[0];
v55 = v176;
v56 = v176;
if ( v176 > 5 )
v56 = 5;
LODWORD(v57) = memcmp(v54, Buf2, v56);
if ( !(_DWORD)v57 )
{
if ( v55 >= 5 )
v57 = v55 > 5;
else
LODWORD(v57) = -1;
}
sub_14003A830((__int64)Buf1);
if ( (_DWORD)v57 )
{
*(_OWORD *)Buf2 = 0;
v173 = 6;
v174 = 15;
strcpy((char *)Buf2, "spider");
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v58 = -1;
do
++v58;
while ( v24[v58] );
sub_14003A930(Buf1, v24, v58);
v59 = Buf1;
v158 = v177 > 0xF;
v60 = (char *)Buf1[0];
if ( v177 > 0xF )
v59 = (void **)Buf1[0];
v61 = v176;
v62 = v176;
if ( v176 > 6 )
v62 = 6;
LODWORD(v63) = memcmp(v59, Buf2, v62);
if ( !(_DWORD)v63 )
{
if ( v61 >= 6 )
v63 = v61 > 6;
else
LODWORD(v63) = -1;
}
if ( v158 )
{
v64 = v60;
if ( v177 + 1 >= 0x1000 )
{
v60 = *((char **)v60 - 1);
if ( (unsigned __int64)(v64 - v60 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v60);
}
if ( (_DWORD)v63 )
{
*(_OWORD *)Buf2 = 0;
v173 = 5;
v174 = 15;
strcpy((char *)Buf2, "death");
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v65 = -1;
do
++v65;
while ( v24[v65] );
sub_14003A930(Buf1, v24, v65);
v66 = Buf1;
if ( v177 > 0xF )
v66 = (void **)Buf1[0];
v67 = v176;
v68 = v176;
if ( v176 > 5 )
v68 = 5;
LODWORD(v69) = memcmp(v66, Buf2, v68);
if ( !(_DWORD)v69 )
{
if ( v67 >= 5 )
v69 = v67 > 5;
else
LODWORD(v69) = -1;
}
sub_14003A830((__int64)Buf1);
if ( (_DWORD)v69 )
{
Buf2[1] = nullptr;
v173 = 7;
v174 = 15;
Buf2[0] = (void *)0x6C616963657073LL;
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v70 = -1;
do
++v70;
while ( v24[v70] );
sub_14003A930(Buf1, v24, v70);
v71 = Buf1;
v159 = v177 > 0xF;
v72 = (char *)Buf1[0];
if ( v177 > 0xF )
v71 = (void **)Buf1[0];
v73 = v176;
if ( v176 > 7 )
v73 = 7;
LODWORD(v74) = memcmp(v71, Buf2, v73);
if ( !(_DWORD)v74 )
{
if ( v176 >= 7 )
v74 = v176 > 7;
else
LODWORD(v74) = -1;
}
if ( v159 )
{
v75 = v72;
if ( v177 + 1 >= 0x1000 )
{
v72 = *((char **)v72 - 1);
if ( (unsigned __int64)(v75 - v72 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v72);
}
if ( (_DWORD)v74 )
{
*(_OWORD *)Buf2 = 0;
v173 = 5;
v174 = 15;
strcpy((char *)Buf2, "swing");
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v76 = -1;
do
++v76;
while ( v24[v76] );
sub_14003A930(Buf1, v24, v76);
v77 = sub_14003A760(Buf1, Buf2);
if ( v177 > 0xF )
{
v78 = Buf1[0];
if ( v177 + 1 >= 0x1000 )
{
v78 = *((void **)Buf1[0] - 1);
if ( (unsigned __int64)((char *)Buf1[0] - (char *)v78 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v78);
}
if ( v77 )
{
Buf2[1] = nullptr;
v173 = 7;
v174 = 15;
Buf2[0] = (void *)0x6B63617074656ALL;
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v79 = -1;
do
++v79;
while ( v24[v79] );
sub_14003A930(Buf1, v24, v79);
v80 = Buf1;
v160 = v177 > 0xF;
v81 = (char *)Buf1[0];
if ( v177 > 0xF )
v80 = (void **)Buf1[0];
v82 = v176;
if ( v176 > 7 )
v82 = 7;
LODWORD(v83) = memcmp(v80, Buf2, v82);
if ( !(_DWORD)v83 )
{
if ( v176 >= 7 )
v83 = v176 > 7;
else
LODWORD(v83) = -1;
}
if ( v160 )
{
v84 = v81;
if ( v177 + 1 >= 0x1000 )
{
v81 = *((char **)v81 - 1);
if ( (unsigned __int64)(v84 - v81 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v81);
}
if ( (_DWORD)v83 )
{
v85 = 0;
v173 = 10;
v174 = 15;
*(_QWORD *)&v85 = 0x6572747370696873LL;
*(_OWORD *)Buf2 = v85;
strcpy((char *)&Buf2[1], "ak");
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
v86 = -1;
do
++v86;
while ( v24[v86] );
sub_14003A930(Buf1, v24, v86);
v87 = Buf1;
v88 = v177;
v161 = v177 > 0xF;
v89 = (char *)Buf1[0];
if ( v177 > 0xF )
v87 = (void **)Buf1[0];
v90 = v176;
v91 = v176;
if ( v176 > 0xA )
v91 = 10;
LODWORD(v92) = memcmp(v87, Buf2, v91);
if ( !(_DWORD)v92 )
{
if ( v90 >= 0xA )
v92 = v90 > 0xA;
else
LODWORD(v92) = -1;
}
if ( v161 )
{
v93 = v89;
if ( v88 + 1 >= 0x1000 )
{
v89 = *((char **)v89 - 1);
if ( (unsigned __int64)(v93 - v89 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v89);
}
sub_14003A830((__int64)Buf2);
v94 = (_DWORD)v92 == 0;
v15 = GJItem|Col2;
if ( !v94 )
{
*(_OWORD *)Buf1 = 0;
v176 = 5;
v177 = 15;
strcpy((char *)Buf1, "color");
*(_OWORD *)Buf2 = 0;
v173 = 0;
v174 = 0;
v95 = -1;
do
++v95;
while ( v24[v95] );
sub_14003A930(Buf2, v24, v95);
v96 = Buf2;
v162 = v174 > 0xF;
v97 = (char *)Buf2[0];
if ( v174 > 0xF )
v96 = (void **)Buf2[0];
v98 = v173;
v99 = v173;
if ( v173 > 5 )
v99 = 5;
LODWORD(v100) = memcmp(v96, Buf1, v99);
if ( !(_DWORD)v100 )
{
if ( v98 >= 5 )
v100 = v98 > 5;
else
LODWORD(v100) = -1;
}
if ( v162 )
{
v101 = v97;
if ( v174 + 1 >= 0x1000 )
{
v97 = *((char **)v97 - 1);
if ( (unsigned __int64)(v101 - v97 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v97);
}
if ( (_DWORD)v100 )
{
*(_OWORD *)Buf1 = 0;
v176 = 6;
v177 = 15;
strcpy((char *)Buf1, "color2");
*(_OWORD *)Buf2 = 0;
v173 = 0;
v174 = 0;
v102 = -1;
do
++v102;
while ( v24[v102] );
sub_14003A930(Buf2, v24, v102);
v103 = Buf2;
if ( v174 > 0xF )
v103 = (void **)Buf2[0];
v104 = v173;
v105 = v173;
if ( v173 > 6 )
v105 = 6;
LODWORD(v106) = memcmp(v103, Buf1, v105);
if ( !(_DWORD)v106 )
{
if ( v104 >= 6 )
v106 = v104 > 6;
else
LODWORD(v106) = -1;
}
sub_14003A830((__int64)Buf2);
v15 = 1;
if ( !(_DWORD)v106 )
v15 = Col2;
}
else
{
v15 = Col1;
}
}
}
else
{
v15 = GJItem|Col1;
}
}
else
{
v15 = GJItem|0x1;
}
}
else
{
v15 = Streak;
}
}
else
{
v15 = Death;
}
}
else
{
v15 = 9;
}
}
else
{
v15 = 8;
}
}
else
{
v15 = Dart;
}
}
else
{
v15 = Bird;
v9 = -5.0;
}
}
else
{
v15 = 5;
}
}
*(_WORD *)&v164[0].r = -1;
*(_WORD *)&v165.r = -20561;
v11 = (struct cocos2d::CCSprite *)operator new(0x278u);
v166 = (void **)&v11->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCSprite::CCSprite(v11);
v11->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCSprite_vtbl *)&GJItemIcon::`vftable';
v11->cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&GJItemIcon::`vftable';
v11->cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&GJItemIcon::`vftable';
v11[1].cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = nullptr;
v11[1].m_uID = 0;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v11[1].m_nLuaID);
LOBYTE(v11[1].m_uReference) = 0;
*(_QWORD *)&v11[1].m_uAutoReleaseCount = 0;
v164[0].b = -1;
v165.b = -81;
if ( GJItemIcon::init((GJItemIcon *)v11, v15, v168, &v165, v164, 0, v154, 0, v155) )
{
cocos2d::CCObject::autorelease(v11);
}
else
{
((void (__fastcall *)(struct cocos2d::CCSprite *, __int64))v11->~CCSprite)(v11, 1);
v11 = nullptr;
}
v2 = v171;
v3 = v169;
LABEL_217:
if ( v11 )
goto LABEL_219;
}
}
v11 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_achImage_001.png");
LABEL_219:
v107 = v11->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, 35.0, (float)(v3->m_height * 0.5) + v9);
v107->setPosition_0(v11, v108);
v3->m_mainLayer->addChild_1(v3->m_mainLayer, v11);
((void (__fastcall *)(struct cocos2d::CCSprite *))v11->setScale_0)(v11);
v109 = cocos2d::CCNode::create();
v3->m_mainLayer->addChild_1(v3->m_mainLayer, (cocos2d::CCNode *)v109);
v110 = (float *)v11->getPosition_0(v11);
v111 = *(_QWORD *)v109;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, *v110 + 32.0, v3->m_height * 0.5);
(*(void (__fastcall **)(__int64, __int64))(v111 + 184))(v109, v112);
*(_OWORD *)Buf2 = 0;
v173 = 5;
v174 = 15;
strcpy((char *)Buf2, "title");
v113 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v2, Buf2);
sub_14003A830((__int64)Buf2);
v114 = cocos2d::CCString::getCString(v113);
v115 = cocos2d::CCLabelBMFont::create(v114, "goldFont.fnt");
(*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v109 + 448LL))(v109, v115);
v116 = v115->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, 0.0, 0.5);
v116->setAnchorPoint(v115, v117);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v115->setScale_0)(v115);
if ( v115->getContentSize(v115)->width > 200.0 )
{
v118 = v115->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v115->getContentSize(v115);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v118->setScale_0)(v115);
}
fminf(
0.69999999,
COERCE_FLOAT(COERCE_UNSIGNED_INT64(((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v115->getScale)(v115))));
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v115->setScale_0)(v115);
*(_OWORD *)v181 = 0;
v182 = 0;
v183 = 15;
LOBYTE(v181[0]) = 0;
*(_OWORD *)Buf2 = 0;
v173 = 0;
v174 = 15;
v119 = sub_14003AA10(0x20u);
Buf2[0] = v119;
v174 = 31;
if ( v167 < 100 )
{
v173 = 21;
strcpy((char *)v119, "unachievedDescription");
v124 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v2, Buf2);
v125 = (char *)cocos2d::CCString::getCString(v124);
v126 = -1;
do
++v126;
while ( v125[v126] );
sub_14003CCE0(v181, v125, v126);
sub_14003A830((__int64)Buf2);
}
else
{
v173 = 19;
strcpy((char *)v119, "achievedDescription");
v120 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v2, Buf2);
v121 = (char *)cocos2d::CCString::getCString(v120);
v122 = -1;
do
++v122;
while ( v121[v122] );
sub_14003CCE0(v181, v121, v122);
if ( v174 > 0xF )
{
v123 = Buf2[0];
if ( v174 + 1 >= 0x1000 )
{
v123 = *((void **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v123 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v123);
}
}
v166 = Buf2;
*(_OWORD *)Buf2 = 0;
v173 = 1;
v174 = 15;
LOWORD(Buf2[0]) = (unsigned __int8)asc_140518984[0];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, 0.0, 1.0);
v128 = TextArea::create((__int64)Buf2, "chatFont.fnt", 1.0, 190.0, v127, 1101004800, 0);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v109 + 448LL))(v109, v128);
v129 = *(_QWORD *)v128;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, 0.0, 0.5);
(*(void (__fastcall **)(char *, __int64))(v129 + 272))(v128, v130);
v131 = *(_QWORD *)v128;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, 0.0, 5.0);
(*(void (__fastcall **)(char *, __int64))(v131 + 184))(v128, v132);
*((_DWORD *)v128 + 164) = 1098907648;
v133 = v181;
if ( v183 > 0xF )
v133 = (void **)v181[0];
*(_OWORD *)Buf1 = 0;
v176 = 0;
v177 = 0;
do
++v10;
while ( *((_BYTE *)v133 + v10) );
sub_14003A930(Buf1, v133, v10);
TextArea::setString((TextArea *)v128, (__int64)Buf1);
height = v115->getContentSize(v115)->height;
v135 = *(float *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v128 + 304LL))(v128) + 4) + 17.0;
v136 = (float)(v135 + height) * 0.5;
v137 = v136 - (float)(v135 * 0.5);
v138 = v115->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, 0.0, (float)((float)(v136 - (float)(height * 0.5)) + 3.0) + 2.0);
v138->setPosition_0(v115, v139);
v140 = *(_QWORD *)v128;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, 0.0, (float)(16.0 - v137) - 2.0);
(*(void (__fastcall **)(char *, __int64))(v140 + 184))(v128, v141);
v142 = AchievementManager::sharedState();
v143 = AchievementManager::percentForAchievement(v142, v170);
if ( !v143 || v143 == 100 )
{
if ( v167 < 100 )
goto LABEL_242;
}
else if ( v167 < 100 )
{
v144 = cocos2d::CCString::createWithFormat("%i%%", v143);
v145 = cocos2d::CCString::getCString(v144);
v146 = cocos2d::CCLabelBMFont::create(v145, "goldFont.fnt");
v3->m_mainLayer->addChild_0(v3->m_mainLayer, v146, 10);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v146->setScale_0)(v146);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, 0.0, -25.0);
v147 = (__int64)v11->getPosition_0(v11);
cocos2d::CCPoint::operator+(v147, &v170);
v146->setPosition_0(v146, (const cocos2d::CCPoint *)&v170);
goto LABEL_242;
}
v148 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png");
v149 = v148->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, 0.0, 0.5);
v149->setAnchorPoint(v148, v150);
v3->m_mainLayer->addChild_1(v3->m_mainLayer, v148);
((void (__fastcall *)(struct cocos2d::CCSprite *))v148->setScale_0)(v148);
v151 = v148->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v166, v3->m_width - 40.0, v3->m_height * 0.5);
v151->setPosition_0(v148, v152);
LABEL_242:
if ( v183 > 0xF )
{
v153 = v181[0];
if ( v183 + 1 >= 0x1000 )
{
v153 = *((void **)v181[0] - 1);
if ( (unsigned __int64)((char *)v181[0] - (char *)v153 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v153);
}
}