//
// GJPathPage::init from 0x1002e9e00 to 0x1002eb6a1 (6305 bytes)
//
// 1 xrefs:
// > GJPathPage::create @ 0x1002e9889
//
// 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 12:28:23 +0000
//
__int64 __fastcall GJPathPage::init(__int64 a1, unsigned int a2, __int64 a3, double a4)
{
__int64 v4; // rax
unsigned __int8 isItemUnlocked; // bl
unsigned int v6; // r13d
__int64 v7; // rsi
__int64 v8; // rax
__int64 v9; // rcx
char *v10; // rbx
__m128i si128; // xmm0
int v12; // eax
__m128i v13; // xmm0
__m128i v14; // xmm0
__int64 v15; // r15
float v16; // xmm0_4
float v17; // xmm0_4
double v18; // xmm0_8
char *v19; // rax
void *v20; // rax
int v21; // ebx
int v22; // edx
int v23; // ecx
int v24; // r8d
int v25; // r9d
__int64 v26; // rbx
__int64 v27; // rbx
__int64 v28; // r14
__m128 v29; // xmm0
_QWORD *v30; // rbx
__int64 v31; // rax
__int64 v32; // rax
const char *CString; // r15
size_t v34; // rax
size_t v35; // r14
_BYTE *v36; // r12
__int64 v37; // r13
_BYTE *v38; // rdi
size_t v39; // r13
const char *v40; // r14
char *v41; // r15
size_t v42; // rax
size_t v43; // r15
char *v44; // r12
size_t v45; // r13
float v46; // xmm0_4
float v47; // xmm1_4
float v48; // xmm2_4
float *v49; // rax
double v50; // xmm0_8
double v51; // xmm0_8
char *v52; // r14
float *v53; // rax
__m128 v54; // xmm0
__int64 v55; // rax
unsigned int v56; // ebx
int StatFromKey; // r15d
__int64 v58; // rax
char *v59; // rbx
float *v60; // rax
__int64 v61; // rax
unsigned int i; // r15d
const char *v63; // rsi
__int64 v64; // rax
const char *v65; // r14
const char *v66; // rdi
size_t v67; // rax
__int64 v68; // rdx
size_t v69; // r12
char *v70; // r13
size_t v71; // rbx
unsigned __int64 v72; // xmm0_8
__int64 v73; // rax
__int64 v74; // r14
int v75; // edi
int v76; // esi
__int64 v77; // r14
float v78; // xmm0_4
__int64 v79; // rax
__int64 v80; // rbx
void *v81; // r12
__int64 v82; // rax
__int64 v83; // rax
char v84; // r13
__int64 v85; // rax
char *v86; // rsi
__int64 v87; // r14
__int64 v88; // rbx
double v89; // xmm0_8
char *v90; // r14
float *v91; // rax
__int64 v92; // rax
char *v93; // r14
__int64 v94; // rax
bool v95; // zf
char *v96; // r14
__int64 v97; // rax
__int64 v98; // rax
__int64 v99; // rax
__int64 v100; // r15
double v101; // xmm0_8
char *v102; // r14
unsigned __int64 *v103; // r12
double v104; // xmm0_8
char *v105; // r15
unsigned __int64 *v106; // r14
_DWORD *v107; // rax
__int64 v108; // r14
int v109; // r12d
int v110; // r13d
__int64 v111; // rbx
__int64 v112; // xmm0_8
__int64 v113; // xmm1_8
double v114; // xmm2_8
char *v115; // rbx
__int64 v116; // r15
void *v117; // r14
__int64 v118; // r15
char *v119; // rdi
__int64 v120; // r14
float *v121; // rax
double v122; // xmm0_8
char *v123; // r15
unsigned __int64 *v124; // rbx
float v125; // xmm0_4
char *v126; // rbx
char v128; // [rsp+0h] [rbp-190h]
char v129; // [rsp+0h] [rbp-190h]
char v130[8]; // [rsp+0h] [rbp-190h]
__int64 v131; // [rsp+8h] [rbp-188h]
unsigned int v132; // [rsp+38h] [rbp-158h] BYREF
char *v133; // [rsp+40h] [rbp-150h]
_QWORD v134[2]; // [rsp+48h] [rbp-148h] BYREF
void *v135; // [rsp+58h] [rbp-138h]
__int128 v136; // [rsp+60h] [rbp-130h] BYREF
void *v137; // [rsp+70h] [rbp-120h]
unsigned __int64 v138; // [rsp+78h] [rbp-118h] BYREF
char v139; // [rsp+80h] [rbp-110h] BYREF
_BYTE v140[23]; // [rsp+81h] [rbp-10Fh] BYREF
char v141; // [rsp+98h] [rbp-F8h] BYREF
char v142[15]; // [rsp+99h] [rbp-F7h] BYREF
void *v143; // [rsp+A8h] [rbp-E8h]
char *v144; // [rsp+B0h] [rbp-E0h]
unsigned __int64 v145; // [rsp+BCh] [rbp-D4h] BYREF
float v146; // [rsp+C4h] [rbp-CCh]
float v147; // [rsp+C8h] [rbp-C8h]
int v148; // [rsp+CCh] [rbp-C4h]
float v149; // [rsp+D0h] [rbp-C0h]
float v150; // [rsp+D4h] [rbp-BCh]
const char *v151; // [rsp+D8h] [rbp-B8h]
unsigned __int64 v152; // [rsp+E0h] [rbp-B0h] BYREF
int v153; // [rsp+E8h] [rbp-A8h] BYREF
int v154; // [rsp+ECh] [rbp-A4h] BYREF
float v155; // [rsp+F0h] [rbp-A0h]
float v156; // [rsp+F4h] [rbp-9Ch]
_BYTE __dst[24]; // [rsp+F8h] [rbp-98h] BYREF
float v158; // [rsp+110h] [rbp-80h]
float v159; // [rsp+114h] [rbp-7Ch]
__int64 v160; // [rsp+118h] [rbp-78h]
float v161; // [rsp+120h] [rbp-70h] BYREF
float v162; // [rsp+124h] [rbp-6Ch]
__int128 v163; // [rsp+128h] [rbp-68h] BYREF
void *v164; // [rsp+138h] [rbp-58h]
unsigned __int64 v165; // [rsp+144h] [rbp-4Ch] BYREF
unsigned __int16 v166; // [rsp+14Ch] [rbp-44h] BYREF
unsigned __int8 v167; // [rsp+14Eh] [rbp-42h]
__int64 v168; // [rsp+150h] [rbp-40h]
int v169; // [rsp+158h] [rbp-38h]
int v170; // [rsp+15Ch] [rbp-34h]
unsigned __int8 v171; // [rsp+162h] [rbp-2Eh]
unsigned __int8 v172; // [rsp+163h] [rbp-2Dh]
signed __int32 v173[11]; // [rsp+164h] [rbp-2Ch] BYREF
*(_DWORD *)(a1 + 688) = a2;
*(_QWORD *)(a1 + 680) = a3;
memset(__dst, 75, 3);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a3 + 672) + 960LL))(*(_QWORD *)(a3 + 672), __dst);
v151 = (const char *)a2;
v4 = GameStatsManager::sharedState();
isItemUnlocked = GameStatsManager::isItemUnlocked(v4, 12, a2 + 5);
FLAlertLayer::incrementForcePrio(a1);
*(_DWORD *)__dst = -1358954496;
v6 = cocos2d::CCLayerColor::initWithColor(a1, __dst);
if ( !(_BYTE)v6 )
return v6;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1000LL))(a1, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1);
v7 = cocos2d::CCDirector::sharedDirector(a1, 1);
cocos2d::CCDirector::getWinSize(&v161, v7);
v8 = cocos2d::CCLayer::create();
*(_QWORD *)(a1 + 584) = v8;
v9 = *(_QWORD *)a1;
v160 = a1;
(*(void (__fastcall **)(__int64, __int64))(v9 + 456))(a1, v8);
memset(v173, 50, 3);
v167 = 30;
v166 = 7710;
v172 = isItemUnlocked;
if ( isItemUnlocked )
{
v10 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"pathInnerBG_001.png", a4);
switch ( (int)v151 )
{
case 1:
BYTE2(v173[0]) = 74;
LOWORD(v173[0]) = -32001;
si128 = _mm_cvtsi32_si128(0x1C38u);
v169 = 19455;
v170 = 51455;
LOBYTE(v12) = 16;
break;
case 2:
BYTE2(v173[0]) = -49;
LOWORD(v173[0]) = -31429;
si128 = _mm_cvtsi32_si128(0x1D0Cu);
v169 = 16750080;
v170 = 16776960;
LOBYTE(v12) = 45;
break;
case 3:
BYTE2(v173[0]) = 56;
LOWORD(v173[0]) = -24503;
si128 = _mm_cvtsi32_si128(0x2310u);
v169 = 40960;
v170 = 65280;
LOBYTE(v12) = 12;
break;
case 4:
BYTE2(v173[0]) = -62;
LOWORD(v173[0]) = 20367;
si128 = _mm_cvtsi32_si128(0x111Fu);
v169 = 13107350;
v170 = 16724735;
LOBYTE(v12) = 42;
break;
case 5:
BYTE2(v173[0]) = 61;
LOWORD(v173[0]) = 19140;
si128 = _mm_cvtsi32_si128(0x102Bu);
v169 = 175;
v170 = 1651455;
LOBYTE(v12) = 13;
break;
case 6:
BYTE2(v173[0]) = 51;
LOWORD(v173[0]) = 21669;
si128 = _mm_cvtsi32_si128(0x1224u);
v169 = 4612771;
v170 = 10543357;
LOBYTE(v12) = 11;
break;
case 7:
BYTE2(v173[0]) = 34;
LOWORD(v173[0]) = 8934;
si128 = _mm_cvtsi32_si128(0x732u);
v169 = 150;
v170 = 255;
LOBYTE(v12) = 7;
break;
case 8:
BYTE2(v173[0]) = -52;
LOWORD(v173[0]) = -13108;
si128 = _mm_load_si128((const __m128i *)&xmmword_100A07A70);
v169 = 8421504;
v170 = 0xFFFFFF;
LOBYTE(v12) = 44;
break;
case 9:
BYTE2(v173[0]) = 79;
LOWORD(v173[0]) = -19713;
si128 = _mm_cvtsi32_si128(0x2738u);
v169 = 8387327;
v170 = 12648447;
LOBYTE(v12) = 17;
break;
case 10:
BYTE2(v173[0]) = -103;
LOWORD(v173[0]) = 17858;
si128 = _mm_cvtsi32_si128(0xF2Au);
v169 = 9830500;
v170 = 8192255;
LOBYTE(v12) = 33;
break;
default:
v13 = _mm_cvttps_epi32(_mm_mul_ps(_mm_cvtepi32_ps(_mm_cvtepu8_epi32(v173[0])), (__m128)xmmword_100A07AF0));
v14 = _mm_packus_epi32(v13, v13);
si128 = _mm_packus_epi16(v14, v14);
v12 = (int)(float)((float)BYTE2(v173[0]) * 0.22);
v169 = 9868950;
v170 = 0xFFFFFF;
break;
}
v167 = v12;
v166 = ((unsigned __int16)_mm_extract_epi8(si128, 1) << 8) | _mm_extract_epi8(si128, 0);
}
else
{
strcpy(__dst, "&pathInnerBG_001.png");
v10 = (char *)CCSpriteGrayscale::createWithSpriteFrameName(__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(*(void **)&__dst[16]);
CCSpriteWithHue::setEvenLuminance(v10, 2.5);
v169 = 9868950;
v170 = 0xFFFFFF;
}
v15 = v160;
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v10,
0xFFFFFFFFLL);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v10 + 160LL))(v10, 1.3);
sub_100278250((float *)__dst, v161 * 0.5, v162 * 0.5);
(*(void (__fastcall **)(char *, _BYTE *))(*(_QWORD *)v10 + 184LL))(v10, __dst);
LODWORD(v168) = *(_DWORD *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v10 + 328LL))(v10);
v16 = (*(float (__fastcall **)(char *))(*(_QWORD *)v10 + 168LL))(v10);
v158 = v16 * *(float *)&v168;
LODWORD(v168) = *(_DWORD *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v10 + 328LL))(v10) + 4);
v17 = (*(float (__fastcall **)(char *))(*(_QWORD *)v10 + 168LL))(v10);
v159 = v17 * *(float *)&v168;
v18 = (*(double (__fastcall **)(char *, signed __int32 *))(*(_QWORD *)v10 + 960LL))(v10, v173);
*(_DWORD *)(v15 + 640) = -1;
v19 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"backArrowPlain_01_001.png", v18);
v20 = CCMenuItemSpriteExtra::create((__int64)v19, 0, v15, (__int64)GJPathPage::onBack, 0);
v21 = (int)v20;
CCMenuItemSpriteExtra::setSizeMult((__int64)v20, 1.6);
v26 = sub_1008735E0(v21, 0, v22, v23, v24, v25);
*(_QWORD *)(v15 + 552) = v26;
v158 = v158 * 0.5;
v159 = v159 * 0.5;
sub_100278250((float *)__dst, (float)((float)(v161 * 0.5) - v158) + 12.0, (float)((float)(v162 * 0.5) + v159) + -12.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v26 + 184LL))(v26, __dst);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(v15 + 584) + 464LL))(
*(_QWORD *)(v15 + 584),
*(_QWORD *)(v15 + 552),
10);
v139 = 28;
strcpy(v140, "Paths of Power");
v135 = operator new(0xC8u);
v134[0] = 201;
v134[1] = 195;
strcpy(
(char *)v135,
"When you activate a path, Stars and Moons you collect will level up your Path. You c"
"an unlock multiple paths, but only one can be active at a time.");
v27 = InfoAlertButton::create(&v139, v134, 0.80000001);
if ( (v134[0] & 1) != 0 )
operator delete(v135);
if ( (v139 & 1) != 0 )
operator delete(*(void **)&v140[15]);
v28 = v160;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v160 + 552) + 456LL))(*(_QWORD *)(v160 + 552), v27);
v168 = *(_QWORD *)(v28 + 552);
v29 = (__m128)LODWORD(v161);
v29.f32[0] = (float)((float)(v161 * 0.5) + v158) + -14.0;
sub_100278250((float *)&v163, v29.f32[0], (float)((float)(v162 * 0.5) + v159) + -14.0);
cocos2d::CCNode::convertToNodeSpace((double *)__dst, v168, (unsigned int *)&v163);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v27 + 184LL))(v27, __dst);
LODWORD(v28) = *(_DWORD *)(v28 + 688);
v30 = operator new(0x258u);
__bzero(v30, 600);
cocos2d::CCSprite::CCSprite((__int64)v30);
*v30 = off_100B13050;
v30[40] = off_100B13538;
v30[43] = off_100B135B8;
if ( (unsigned __int8)GJPathSprite::init(v30, (unsigned int)v28) )
{
cocos2d::CCObject::autorelease(v30);
}
else
{
(*(void (__fastcall **)(_QWORD *))(*v30 + 16LL))(v30);
v30 = nullptr;
}
GJPathSprite::updateState((__int64)v30, v29);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v30,
1);
v31 = *v30;
v150 = 1.0;
(*(void (__fastcall **)(_QWORD *))(v31 + 160))(v30);
v32 = sub_10088E820("pathLabel_%02d_001.png", v128);
CString = (const char *)cocos2d::CCString::getCString(v32);
v34 = strlen(CString);
if ( v34 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v35 = v34;
v171 = v6;
if ( v34 >= 0x17 )
{
v39 = 26;
if ( (v34 | 7) != 0x17 )
v39 = (v34 | 7) + 1;
v36 = operator new(v39);
*(_QWORD *)&__dst[16] = v36;
*(_QWORD *)__dst = v39 + 1;
*(_QWORD *)&__dst[8] = v35;
v37 = v160;
LABEL_35:
memmove(v36, CString, v35);
v36[v35] = 0;
if ( v172 )
goto LABEL_30;
LABEL_36:
if ( (__dst[0] & 1) != 0 )
v40 = *(const char **)&__dst[16];
else
v40 = &__dst[1];
v42 = strlen(v40);
if ( v42 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v43 = v42;
if ( v42 >= 0x17 )
{
v45 = 26;
if ( (v42 | 7) != 0x17 )
v45 = (v42 | 7) + 1;
v44 = (char *)operator new(v45);
v164 = v44;
*(_QWORD *)&v163 = v45 | 1;
*((_QWORD *)&v163 + 1) = v43;
v37 = v160;
}
else
{
LOBYTE(v163) = 2 * v42;
v44 = (char *)&v163 + 1;
if ( !v42 )
goto LABEL_49;
}
memmove(v44, v40, v43);
LABEL_49:
v44[v43] = 0;
v41 = (char *)CCSpriteGrayscale::createWithSpriteFrameName(&v163);
if ( (v163 & 1) != 0 )
operator delete(v164);
if ( (unsigned int)((_DWORD)v151 - 2) >= 9 )
v46 = 3.0;
else
v46 = flt_100A07B6C[(_DWORD)v151 - 2];
CCSpriteWithHue::setEvenLuminance(v41, v46);
memset(&v163, 100, 3);
(*(void (__fastcall **)(char *, __int128 *))(*(_QWORD *)v41 + 960LL))(v41, &v163);
goto LABEL_55;
}
__dst[0] = 2 * v34;
v36 = &__dst[1];
v37 = v160;
if ( v34 )
goto LABEL_35;
__dst[1] = 0;
if ( !v172 )
goto LABEL_36;
LABEL_30:
if ( (__dst[0] & 1) != 0 )
v38 = *(_BYTE **)&__dst[16];
else
v38 = &__dst[1];
v41 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v38, COERCE_DOUBLE(1065353216));
LABEL_55:
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(v37 + 584) + 464LL))(*(_QWORD *)(v37 + 584), v41, 1);
sub_100278250((float *)&v138, v161 * 0.5, (float)((float)(v162 * 0.5) + v159) + -8.0);
LODWORD(v168) = *(_DWORD *)(*(__int64 (__fastcall **)(_QWORD *))(*v30 + 328LL))(v30);
v47 = *(float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v41 + 328LL))(v41);
v48 = *(float *)&v168 * 0.5;
*(float *)&v168 = (float)((float)(v47 + *(float *)&v168) + 10.0) * 0.5;
sub_100278250((float *)&v152, *(float *)&v168 - v48, 0.0);
sub_100278350((double *)&v163, &v138, &v152);
(*(void (__fastcall **)(_QWORD *, __int128 *))(*v30 + 184LL))(v30, &v163);
v49 = (float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v41 + 328LL))(v41);
sub_100278250((float *)&v152, (float)(*v49 * 0.5) - *(float *)&v168, -2.0);
sub_100278350((double *)&v163, &v138, &v152);
(*(void (__fastcall **)(char *, __int128 *))(*(_QWORD *)v41 + 184LL))(v41, &v163);
v155 = v161 * 0.5;
*(_QWORD *)&v50 = LODWORD(v162);
*(float *)&v50 = v162 * 0.5;
v156 = v162 * 0.5;
v133 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"playerSquare_001.png", v50);
*(_QWORD *)&v51 = LODWORD(v161);
*(float *)&v51 = (float)(v161 * 0.5) + -170.0;
sub_100278250((float *)&v152, *(float *)&v51, (float)((float)((float)(0.5 * v162) - v159) + 30.0) + 10.0);
v52 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"whiteSquare20_001.png", v51);
sub_100278250((float *)&v163, 0.0, 0.5);
(*(void (__fastcall **)(char *, __int128 *))(*(_QWORD *)v52 + 296LL))(v52, &v163);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v52 + 184LL))(v52, &v152);
(*(void (__fastcall **)(_QWORD, char *, _QWORD))(**(_QWORD **)(v37 + 584) + 464LL))(*(_QWORD *)(v37 + 584), v52, 0);
v53 = (float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v52 + 328LL))(v52);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v52 + 128LL))(v52, 340.0 / *v53);
v54 = (__m128)0x40A00000u;
v54.f32[0] = 5.0 / *(float *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v52 + 328LL))(v52) + 4);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v52 + 144LL))(v52, v54.f32[0]);
(*(void (__fastcall **)(char *, unsigned __int16 *))(*(_QWORD *)v52 + 960LL))(v52, &v166);
v55 = GameStatsManager::sharedState();
v56 = (_DWORD)v151 + 29;
StatFromKey = 1000;
if ( (int)GameStatsManager::getStatFromKey(v55, (unsigned int)((_DWORD)v151 + 29), v54) <= 999 )
{
v58 = GameStatsManager::sharedState();
StatFromKey = GameStatsManager::getStatFromKey(v58, v56, v54);
}
v149 = (float)StatFromKey / 1000.0;
LODWORD(v168) = fminf(v149, 1.0);
if ( *(float *)&v168 > 0.0 )
{
v59 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"whiteSquare20_001.png", 0.0);
sub_100278250((float *)&v163, 0.0, 0.5);
(*(void (__fastcall **)(char *, __int128 *))(*(_QWORD *)v59 + 296LL))(v59, &v163);
sub_100278250((float *)&v165, 2.0, 0.0);
sub_100278350((double *)&v163, &v152, &v165);
(*(void (__fastcall **)(char *, __int128 *))(*(_QWORD *)v59 + 184LL))(v59, &v163);
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(v37 + 584) + 464LL))(*(_QWORD *)(v37 + 584), v59, 1);
v60 = (float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v59 + 328LL))(v59);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v59 + 128LL))(v59, (float)(*(float *)&v168 * 336.0) / *v60);
v61 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v59 + 328LL))(v59);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v59 + 144LL))(v59, 2.0 / *(float *)(v61 + 4));
(*(void (__fastcall **)(char *, signed __int32 *))(*(_QWORD *)v59 + 960LL))(v59, v173);
}
v148 = StatFromKey;
v144 = v52;
v155 = v155 + -170.0;
v147 = (float)(v156 + 0.0) + 10.0;
v156 = (float)((float)(v156 + 0.0) + -17.0) + 10.0;
for ( i = 0; i != 11; ++i )
{
v63 = v151;
v64 = sub_10088E820("geometry.ach.path%02d.%02d", v129);
v65 = (const char *)cocos2d::CCString::getCString(v64);
v66 = v65;
v67 = strlen(v65);
if ( v67 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v69 = v67;
if ( v67 >= 0x17 )
{
v71 = (v67 | 7) + 1;
if ( (v67 | 7) == 0x17 )
v71 = 26;
v70 = (char *)operator new(v71);
v164 = v70;
*(_QWORD *)&v163 = v71 | 1;
*((_QWORD *)&v163 + 1) = v69;
LABEL_68:
v66 = v70;
v63 = v65;
memmove(v70, v65, v69);
goto LABEL_69;
}
LOBYTE(v163) = 2 * v67;
v70 = (char *)&v163 + 1;
if ( v67 )
goto LABEL_68;
LABEL_69:
v70[v69] = 0;
v153 = 0;
v154 = 0;
v72 = GameManager::sharedState(v66, v63, v68).u64[0];
v6 = v171;
v74 = v73;
if ( (v163 & 1) != 0 )
{
sub_10001AD30(&v136, v164, *((unsigned __int64 *)&v163 + 1));
}
else
{
v137 = v164;
v72 = v163;
v136 = v163;
}
GameManager::getUnlockForAchievement(v74, &v136, &v153, &v154);
if ( (v136 & 1) != 0 )
operator delete(v137);
v75 = v154;
if ( v154 )
{
v76 = v153;
}
else
{
v154 = 1;
v153 = 1;
v76 = 1;
v75 = 1;
}
LODWORD(v131) = 0xFFFFFF;
*(_DWORD *)v130 = 1;
v77 = GJItemIcon::create(v75, v76, v169, v170, 0, 1, *(_QWORD *)v130, v131);
if ( v77 )
{
v78 = GJItemIcon::scaleForType(1);
v79 = *(_QWORD *)v77;
*(float *)&v168 = v78;
(*(void (__fastcall **)(__int64, float))(v79 + 160))(v77, v78);
v80 = v160;
v81 = CCMenuItemSpriteExtra::create(v77, 0, v160, (__int64)GJPathPage::onIconInfo, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v80 + 552) + 456LL))(*(_QWORD *)(v80 + 552), v81);
v82 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v133 + 328LL))(v133);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v81 + 320LL))(v81, v82);
v146 = *(float *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v81 + 328LL))(v81);
v83 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v81 + 328LL))(v81);
sub_100278250((float *)&v165, v146 * 0.5, *(float *)(v83 + 4) * 0.5);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v77 + 184LL))(v77, &v165);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v81 + 72LL))(v81, i);
v84 = 1;
if ( ((i == 0) & v172) == 0 )
{
v85 = AchievementManager::sharedState(v81, i);
v86 = (char *)&v163 + 1;
if ( (v163 & 1) != 0 )
v86 = (char *)v164;
if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v85, v86) )
{
GJItemIcon::changeToLockedState(v77, 1.0 / *(float *)&v168);
GJItemIcon::darkenStoreItem(v77, (v167 << 16) | (unsigned int)v166);
v84 = 0;
}
}
v87 = *(_QWORD *)(v160 + 552);
v88 = *(_QWORD *)(v160 + 584);
*(float *)&v168 = (float)((float)(int)i * 34.0) + v155;
sub_100278250((float *)&v132, *(float *)&v168, v147);
cocos2d::CCNode::convertToWorldSpace((double *)&v145, v88, &v132);
cocos2d::CCNode::convertToNodeSpace((double *)&v165, v87, (unsigned int *)&v145);
v89 = (*(double (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v81 + 184LL))(v81, &v165);
v90 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"whiteSquare20_001.png", v89);
sub_100278250((float *)&v165, 0.5, 1.0);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v90 + 296LL))(v90, &v165);
sub_100278250((float *)&v165, *(float *)&v168, v156);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v90 + 184LL))(v90, &v165);
v91 = (float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v90 + 328LL))(v90);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v90 + 128LL))(v90, 1.5 / *v91);
v92 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v90 + 328LL))(v90);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v90 + 144LL))(v90, 16.0 / *(float *)(v92 + 4));
(*(void (__fastcall **)(char *, void *))(*(_QWORD *)v90 + 960LL))(v90, &unk_100A07B10);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v90 + 912LL))(v90, 25);
(*(void (__fastcall **)(_QWORD, char *, _QWORD))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v90,
0);
v93 = cocos2d::CCSprite::create_1((__int64)"smallDot.png");
v94 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v144 + 192LL))(v144);
v72 = (unsigned int)v168;
sub_100278250((float *)&v165, *(float *)&v168, *(float *)(v94 + 4));
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v93 + 184LL))(v93, &v165);
(*(void (__fastcall **)(char *, unsigned __int16 *))(*(_QWORD *)v93 + 960LL))(v93, &v166);
(*(void (__fastcall **)(_QWORD, char *, _QWORD))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v93,
0);
v95 = v84 == 0;
v6 = v171;
if ( !v95 )
{
v96 = cocos2d::CCSprite::create_1((__int64)"smallDot.png");
v97 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v144 + 192LL))(v144);
sub_100278250((float *)&v165, *(float *)&v168, *(float *)(v97 + 4));
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v96 + 184LL))(v96, &v165);
(*(void (__fastcall **)(char *, signed __int32 *))(*(_QWORD *)v96 + 960LL))(v96, v173);
v72 = 1060320051;
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v96 + 160LL))(v96, 0.69999999);
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v96,
1);
}
}
if ( (v163 & 1) != 0 )
operator delete(v164);
}
if ( v172 )
{
v98 = sub_10088E820("%i/%i", v129);
v99 = cocos2d::CCString::getCString(v98);
v100 = cocos2d::CCLabelBMFont::create_3(v99, "goldFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v100 + 160LL))(v100, 0.60000002);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v100,
1);
sub_100278250(
(float *)&v163,
(float)(v161 * 0.5) + -12.0,
(float)((float)((float)(0.5 * v162) - v159) + 12.0) + 7.0);
v101 = (*(double (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v100 + 184LL))(v100, &v163);
v102 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_starsIcon_001.png", v101);
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v102,
1);
v103 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v100 + 192LL))(v100);
LODWORD(v168) = *(_DWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v100 + 328LL))(v100);
*(float *)&v101 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v100 + 168LL))(v100);
*(float *)&v101 = (float)(*(float *)&v168 * *(float *)&v101) * 0.5 + 7.0;
sub_100278250((float *)&v165, *(float *)&v101, -1.5);
sub_100278350((double *)&v163, v103, &v165);
(*(void (__fastcall **)(char *, __int128 *))(*(_QWORD *)v102 + 184LL))(v102, &v163);
v104 = (*(double (__fastcall **)(char *, float))(*(_QWORD *)v102 + 160LL))(v102, 0.5);
v105 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_moonsIcon_001.png", v104);
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v105,
1);
v106 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v102 + 192LL))(v102);
sub_100278250((float *)&v165, 12.0, 0.0);
sub_100278350((double *)&v163, v106, &v165);
(*(void (__fastcall **)(char *, __int128 *))(*(_QWORD *)v105 + 184LL))(v105, &v163);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v105 + 160LL))(v105, 0.55000001);
if ( v149 < 1.0 )
{
v107 = (_DWORD *)GameStatsManager::sharedState();
GameStatsManager::trySelectActivePath(v107, (__m128)0x3F800000u);
v108 = v160;
v109 = *(_DWORD *)(v160 + 688);
v141 = 12;
strcpy(v142, "Active");
v110 = *(_DWORD *)(GameStatsManager::sharedState() + 916);
v168 = *(_QWORD *)(v108 + 552);
sub_100278250(
(float *)&v163,
(float)((float)(v161 * 0.5) - v158) + 17.0,
(float)((float)(0.5 * v162) - v159) + -8.0);
v111 = *(_QWORD *)(v108 + 584);
sub_100278250((float *)&v165, 6.0, 0.5);
v112 = 1058642330;
v113 = 1056964608;
*(_QWORD *)&v114 = 1120403456;
GameToolbox::createToggleButton(
(unsigned int)&v141,
(unsigned int)GJPathPage::onActivatePath,
0,
v110 == v109 + 29,
v168,
(unsigned int)&v163,
v108,
v111,
(__int64)&v165,
(__int64)"goldFont.fnt",
0,
0,
0);
v6 = v171;
if ( (v141 & 1) != 0 )
operator delete(v143);
goto LABEL_99;
}
}
else
{
v115 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_lock_001.png", *(double *)&v72);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v115 + 160LL))(v115, 1.2);
v116 = v160;
v117 = CCMenuItemSpriteExtra::create((__int64)v115, 0, v160, (__int64)GJPathPage::onUnlock, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v116 + 552) + 456LL))(*(_QWORD *)(v116 + 552), v117);
v118 = *(_QWORD *)(v116 + 552);
sub_100278250((float *)&v165, v161 * 0.5, (float)((float)(0.5 * v162) - v159) + 15.0);
cocos2d::CCNode::convertToNodeSpace((double *)&v163, v118, (unsigned int *)&v165);
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v117 + 184LL))(v117, &v163);
GameToolbox::pointsToString(&v163);
if ( (v163 & 1) != 0 )
v119 = (char *)v164;
else
v119 = (char *)&v163 + 1;
v120 = cocos2d::CCLabelBMFont::create_3(v119, "bigFont.fnt");
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v115 + 456LL))(v115, v120);
v121 = (float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v115 + 328LL))(v115);
sub_100278250((float *)&v165, (float)(*v121 * 0.5) + -4.0, -6.5);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v120 + 184LL))(v120, &v165);
v122 = (*(double (__fastcall **)(__int64, float))(*(_QWORD *)v120 + 160LL))(v120, 0.34999999);
v123 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"currencyOrbIcon_001.png", v122);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v115 + 456LL))(v115, v123);
v124 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v120 + 192LL))(v120);
LODWORD(v168) = *(_DWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v120 + 328LL))(v120);
v125 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v120 + 168LL))(v120);
*(_QWORD *)&v114 = (unsigned int)v168;
if ( (_DWORD)v151 != 4 )
v150 = 0.0;
*(float *)&v114 = (float)((float)((float)(*(float *)&v168 * 0.5) * v125) + 6.0) + v150;
v113 = 3204448256LL;
sub_100278250((float *)&v145, *(float *)&v114, -0.5);
sub_100278350((double *)&v165, v124, &v145);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v123 + 184LL))(v123, &v165);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v123 + 160LL))(v123, 0.5);
if ( (v163 & 1) != 0 )
operator delete(v164);
v112 = 1065353216;
if ( v149 < 1.0 )
{
LABEL_99:
v126 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"chestIcon_001.png", *(double *)&v112);
(*(void (__fastcall **)(_QWORD, char *, __int64, double, double, double))(**(_QWORD **)(v160 + 584) + 464LL))(
*(_QWORD *)(v160 + 584),
v126,
3,
*(double *)&v112,
*(double *)&v113,
v114);
(*(void (__fastcall **)(char *, unsigned __int16 *))(*(_QWORD *)v126 + 960LL))(v126, &v166);
sub_100278250((float *)&v163, (float)(v158 + (float)(v161 * 0.5)) + -28.5, *((float *)&v152 + 1));
(*(void (__fastcall **)(char *, __int128 *))(*(_QWORD *)v126 + 184LL))(v126, &v163);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v126 + 912LL))(v126, 200);
}
}
if ( (__dst[0] & 1) != 0 )
operator delete(*(void **)&__dst[16]);
return v6;
}