//
// ShardsPage::init from 0xaa3d08 to 0xaa5524 (6172 bytes)
//
// 3 xrefs:
// > ShardsPage::create @ 0xaa56b4
// > ??> @ 0x56788
// > ??> @ 0x14a26c0
//
// This function is hookable on this platform (idp: arm, 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 13:00:50 +0000
//
__int64 __fastcall ShardsPage::init(ShardsPage *this)
{
cocos2d::CCDirector *v3; // x0
int v4; // w21
__int64 v5; // x20
void (__fastcall *v6)(__int64, __int64 *); // x22
void (__fastcall *v7)(__int64, __int64 *); // x22
const char *v8; // x1
cocos2d::CCSprite *v9; // x20
void (__fastcall *v10)(cocos2d::CCSprite *, __int64 *); // x22
void (__fastcall *v11)(cocos2d::CCSprite *, __int64 *); // x21
const char *v12; // x1
__int64 v13; // x21
void (__fastcall *v14)(__int64, __int64 *); // x22
const char *v15; // x1
__int64 v16; // x21
void (__fastcall *v17)(__int64, __int64 *); // x22
const char *v18; // x1
__int64 v19; // x21
void (__fastcall *v20)(__int64, __int64 *); // x22
cocos2d::CCDictionary *v21; // x0
cocos2d::CCObject *v22; // x0
const char *v23; // x1
__int64 v24; // x0
cocos2d::CCMenu *v25; // x20
__int64 v26; // x20
float v27; // s1
void (__fastcall *v28)(__int64, __int64 *); // x21
const char *v29; // x1
signed int v30; // w20
__int64 *v31; // x0
GameStatsManager *v32; // x0
_BOOL4 v33; // w0
cocos2d::CCSprite *v34; // x0
cocos2d::CCObject *v35; // x20
void (__fastcall *v36)(cocos2d::CCObject *, __int64 *); // x21
cocos2d::CCString *v37; // x0
cocos2d::CCLabelBMFont *CString; // x0
const char *v39; // x2
cocos2d::CCObject *v40; // x24
void (__fastcall *v41)(cocos2d::CCObject *, __int64 *); // x21
void (__fastcall *v42)(cocos2d::CCObject *, __int64 *); // x21
__int64 v43; // x22
float *v44; // x0
cocos2d::CCSprite *v45; // x0
cocos2d::CCObject *v46; // x20
void (__fastcall *v47)(cocos2d::CCObject *, __int64 *); // x21
void (__fastcall *v48)(cocos2d::CCObject *, __int64 *); // x21
__int64 v49; // x22
__int64 v50; // x24
unsigned int v51; // w22
const char *v52; // x1
cocos2d::CCString *v53; // x0
size_t v54; // x0
GameManager *v55; // x0
__int64 v56; // x25
GJItemIcon *v57; // x25
cocos2d::CCObject *v58; // x20
void (__fastcall *v59)(cocos2d::CCObject *, __int64); // x27
__int64 v60; // x0
void (__fastcall *v61)(GJItemIcon *, __int64 *); // x27
float v62; // s8
__int64 v63; // x0
void (__fastcall *v64)(cocos2d::CCObject *, __int64 *); // x27
const char *v65; // x1
cocos2d::CCObject *v66; // x20
void (__fastcall *v67)(cocos2d::CCObject *, __int64 *); // x26
void (__fastcall *v68)(cocos2d::CCObject *, float); // x26
float *v69; // x0
void (__fastcall *v70)(cocos2d::CCObject *, float); // x26
__int64 v71; // x0
int v72; // w20
float v73; // s8
cocos2d::CCObject *v74; // x25
void (__fastcall *v75)(cocos2d::CCObject *, __int64 *); // x20
void (__fastcall *v76)(cocos2d::CCObject *, __int64 *); // x20
void (__fastcall *v77)(cocos2d::CCObject *, float); // x20
float *v78; // x0
void (__fastcall *v79)(cocos2d::CCObject *, float); // x20
__int64 v80; // x0
cocos2d::CCMenu *v81; // x0
cocos2d::CCNode *v82; // x20
float v83; // s8
const char *v84; // x1
__int64 v85; // x0
__int64 v86; // x0
cocos2d::CCDirector **v87; // x24
void (__fastcall *v88)(cocos2d::CCDirector **, __int64 *); // x25
cocos2d::CCDirector *v89; // x0
float v90; // s0
const char *v91; // x1
cocos2d::CCSprite *v92; // x21
__int64 v93; // x0
cocos2d::CCDirector **v94; // x21
void (__fastcall *v95)(cocos2d::CCDirector **, __int64 *); // x22
cocos2d::CCDirector *v96; // x0
float v97; // s0
const char *v98; // x1
__int64 v99; // x0
__int64 v100; // x20
void (__fastcall *v101)(__int64, __int64 *); // x21
cocos2d::CCString *v102; // x0
cocos2d::CCLabelBMFont *v103; // x0
const char *v104; // x2
cocos2d::CCObject *v105; // x20
void (__fastcall *v106)(cocos2d::CCObject *, __int64 *); // x26
void (__fastcall *v107)(cocos2d::CCObject *, __int64 *); // x26
float v108; // s0
cocos2d::CCSprite *v109; // x0
cocos2d::CCObject *v110; // x26
void (__fastcall *v111)(cocos2d::CCObject *, __int64 *); // x27
void (__fastcall *v112)(cocos2d::CCObject *, __int64 *); // x27
__int64 *v113; // x0
GameStatsManager *v114; // x0
int v115; // w21
_BOOL4 v116; // w0
__int64 *v117; // x0
GameStatsManager *v118; // x0
__int64 *v119; // x0
GameStatsManager *v120; // x0
__int64 *v121; // x0
GameStatsManager *v122; // x0
__int64 *v123; // x0
GameStatsManager *v124; // x0
int Stat; // w21
__int64 *v126; // x0
GameStatsManager *v127; // x0
__int64 *v128; // x0
GameStatsManager *v129; // x0
__int64 *v130; // x0
GameStatsManager *v131; // x0
__int64 *v132; // x0
GameStatsManager *v133; // x0
float v134; // s0
void (__fastcall *v135)(cocos2d::CCSprite *, __int64 *); // x22
unsigned __int8 v136; // [xsp+ABh] [xbp+ABh]
int v137; // [xsp+ACh] [xbp+ACh]
__int64 v138; // [xsp+C0h] [xbp+C0h]
int v139; // [xsp+F8h] [xbp+F8h]
int v140; // [xsp+FCh] [xbp+FCh]
cocos2d::CCNode *v141; // [xsp+100h] [xbp+100h]
cocos2d::CCNode *v142; // [xsp+100h] [xbp+100h]
cocos2d::CCNode *v143; // [xsp+100h] [xbp+100h]
cocos2d::CCObject *v144; // [xsp+108h] [xbp+108h]
unsigned int v145; // [xsp+110h] [xbp+110h]
int v146; // [xsp+114h] [xbp+114h]
__int64 v147; // [xsp+128h] [xbp+128h]
__int64 v148; // [xsp+130h] [xbp+130h]
char v149; // [xsp+138h] [xbp+138h] BYREF
char v150; // [xsp+139h] [xbp+139h]
char v151; // [xsp+13Ah] [xbp+13Ah]
char v152; // [xsp+140h] [xbp+140h] BYREF
char v153; // [xsp+141h] [xbp+141h]
char v154; // [xsp+142h] [xbp+142h]
__int64 v155; // [xsp+148h] [xbp+148h]
int v156; // [xsp+150h] [xbp+150h] BYREF
unsigned int v157; // [xsp+154h] [xbp+154h] BYREF
__int64 v158; // [xsp+158h] [xbp+158h] BYREF
_BYTE v159[8]; // [xsp+160h] [xbp+160h] BYREF
_BYTE v160[8]; // [xsp+168h] [xbp+168h] BYREF
__int64 v161; // [xsp+170h] [xbp+170h] BYREF
__int64 v162; // [xsp+178h] [xbp+178h] BYREF
__int64 v163; // [xsp+180h] [xbp+180h] BYREF
__int64 v164; // [xsp+188h] [xbp+188h] BYREF
__int64 v165[2]; // [xsp+190h] [xbp+190h] BYREF
__int64 v166[2]; // [xsp+1A0h] [xbp+1A0h] BYREF
void *v167; // [xsp+1B0h] [xbp+1B0h]
__int64 v168[2]; // [xsp+1B8h] [xbp+1B8h] BYREF
void *v169; // [xsp+1C8h] [xbp+1C8h]
__int64 v170[2]; // [xsp+1D0h] [xbp+1D0h] BYREF
void *v171; // [xsp+1E0h] [xbp+1E0h]
__int64 v172; // [xsp+1E8h] [xbp+1E8h] BYREF
size_t v173; // [xsp+1F0h] [xbp+1F0h]
void *v174; // [xsp+1F8h] [xbp+1F8h]
__int64 v175; // [xsp+200h] [xbp+200h] BYREF
size_t v176; // [xsp+208h] [xbp+208h]
void *v177; // [xsp+210h] [xbp+210h]
v136 = FLAlertLayer::init(this, 150);
if ( v136 )
{
v3 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v136);
cocos2d::CCDirector::getWinSize(&v158, v3);
v4 = 1;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v165, 0.0, 0.0, 80.0, 80.0);
v5 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v165);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 912LL))(v5, 0xFFFFFFFFLL);
v6 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v5 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v165, 420.0, 280.0);
v6(v5, v165);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v5,
0xFFFFFFFFLL);
v7 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v5 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, *(float *)&v158 * 0.5, *((float *)&v158 + 1) * 0.5);
v7(v5, v165);
while ( 1 )
{
while ( 1 )
{
v9 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"dailyLevelCorner_001.png",
v8);
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v9,
8);
if ( v4 != 3 )
break;
cocos2d::CCSprite::setFlipX(v9, 1);
cocos2d::CCSprite::setFlipY(v9, 1);
v134 = 185.0;
LABEL_75:
++v4;
v135 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v9 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v165,
v134 + (float)(*(float *)&v158 * 0.5),
(float)(*((float *)&v158 + 1) * 0.5) + 115.0);
v135(v9, v165);
}
if ( v4 == 4 )
break;
if ( v4 == 2 )
{
cocos2d::CCSprite::setFlipY(v9, 1);
v134 = -185.0;
goto LABEL_75;
}
v10 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v9 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v165,
(float)(*(float *)&v158 * 0.5) + -185.0,
(float)(*((float *)&v158 + 1) * 0.5) + -115.0);
v10(v9, v165);
++v4;
}
cocos2d::CCSprite::setFlipX(v9, 1);
v11 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v9 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v165,
(float)(*(float *)&v158 * 0.5) + 185.0,
(float)(*((float *)&v158 + 1) * 0.5) + -115.0);
v11(v9, v165);
v137 = -1;
v139 = -1;
v145 = 0;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v159,
*(float *)&v158 * 0.5,
(float)((float)(*((float *)&v158 + 1) * 0.5) + 140.0) - 28.0);
v13 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"label_shards_001.png", v12);
v14 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v13 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, -80.0, 0.0);
cocos2d::CCPoint::operator+(v165, v159);
v14(v13, v165);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v13);
v16 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"label_of_001.png", v15);
v17 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v16 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, 4.0, 0.0);
cocos2d::CCPoint::operator+(v165, v159);
v17(v16, v165);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v16);
v19 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"label_power_001.png", v18);
v20 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v19 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, 85.0, 0.0);
cocos2d::CCPoint::operator+(v165, v159);
v20(v19, v165);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v19);
v21 = (cocos2d::CCDictionary *)cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v160,
*(float *)&v158 * 0.5,
(float)(*((float *)&v158 + 1) * 0.5) + 80.0);
v22 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v21);
*((_QWORD *)this + 83) = v22;
cocos2d::CCObject::retain(v22);
v24 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v23);
v25 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v24, 0, (__int64)this, (__int64)ShardsPage::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v25, 1.6);
v26 = cocos2d::CCMenu::create(v25, nullptr);
v27 = *(float *)&v158;
*((_QWORD *)this + 69) = v26;
v28 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v26 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v165,
(float)((float)(v27 * 0.5) + -210.0) + 10.0,
(float)((float)(*((float *)&v158 + 1) * 0.5) + 140.0) - 10.0);
v28(v26, v165);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 69),
10);
v138 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"playerSquare_001.png", v29);
LABEL_9:
v30 = vcvtms_s32_f32((float)((int)v145 / 3));
v144 = (cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey(*((cocos2d::CCDictionary **)this + 83), v30);
if ( !v144 )
{
v144 = (cocos2d::CCObject *)cocos2d::CCArray::create(nullptr);
cocos2d::CCDictionary::setObject(*((cocos2d::CCDictionary **)this + 83), v144, v30);
}
v166[0] = 0;
v166[1] = 0;
v167 = nullptr;
v170[0] = 0;
v170[1] = 0;
v168[0] = 0;
v168[1] = 0;
v169 = nullptr;
v171 = nullptr;
LOBYTE(v147) = -1;
BYTE2(v147) = -1;
LOWORD(v148) = -1;
BYTE2(v148) = -1;
v149 = -1;
v150 = -1;
v151 = -1;
v152 = -1;
v153 = -1;
v154 = -1;
std::string::__init(v170, &byte_11B8890, 0);
switch ( v145 )
{
case 1u:
std::string::assign(v166, "iceShardLabel_001.png");
v130 = std::string::assign(v168, "iceShardSmall_001.png");
v131 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v130);
Stat = GameStatsManager::getStat(v131, "19");
v140 = Stat;
LOWORD(v147) = -27136;
LOBYTE(v148) = 0;
v149 = 100;
v150 = -1;
v151 = -1;
v152 = 0;
v153 = -1;
v154 = -1;
std::string::assign(v170, "shardIce");
goto LABEL_65;
case 2u:
std::string::assign(v166, "poisonShardLabel_001.png");
v128 = std::string::assign(v168, "poisonShardSmall_001.png");
v129 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v128);
Stat = GameStatsManager::getStat(v129, "17");
v140 = Stat;
LOWORD(v147) = -24576;
BYTE2(v147) = 0;
LOBYTE(v148) = 0;
BYTE2(v148) = 0;
v149 = 75;
v150 = -1;
v151 = 75;
v152 = 0;
v153 = -1;
v154 = 0;
std::string::assign(v170, "shardPoison");
goto LABEL_65;
case 3u:
std::string::assign(v166, "shadowShardLabel_001.png");
v126 = std::string::assign(v168, "shadowShardSmall_001.png");
v127 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v126);
LOWORD(v147) = 150;
Stat = GameStatsManager::getStat(v127, "16");
v140 = Stat;
BYTE2(v147) = -56;
BYTE1(v148) = 50;
v149 = -1;
v150 = 100;
v151 = -1;
v152 = -1;
v153 = 0;
v154 = -1;
std::string::assign(v170, "shardShadow");
goto LABEL_65;
case 4u:
std::string::assign(v166, "lavaShardLabel_001.png");
v123 = std::string::assign(v168, "lavaShardSmall_001.png");
v124 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v123);
Stat = GameStatsManager::getStat(v124, "20");
v140 = Stat;
LOWORD(v147) = 175;
BYTE2(v147) = 0;
BYTE1(v148) = 50;
BYTE2(v148) = 25;
v149 = -1;
v150 = 50;
v151 = 50;
v152 = -1;
v153 = 0;
v154 = 0;
std::string::assign(v170, "shardLava");
LABEL_65:
v33 = Stat < v139;
goto LABEL_13;
case 5u:
std::string::assign(v166, "bonusShardLabel_001.png");
std::string::assign(v168, "bonusShardSmall_001.png");
LOWORD(v147) = -26986;
BYTE2(v147) = -106;
std::string::assign(v170, "shardBonus");
v140 = v139;
if ( v139 == -1 )
goto LABEL_63;
break;
case 6u:
std::string::assign(v166, "shard0201ShardLabel_001.png");
v121 = std::string::assign(v168, "shard0201ShardSmall_001.png");
v122 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v121);
LOWORD(v147) = 25251;
BYTE2(v147) = 70;
v140 = GameStatsManager::getStat(v122, "23");
LOWORD(v148) = -7939;
BYTE2(v148) = -96;
std::string::assign(v170, "shardEarth");
v116 = v140 < v137;
goto LABEL_56;
case 7u:
std::string::assign(v166, "shard0202ShardLabel_001.png");
v119 = std::string::assign(v168, "shard0202ShardSmall_001.png");
v120 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v119);
v115 = GameStatsManager::getStat(v120, "24");
v140 = v115;
LOWORD(v147) = 150;
BYTE2(v147) = 0;
BYTE1(v148) = 0;
BYTE2(v148) = 0;
std::string::assign(v170, "shardBlood");
goto LABEL_55;
case 8u:
std::string::assign(v166, "shard0203ShardLabel_001.png");
v117 = std::string::assign(v168, "shard0203ShardSmall_001.png");
v118 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v117);
v115 = GameStatsManager::getStat(v118, "25");
v140 = v115;
LOWORD(v147) = -32640;
BYTE2(v147) = 0x80;
std::string::assign(v170, "shardMetal");
goto LABEL_55;
case 9u:
std::string::assign(v166, "shard0204ShardLabel_001.png");
v113 = std::string::assign(v168, "shard0204ShardSmall_001.png");
v114 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v113);
v115 = GameStatsManager::getStat(v114, "26");
v140 = v115;
BYTE1(v147) = -6;
BYTE2(v147) = 127;
BYTE2(v148) = -64;
std::string::assign(v170, "shardLight");
goto LABEL_55;
case 0xAu:
std::string::assign(v166, "shard0205ShardLabel_001.png");
v132 = std::string::assign(v168, "shard0205ShardSmall_001.png");
v133 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v132);
v115 = GameStatsManager::getStat(v133, "27");
v140 = v115;
LOWORD(v147) = 100;
BYTE2(v147) = -106;
BYTE1(v148) = 0;
BYTE2(v148) = 125;
std::string::assign(v170, "shardSoul");
LABEL_55:
v116 = v115 < v137;
LABEL_56:
if ( !v116 )
goto LABEL_57;
goto LABEL_58;
case 0xBu:
std::string::assign(v166, "bonusShardLabel_001.png");
std::string::assign(v168, "bonusShard2Small_001.png");
LOWORD(v147) = -26986;
BYTE2(v147) = -106;
std::string::assign(v170, "shardBonusB");
v140 = v137;
LABEL_57:
if ( v137 == -1 )
LABEL_58:
v137 = v140;
break;
default:
std::string::assign(v166, "fireShardLabel_001.png");
v31 = std::string::assign(v168, "fireShardSmall_001.png");
v32 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v31);
v140 = GameStatsManager::getStat(v32, "18");
BYTE1(v147) = 75;
BYTE2(v147) = 0;
BYTE1(v148) = -56;
BYTE2(v148) = 0;
v149 = -1;
v150 = -1;
v151 = 0;
v152 = -1;
v153 = -1;
v154 = 0;
std::string::assign(v170, "shardFire");
v33 = v140 < v139;
LABEL_13:
if ( v33 || v139 == -1 )
LABEL_63:
v139 = v140;
break;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, 0.0, (float)(int)(-3 * v30 + v145) * -77.0);
cocos2d::CCPoint::operator+(&v161, v160);
v34 = (cocos2d::CCSprite *)((char *)v166 + 1);
if ( (v166[0] & 1) != 0 )
v34 = (cocos2d::CCSprite *)v167;
v35 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v34, (const char *)LOBYTE(v166[0]));
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 73) + 456LL))(
*((_QWORD *)this + 73),
v35);
v36 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v35 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, -20.0, 0.0);
cocos2d::CCPoint::operator+(v165, &v161);
v36(v35, v165);
cocos2d::CCArray::addObject(v144, v35);
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)v140);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v37);
v40 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(CString, "bigFont.fnt", v39);
(*(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v40 + 160LL))(v40, 0.45);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 73) + 456LL))(
*((_QWORD *)this + 73),
v40);
v41 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v40 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, 0.0, 0.5);
v41(v40, v165);
v42 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v40 + 184LL);
v43 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v35 + 192LL))(v35);
v44 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v35 + 328LL))(v35);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, (float)(*v44 * 0.5) + 5.0, 1.0);
cocos2d::CCPoint::operator+(v165, v43);
v42(v40, v165);
cocos2d::CCArray::addObject(v144, v40);
v45 = (cocos2d::CCSprite *)((char *)v168 + 1);
if ( (v168[0] & 1) != 0 )
v45 = (cocos2d::CCSprite *)v169;
v46 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v45, (const char *)LOBYTE(v168[0]));
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 73) + 456LL))(
*((_QWORD *)this + 73),
v46);
v47 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v46 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, 0.0, 0.5);
v47(v46, v165);
v48 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v46 + 184LL);
v49 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v40 + 192LL))(v40);
(*(void (__fastcall **)(__int64 *__return_ptr, cocos2d::CCObject *))(*(_QWORD *)v40 + 336LL))(&v163, v40);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, *(float *)&v163 + 2.0, 0.0);
cocos2d::CCPoint::operator+(v165, v49);
v48(v46, v165);
cocos2d::CCArray::addObject(v144, v46);
v50 = 0;
v51 = 1;
while ( 1 )
{
v52 = (char *)v170 + 1;
v146 = *(_DWORD *)((char *)&unk_117AD50 + v50);
if ( (v170[0] & 1) != 0 )
v52 = (const char *)v171;
v53 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"geometry.ach.%s%02d",
v52,
v51);
v141 = (cocos2d::CCNode *)cocos2d::CCString::getCString(v53);
v172 = 0;
v173 = 0;
v174 = nullptr;
v54 = strlen((const char *)v141);
v55 = (GameManager *)std::string::__init(&v172, v141, v54);
v156 = 0;
v157 = 0;
v56 = GameManager::sharedState(v55);
v175 = 0;
v176 = 0;
v177 = nullptr;
if ( (v172 & 1) != 0 )
{
std::string::__init(&v175, v174, v173);
}
else
{
v177 = v174;
v175 = v172;
v176 = v173;
}
GameManager::getUnlockForAchievement(v56, (__int64)&v175, &v157, &v156);
if ( (v175 & 1) != 0 )
operator delete(v177);
if ( v156 <= 0 )
goto LABEL_36;
v57 = (GJItemIcon *)GJItemIcon::create(v156, v157, v147, v148, 0, 0, 0);
(*(void (__fastcall **)(GJItemIcon *, float))(*(_QWORD *)v57 + 160LL))(v57, 0.8);
if ( v140 < v146 )
{
GJItemIcon::changeToLockedState(v57, 1.25);
LOBYTE(v155) = 87;
*(_WORD *)((char *)&v155 + 1) = 7472;
GJItemIcon::darkenStoreItem((__int64)v57, v155);
}
v58 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(__int64)v57,
0,
(__int64)this,
(__int64)ShardsPage::onIconInfo,
0);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 69) + 456LL))(
*((_QWORD *)this + 69),
v58);
v59 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v58 + 320LL);
v60 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v138 + 328LL))(v138);
v59(v58, v60);
v61 = *(void (__fastcall **)(GJItemIcon *, __int64 *))(*(_QWORD *)v57 + 184LL);
v62 = *(float *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v58 + 328LL))(v58);
v63 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v58 + 328LL))(v58);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, v62 * 0.5, *(float *)(v63 + 4) * 0.5);
v61(v57, v165);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v58 + 72LL))(v58, v145);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, (float)(int)(v51 - 3) * 70.0, -30.0);
cocos2d::CCPoint::operator+(&v162, &v161);
v142 = *((cocos2d::CCNode **)this + 69);
v64 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v58 + 184LL);
cocos2d::CCNode::convertToWorldSpace(&v164, *((cocos2d::CCNode **)this + 73), (const cocos2d::CCPoint *)&v162);
cocos2d::CCNode::convertToNodeSpace(v165, v142, (const cocos2d::CCPoint *)&v164);
v64(v58, v165);
cocos2d::CCArray::addObject(v144, v58);
if ( v140 < v146 )
{
v102 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)v146);
v103 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v102);
v105 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v103, "bigFont.fnt", v104);
(*(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v105 + 160LL))(v105, 0.3);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 73) + 456LL))(
*((_QWORD *)this + 73),
v105);
v106 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v105 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, 0.0, 0.5);
v106(v105, v165);
v107 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v105 + 184LL);
if ( v146 > 9 )
v108 = -10.0;
else
v108 = -8.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, v108, -22.0);
cocos2d::CCPoint::operator+(v165, &v162);
v107(v105, v165);
(*(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_QWORD *)v105 + 1072LL))(v105, &v149);
cocos2d::CCArray::addObject(v144, v105);
v109 = (cocos2d::CCSprite *)((char *)v168 + 1);
if ( (v168[0] & 1) != 0 )
v109 = (cocos2d::CCSprite *)v169;
v110 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v109, (const char *)LOBYTE(v168[0]));
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 73) + 456LL))(
*((_QWORD *)this + 73),
v110);
(*(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v110 + 160LL))(v110, 0.7);
v111 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v110 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, 0.0, 0.5);
v111(v110, v165);
v112 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v110 + 184LL);
v143 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v105 + 192LL))(v105);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v105 + 336LL))(v105);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, *(float *)&v163 + 2.0, 0.0);
cocos2d::CCPoint::operator+(v165, v143);
v112(v110, v165);
cocos2d::CCArray::addObject(v144, v110);
}
if ( v51 == 1 )
goto LABEL_36;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, -51.0, 0.0);
cocos2d::CCPoint::operator+(&v163, &v162);
v66 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"whiteSquare20_001.png",
v65);
v67 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v66 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, 0.0, 0.5);
v67(v66, v165);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v66 + 184LL))(v66, &v163);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, _QWORD))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v66,
0);
v68 = *(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v66 + 128LL);
v69 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v66 + 328LL))(v66);
v68(v66, 32.0 / *v69);
v70 = *(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v66 + 144LL);
v71 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v66 + 328LL))(v66);
v70(v66, 5.0 / *(float *)(v71 + 4));
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v66 + 960LL))(v66, algn_117AD70);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v66 + 912LL))(v66, 110);
cocos2d::CCArray::addObject(v144, v66);
v72 = 0;
if ( v51 - 2 <= 3 )
v72 = *((_DWORD *)&unk_117AD50 + v51 + 10);
v73 = (float)(v140 - v72) / (float)(v146 - v72);
if ( v73 < 1.0 )
{
if ( v73 <= 0.0 )
goto LABEL_36;
}
else
{
v73 = 1.0;
}
v74 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"whiteSquare20_001.png",
(const char *)(unsigned int)v146);
v75 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v74 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v165, 0.0, 0.5);
v75(v74, v165);
v76 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v74 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, 2.0, 0.0);
cocos2d::CCPoint::operator+(v165, &v163);
v76(v74, v165);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v74,
1);
v77 = *(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v74 + 128LL);
v78 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v74 + 328LL))(v74);
v77(v74, (float)(v73 * 28.0) / *v78);
v79 = *(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v74 + 144LL);
v80 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v74 + 328LL))(v74);
v79(v74, 2.0 / *(float *)(v80 + 4));
(*(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_QWORD *)v74 + 960LL))(v74, &v152);
cocos2d::CCArray::addObject(v144, v74);
LABEL_36:
if ( (v172 & 1) != 0 )
operator delete(v174);
v50 += 4;
++v51;
if ( v50 == 20 )
{
if ( (v170[0] & 1) != 0 )
operator delete(v171);
if ( (v168[0] & 1) != 0 )
{
operator delete(v169);
if ( (v166[0] & 1) != 0 )
goto LABEL_72;
}
else
{
if ( (v166[0] & 1) == 0 )
goto LABEL_43;
LABEL_72:
operator delete(v167);
}
LABEL_43:
v81 = (cocos2d::CCMenu *)(v145 + 1);
v145 = (unsigned int)v81;
if ( (_DWORD)v81 == 12 )
{
v82 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v81);
v83 = *((float *)&v158 + 1) * 0.5;
v85 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v84);
v86 = CCMenuItemSpriteExtra::create(v85, 0, (__int64)this, (__int64)ShardsPage::onSwitchPage, 0);
*((_QWORD *)this + 84) = v86;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v82 + 456LL))(v82, v86);
v87 = *((cocos2d::CCDirector ***)this + 84);
v88 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v87 + 23);
v89 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v87);
cocos2d::CCDirector::getScreenLeft(v89);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, v90 + 24.0, v83);
cocos2d::CCNode::convertToNodeSpace(v165, v82, (const cocos2d::CCPoint *)&v164);
v88(v87, v165);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 84) + 72LL))(*((_QWORD *)this + 84), 0);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 84), 1.4);
v92 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v91);
cocos2d::CCSprite::setFlipX(v92, 1);
v93 = CCMenuItemSpriteExtra::create((__int64)v92, 0, (__int64)this, (__int64)ShardsPage::onSwitchPage, 0);
*((_QWORD *)this + 85) = v93;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v82 + 456LL))(v82, v93);
v94 = *((cocos2d::CCDirector ***)this + 85);
v95 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v94 + 23);
v96 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v94);
cocos2d::CCDirector::getScreenRight(v96);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v164, v97 - 24.0, v83);
cocos2d::CCNode::convertToNodeSpace(v165, v82, (const cocos2d::CCPoint *)&v164);
v95(v94, v165);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 85) + 72LL))(*((_QWORD *)this + 85), 1);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 85), 1.4);
(*(void (__fastcall **)(_QWORD, cocos2d::CCNode *, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v82,
10);
v99 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"tier1Icon_001.png", v98);
*((_QWORD *)this + 86) = v99;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v99,
10);
v100 = *((_QWORD *)this + 86);
v101 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v100 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v165,
(float)((float)(*(float *)&v158 * 0.5) + 210.0) - 18.0,
(float)((float)(*((float *)&v158 + 1) * 0.5) + 140.0) - 18.0);
v101(v100, v165);
ShardsPage::goToPage((__int64)this, 0);
return v136;
}
goto LABEL_9;
}
}
}
return v136;
}