//
// GJGarageLayer::init from 0x100352690 to 0x100354010 (6528 bytes)
//
// 2 xrefs:
// > GJGarageLayer::node @ 0x100352648
// > ??> @ 0x100b23878
//
// 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:51 +0000
//
__int64 __fastcall GJGarageLayer::init(__int64 *a1, __int64 a2)
{
__int64 *v2; // rbx
__int64 result; // rax
__int64 v4; // rdx
__int64 v5; // rax
__int64 v6; // rdx
double v7; // xmm0_8
__int64 v8; // rax
__int64 v9; // rax
float *v10; // r14
double v11; // xmm0_8
unsigned __int8 *v12; // r15
__int64 v13; // rdi
__int64 v14; // rax
double v15; // xmm0_8
double v16; // xmm0_8
char *v17; // r15
__int64 v18; // rdi
__int64 v19; // rax
double v20; // xmm0_8
double v21; // xmm0_8
unsigned __int8 *v22; // r14
__int64 v23; // rdi
__int64 v24; // rax
double v25; // xmm0_8
__int64 v26; // rax
const char *v27; // rcx
void *v28; // rax
void *v29; // rsi
_QWORD *v30; // r14
__int64 v31; // rax
double v32; // xmm0_8
__int64 v33; // rdi
__int64 v34; // r14
std::string *v35; // rsi
_QWORD *data; // rdi
__int64 v37; // rax
__int64 v38; // rdx
bool v39; // zf
__int64 v40; // rax
__int64 v41; // rdx
__int64 v42; // rax
_QWORD *v43; // r14
__int64 v44; // rax
__int64 v45; // rax
const char *v46; // r15
__int64 v47; // rbx
_QWORD *v48; // r14
__int64 v49; // rax
__int64 v50; // rax
const char *v51; // r15
size_t v52; // rax
size_t v53; // r12
char *v54; // r13
size_t v55; // r14
double v56; // xmm0_8
char *v57; // r14
_QWORD *v58; // rsi
unsigned __int64 *v59; // r15
size_t v60; // rax
size_t v61; // r12
char *v62; // r13
size_t v63; // r14
double v64; // xmm0_8
__int64 v65; // rax
char *v66; // r14
unsigned __int64 *v67; // r15
double v68; // xmm0_8
char *v69; // r14
__int64 v70; // rdx
__int64 v71; // rax
int v72; // r12d
int v73; // ebx
char *v74; // r15
__int64 *v75; // rbx
__int64 *v76; // rdi
char *v77; // rsi
__int64 v78; // rdx
_QWORD *v79; // r15
__int64 v80; // rax
__int64 v81; // r15
unsigned __int64 *v82; // r14
double v83; // xmm0_8
__int64 v84; // rdx
__int64 v85; // rdx
unsigned __int64 v86; // xmm0_8
__int64 v87; // rax
__int64 v88; // r14
__int64 v89; // rax
__int64 v90; // rsi
__int64 v91; // rdi
__int64 v92; // rdx
__int64 v93; // rax
__int64 v94; // rax
__int64 *v95; // r15
__int64 v96; // r14
__int64 v97; // rax
__int64 v98; // r14
__int64 v99; // rax
__int64 v100; // r14
__int64 v101; // rax
__int64 v102; // r14
__int64 v103; // rax
__int64 v104; // r14
__int64 v105; // rax
__int64 v106; // r14
__int64 v107; // rax
__int64 v108; // r14
__int64 v109; // rax
double v110; // xmm0_8
char *v111; // rax
_QWORD *v112; // r14
int v113; // edx
int v114; // ecx
int v115; // r8d
int v116; // r9d
__int64 v117; // rsi
__int64 v118; // rdi
__int64 v119; // rax
double v120; // xmm0_8
double v121; // xmm0_8
char *v122; // rax
char *v123; // r14
double v124; // xmm0_8
char *v125; // rax
void *v126; // r14
double v127; // xmm0_8
char *v128; // rax
void *v129; // r14
double v130; // xmm0_8
char *v131; // r14
__int64 v132; // rdi
__int64 v133; // rax
double v134; // xmm0_8
float v135; // xmm1_4
__m128 v136; // xmm0
__int64 v137; // rax
__int64 v138; // rax
__int64 CString; // rax
__int64 v140; // r12
unsigned __int64 *v141; // r13
char *v142; // r12
__int64 *v143; // r13
unsigned __int64 *v144; // rbx
__int64 v145; // rax
__int64 v146; // rax
__int64 v147; // rax
__int64 v148; // r14
unsigned __int64 *v149; // rbx
char *v150; // r14
__int64 *v151; // r13
unsigned __int64 *v152; // rbx
__int64 v153; // rax
__int64 v154; // rax
__int64 v155; // rax
__int64 v156; // r12
unsigned __int64 *v157; // rbx
char *v158; // r12
__int64 *v159; // r13
unsigned __int64 *v160; // rbx
__int64 v161; // rax
__int64 v162; // rax
__int64 v163; // rax
__int64 v164; // r14
unsigned __int64 *v165; // rbx
char *v166; // r14
__int64 *v167; // r13
unsigned __int64 *v168; // rbx
__int64 v169; // rax
__int64 v170; // rax
__int64 v171; // rax
__int64 v172; // r12
unsigned __int64 *v173; // rbx
char *v174; // r12
__int64 *v175; // r13
unsigned __int64 *v176; // rbx
__int64 v177; // rax
__int64 v178; // rax
__int64 v179; // rax
__int64 v180; // r14
unsigned __int64 *v181; // rbx
char *v182; // r14
__int64 *v183; // r13
unsigned __int64 *v184; // rbx
__int64 v185; // rax
__int64 v186; // rax
__int64 v187; // rax
__int64 v188; // r12
unsigned __int64 *v189; // rbx
__int64 v190; // rdx
double v191; // xmm0_8
__int64 v192; // rax
char *v193; // rbx
void *v194; // r14
__int64 v195; // rdi
__int64 v196; // rax
double v197; // xmm0_8
unsigned __int64 v198; // [rsp+0h] [rbp-C0h] BYREF
__int64 v199; // [rsp+8h] [rbp-B8h]
std::string v200; // [rsp+10h] [rbp-B0h] BYREF
_QWORD __dst[2]; // [rsp+28h] [rbp-98h] BYREF
void *v202; // [rsp+38h] [rbp-88h]
_QWORD v203[2]; // [rsp+40h] [rbp-80h] BYREF
void *v204; // [rsp+50h] [rbp-70h]
float v205; // [rsp+58h] [rbp-68h] BYREF
float v206; // [rsp+5Ch] [rbp-64h]
__int64 *v207; // [rsp+60h] [rbp-60h]
float v208[2]; // [rsp+68h] [rbp-58h]
unsigned __int8 v209; // [rsp+73h] [rbp-4Dh]
unsigned __int64 v210; // [rsp+74h] [rbp-4Ch] BYREF
float v211; // [rsp+7Ch] [rbp-44h]
char __s[16]; // [rsp+80h] [rbp-40h] BYREF
void *v213; // [rsp+90h] [rbp-30h]
v2 = a1;
result = cocos2d::CCLayer::init(a1);
if ( !(_BYTE)result )
return result;
v209 = result;
GameManager::sharedState(a1, a2, v4);
*(_BYTE *)(v5 + 584) = 1;
*(_QWORD *)&v7 = GameManager::sharedState(a1, a2, v6).u64[0];
*(_DWORD *)(v8 + 708) = 0;
(*(void (__fastcall **)(__int64 *, __int64, double))(*a1 + 1072))(a1, 1, v7);
(*(void (__fastcall **)(__int64 *, __int64))(*a1 + 1088))(a1, 1);
v9 = cocos2d::CCDirector::sharedDirector(a1, 1);
cocos2d::CCDirector::getWinSize(&v205, v9);
v211 = v206 * 0.5;
v10 = (float *)cocos2d::CCSprite::create_1((__int64)"GJ_gradientBG.png");
sub_100278250((float *)__s, 0.0, 0.0);
(*(void (__fastcall **)(float *, char *))(*(_QWORD *)v10 + 296LL))(v10, __s);
(*(void (__fastcall **)(__int64 *, float *, __int64))(*a1 + 464))(a1, v10, 4294967294LL);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v10 + 128LL))(v10, (float)(v205 + 10.0) / v10[108]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v10 + 144LL))(v10, (float)(v206 + 10.0) / v10[109]);
sub_100278250((float *)__s, -5.0, -5.0);
(*(void (__fastcall **)(float *, char *))(*(_QWORD *)v10 + 184LL))(v10, __s);
memset(__s, 150, 3);
v11 = (*(double (__fastcall **)(float *, char *))(*(_QWORD *)v10 + 960LL))(v10, __s);
v12 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png", v11);
sub_100278250((float *)__s, 0.0, 1.0);
(*(void (__fastcall **)(unsigned __int8 *, char *))(*(_QWORD *)v12 + 296LL))(v12, __s);
v13 = cocos2d::CCDirector::sharedDirector(v12, __s);
v208[0] = sub_100479760(v13) + -1.0;
v14 = cocos2d::CCDirector::sharedDirector(v13, __s);
v15 = sub_100479740(v14);
sub_100278250((float *)__s, v208[0], *(float *)&v15 + 1.0);
(*(void (__fastcall **)(unsigned __int8 *, char *))(*(_QWORD *)v12 + 184LL))(v12, __s);
cocos2d::CCSprite::setFlipY(v12, 1u);
v16 = (*(double (__fastcall **)(__int64 *, unsigned __int8 *, __int64))(*v2 + 464))(v2, v12, 0xFFFFFFFFLL);
v17 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png", v16);
sub_100278250((float *)__s, 0.0, 0.0);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v17 + 296LL))(v17, __s);
v18 = cocos2d::CCDirector::sharedDirector(v17, __s);
v208[0] = sub_100479760(v18) + -1.0;
v19 = cocos2d::CCDirector::sharedDirector(v18, __s);
v20 = sub_100479750(v19);
sub_100278250((float *)__s, v208[0], *(float *)&v20 + -1.0);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v17 + 184LL))(v17, __s);
v21 = (*(double (__fastcall **)(__int64 *, char *, __int64))(*v2 + 464))(v2, v17, 1);
v22 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png", v21);
sub_100278250((float *)__s, 1.0, 0.0);
(*(void (__fastcall **)(unsigned __int8 *, char *))(*(_QWORD *)v22 + 296LL))(v22, __s);
v23 = cocos2d::CCDirector::sharedDirector(v22, __s);
v208[0] = sub_100479770(v23) + 1.0;
v24 = cocos2d::CCDirector::sharedDirector(v23, __s);
v25 = sub_100479750(v24);
sub_100278250((float *)__s, v208[0], *(float *)&v25 + -1.0);
(*(void (__fastcall **)(unsigned __int8 *, char *))(*(_QWORD *)v22 + 184LL))(v22, __s);
cocos2d::CCSprite::setFlipX(v22, 1u);
(*(void (__fastcall **)(__int64 *, unsigned __int8 *, __int64))(*v2 + 464))(v2, v22, 1);
v26 = GJAccountManager::sharedState((__int64)v2, (__int64)v22);
v27 = "goldFont.fnt";
if ( *(_DWORD *)(v26 + 352) == *(_DWORD *)(v26 + 356) )
v27 = "bigFont.fnt";
v28 = CCTextInputNode::create((__int64)"Player", (__int64)"Thonburi", 0x18u, (__int64)v27, 180.0, 50.0);
v2[58] = (__int64)v28;
v29 = v28;
(*(void (__fastcall **)(__int64 *, void *, __int64))(*v2 + 464))(v2, v28, 20);
v30 = (_QWORD *)v2[58];
v30[73] = v2 + 51;
v208[0] = v205 * 0.5;
v31 = cocos2d::CCDirector::sharedDirector(v2, v29);
v32 = sub_100479740(v31);
sub_100278250((float *)__s, v208[0], *(float *)&v32 + -34.0);
(*(void (__fastcall **)(_QWORD *, char *))(*v30 + 184LL))(v30, __s);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v2[58] + 576) + 344LL))(*(_QWORD *)(v2[58] + 576), 0);
v33 = v2[58];
*(_DWORD *)(v33 + 592) = 15;
CCTextInputNode::setLabelPlaceholderColor(v33, 15772280);
CCTextInputNode::setLabelPlaceholderScale(v2[58], 0.69999999);
v34 = v2[58];
v200.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u);
v200.__r_.__value_.__r.__words[0] = 65;
v200.__r_.__value_.__l.__size_ = 62;
strcpy(v200.__r_.__value_.__l.__data_, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
v35 = &v200;
data = (_QWORD *)v34;
CCTextInputNode::setAllowedChars(v34, &v200);
if ( (*(_BYTE *)&v200.__r_.__value_.__s.0 & 1) != 0 )
{
data = v200.__r_.__value_.__l.__data_;
operator delete(v200.__r_.__value_.__l.__data_);
}
v37 = GJAccountManager::sharedState((__int64)data, (__int64)&v200);
v39 = *(_DWORD *)(v37 + 352) == *(_DWORD *)(v37 + 356);
v207 = v2;
if ( v39 )
{
GameManager::sharedState(data, &v200, v38);
if ( (*(_BYTE *)(v40 + 632) & 1) != 0 )
{
v35 = *(std::string **)(v40 + 648);
data = __s;
sub_10001AD30(__s, v35, *(_QWORD *)(v40 + 640));
}
else
{
v42 = v40 + 632;
v213 = *(void **)(v42 + 16);
*(_OWORD *)__s = *(_OWORD *)v42;
}
if ( (__s[0] & 1) != 0 )
{
v47 = *(_QWORD *)&__s[8];
data = v213;
operator delete(v213);
v39 = v47 == 0;
v2 = v207;
if ( v39 )
{
LABEL_49:
*(_QWORD *)&v64 = GameManager::sharedState(data, v35, v41).u64[0];
if ( !*(_BYTE *)(v65 + 929) )
{
v66 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_nameTxt_001.png", v64);
(*(void (__fastcall **)(__int64 *, char *))(*v2 + 456))(v2, v66);
v67 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2[58] + 192LL))(v2[58]);
sub_100278250((float *)&v210, 115.0, 10.0);
sub_100278350((double *)__s, v67, &v210);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v66 + 184LL))(v66, __s);
}
goto LABEL_51;
}
}
else
{
v2 = v207;
if ( !((unsigned __int8)__s[0] >> 1) )
goto LABEL_49;
}
v48 = (_QWORD *)v2[58];
GameManager::sharedState(data, v35, v41);
if ( (*(_BYTE *)(v49 + 632) & 1) != 0 )
{
sub_10001AD30(__s, *(const void **)(v49 + 648), *(_QWORD *)(v49 + 640));
if ( (__s[0] & 1) == 0 )
goto LABEL_19;
}
else
{
v50 = v49 + 632;
v213 = *(void **)(v50 + 16);
*(_OWORD *)__s = *(_OWORD *)v50;
if ( (__s[0] & 1) == 0 )
{
LABEL_19:
v51 = &__s[1];
goto LABEL_37;
}
}
v51 = (const char *)v213;
LABEL_37:
v60 = strlen(v51);
if ( v60 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v61 = v60;
if ( v60 >= 0x17 )
{
*(_QWORD *)v208 = v48;
v63 = 26;
if ( (v60 | 7) != 0x17 )
v63 = (v60 | 7) + 1;
v62 = (char *)operator new(v63);
v204 = v62;
v203[0] = v63 | 1;
v203[1] = v61;
v48 = *(_QWORD **)v208;
}
else
{
LOBYTE(v203[0]) = 2 * v60;
v62 = (char *)v203 + 1;
if ( !v60 )
goto LABEL_45;
}
memmove(v62, v51, v61);
LABEL_45:
v62[v61] = 0;
v35 = (std::string *)v203;
data = v48;
CCTextInputNode::setString(v48, (__int64)v203);
if ( (v203[0] & 1) != 0 )
{
data = v204;
operator delete(v204);
}
if ( (__s[0] & 1) != 0 )
{
data = v213;
operator delete(v213);
}
goto LABEL_49;
}
v43 = (_QWORD *)v2[58];
v44 = GJAccountManager::sharedState((__int64)data, (__int64)&v200);
if ( (*(_BYTE *)(v44 + 328) & 1) != 0 )
{
sub_10001AD30(__s, *(const void **)(v44 + 344), *(_QWORD *)(v44 + 336));
if ( (__s[0] & 1) == 0 )
goto LABEL_11;
}
else
{
v45 = v44 + 328;
v213 = *(void **)(v45 + 16);
*(_OWORD *)__s = *(_OWORD *)v45;
if ( (__s[0] & 1) == 0 )
{
LABEL_11:
v46 = &__s[1];
goto LABEL_22;
}
}
v46 = (const char *)v213;
LABEL_22:
v52 = strlen(v46);
if ( v52 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v53 = v52;
if ( v52 >= 0x17 )
{
*(_QWORD *)v208 = v43;
v55 = 26;
if ( (v52 | 7) != 0x17 )
v55 = (v52 | 7) + 1;
v54 = (char *)operator new(v55);
v202 = v54;
__dst[0] = v55 | 1;
__dst[1] = v53;
v43 = *(_QWORD **)v208;
}
else
{
LOBYTE(__dst[0]) = 2 * v52;
v54 = (char *)__dst + 1;
if ( !v52 )
goto LABEL_30;
}
memmove(v54, v46, v53);
LABEL_30:
v54[v53] = 0;
CCTextInputNode::setString(v43, (__int64)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(v202);
if ( (__s[0] & 1) != 0 )
operator delete(v213);
v56 = (*(double (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v2[58] + 1000LL))(v2[58], 0);
v57 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_lockGray_001.png", v56);
(*(void (__fastcall **)(__int64 *, char *, __int64))(*v2 + 464))(v2, v57, 2);
v58 = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v2[58] + 600) + 328LL))(*(_QWORD *)(v2[58] + 600));
sub_100278630(__s, v58);
v59 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2[58] + 192LL))(v2[58]);
sub_100278250((float *)&v198, (float)(*(float *)__s * 0.5) + 8.0, 10.0);
sub_100278350((double *)&v210, v59, &v198);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v57 + 184LL))(v57, &v210);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v57 + 160LL))(v57, 0.60000002);
LABEL_51:
*(_QWORD *)&v68 = LODWORD(v211);
v211 = v211 + 50.0;
*(float *)&v68 = v211;
v69 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"floorLine_001.png", v68);
(*(void (__fastcall **)(__int64 *, char *, _QWORD))(*v2 + 464))(v2, v69, 0);
sub_100278250((float *)__s, v205 * 0.5, v211);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v69 + 184LL))(v69, __s);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v69 + 1080LL))(v69, 0x100000302LL);
GameManager::sharedState(v69, 0x100000302LL, v70);
v72 = *(_DWORD *)(v71 + 716);
v73 = *(_DWORD *)(v71 + 720);
v74 = (char *)operator new(0x2A8u);
cocos2d::CCSprite::CCSprite((__int64)v74);
*(_QWORD *)v74 = off_100B23EF0;
*((_QWORD *)v74 + 40) = off_100B243D8;
*((_QWORD *)v74 + 43) = off_100B24458;
*((_DWORD *)v74 + 166) = 0;
v74[668] = 0;
v74[672] = 0;
*(_OWORD *)(v74 + 600) = 0;
*(_OWORD *)(v74 + 616) = 0;
*(_OWORD *)(v74 + 632) = 0;
*(_OWORD *)(v74 + 645) = 0;
if ( (unsigned __int8)SimplePlayer::init(v74, (unsigned int)(v72 - v73)) )
{
cocos2d::CCObject::autorelease(v74);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v74 + 16LL))(v74);
v74 = nullptr;
}
v75 = v207;
v207[59] = (__int64)v74;
v76 = v75;
v77 = v74;
(*(void (__fastcall **)(__int64 *, char *, _QWORD))(*v75 + 464))(v75, v74, 0);
v79 = (_QWORD *)v75[59];
if ( !v79[80] )
{
v93 = GJRobotSprite::create(1);
v79[80] = v93;
(*(void (__fastcall **)(_QWORD *, __int64))(*v79 + 456LL))(v79, v93);
v76 = (__int64 *)v79[80];
v77 = nullptr;
(*(void (__fastcall **)(__int64 *, _QWORD))(*v76 + 344))(v76, 0);
v79 = (_QWORD *)v75[59];
if ( v79[81] )
goto LABEL_56;
LABEL_59:
v94 = GJSpiderSprite::create(1);
v79[81] = v94;
(*(void (__fastcall **)(_QWORD *, __int64))(*v79 + 456LL))(v79, v94);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v79[81] + 344LL))(v79[81], 0);
v95 = (__int64 *)v79[81];
sub_100278250((float *)__s, 0.0, -1.5);
v76 = v95;
v77 = __s;
(*(void (__fastcall **)(__int64 *, char *))(*v95 + 184))(v95, __s);
v79 = (_QWORD *)v75[59];
goto LABEL_56;
}
if ( !v79[81] )
goto LABEL_59;
LABEL_56:
GameManager::sharedState(v76, v77, v78);
(*(void (__fastcall **)(_QWORD *, float))(*v79 + 160LL))(v79, flt_100A083B8[*(_DWORD *)(v80 + 916) == 8]);
v81 = v75[59];
v82 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v69 + 192LL))(v69);
v83 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v75[59] + 168LL))(v75[59]);
sub_100278250((float *)&v210, 0.0, (float)((float)(*(float *)&v83 * 30.0) * 0.5) + 1.0);
sub_100278350((double *)__s, v82, &v210);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v81 + 184LL))(v81, __s);
GJGarageLayer::updatePlayerColors(v75);
v86 = GameManager::sharedState(v75, __s, v84).u64[0];
switch ( *(_DWORD *)(v87 + 916) )
{
case 1:
v88 = v75[59];
v86 = GameManager::sharedState(v75, __s, v85).u64[0];
v90 = (unsigned int)(*(_DWORD *)(v89 + 728) - *(_DWORD *)(v89 + 732));
v91 = v88;
v92 = 1;
goto LABEL_67;
case 2:
v104 = v75[59];
v86 = GameManager::sharedState(v75, __s, v85).u64[0];
v90 = (unsigned int)(*(_DWORD *)(v105 + 740) - *(_DWORD *)(v105 + 744));
v91 = v104;
v92 = 2;
goto LABEL_67;
case 3:
v98 = v75[59];
v86 = GameManager::sharedState(v75, __s, v85).u64[0];
v90 = (unsigned int)(*(_DWORD *)(v99 + 752) - *(_DWORD *)(v99 + 756));
v91 = v98;
v92 = 3;
goto LABEL_67;
case 4:
v100 = v75[59];
v86 = GameManager::sharedState(v75, __s, v85).u64[0];
v90 = (unsigned int)(*(_DWORD *)(v101 + 764) - *(_DWORD *)(v101 + 768));
v91 = v100;
v92 = 4;
goto LABEL_67;
case 5:
v96 = v75[59];
v86 = GameManager::sharedState(v75, __s, v85).u64[0];
v90 = (unsigned int)(*(_DWORD *)(v97 + 776) - *(_DWORD *)(v97 + 780));
v91 = v96;
v92 = 5;
goto LABEL_67;
case 6:
v106 = v75[59];
v86 = GameManager::sharedState(v75, __s, v85).u64[0];
v90 = (unsigned int)(*(_DWORD *)(v107 + 788) - *(_DWORD *)(v107 + 792));
v91 = v106;
v92 = 6;
goto LABEL_67;
case 7:
v108 = v75[59];
v86 = GameManager::sharedState(v75, __s, v85).u64[0];
v90 = (unsigned int)(*(_DWORD *)(v109 + 800) - *(_DWORD *)(v109 + 804));
v91 = v108;
v92 = 7;
goto LABEL_67;
case 8:
v102 = v75[59];
v86 = GameManager::sharedState(v75, __s, v85).u64[0];
v90 = (unsigned int)(*(_DWORD *)(v103 + 884) - *(_DWORD *)(v103 + 888));
v91 = v102;
v92 = 8;
LABEL_67:
SimplePlayer::updatePlayerFrame(v91, v90, v92, *(double *)&v86);
break;
default:
break;
}
v110 = GJGarageLayer::setupIconSelect(v75, *(double *)&v86);
v111 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_03_001.png", v110);
v112 = CCMenuItemSpriteExtra::create((__int64)v111, 0, (__int64)v75, (__int64)GJGarageLayer::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v112, 1.6);
*(_QWORD *)v208 = v112;
v117 = sub_1008735E0((_DWORD)v112, 0, v113, v114, v115, v116);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(*v75 + 464))(v75, v117, 1);
v118 = cocos2d::CCDirector::sharedDirector(v75, v117);
v211 = sub_100479760(v118) + 24.0;
v119 = cocos2d::CCDirector::sharedDirector(v118, v117);
v120 = sub_100479740(v119);
sub_100278250((float *)__s, v211, *(float *)&v120 + -23.0);
v121 = (*(double (__fastcall **)(__int64, char *))(*(_QWORD *)v117 + 184LL))(v117, __s);
v122 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"shopRope_001.png", v121);
v123 = (char *)CCMenuItemSpriteExtra::create((__int64)v122, 0, (__int64)v75, (__int64)GJGarageLayer::onShop, 0);
CCMenuItemSpriteExtra::useAnimationType(v123, 1);
sub_100278250((float *)__s, 0.0, -15.0);
sub_100278300(v123 + 468, __s);
*(_QWORD *)(v123 + 476) = 0x3E99999A3E99999ALL;
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v117 + 456LL))(v117, v123);
sub_100278250((float *)&v210, (float)(v205 * 0.5) + -135.0, v206 + -25.0);
cocos2d::CCNode::convertToNodeSpace((double *)__s, v117, (unsigned int *)&v210);
v124 = (*(double (__fastcall **)(char *, char *))(*(_QWORD *)v123 + 184LL))(v123, __s);
v125 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_shardsBtn_001.png", v124);
v126 = CCMenuItemSpriteExtra::create((__int64)v125, 0, (__int64)v75, (__int64)GJGarageLayer::onShards, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v117 + 456LL))(v117, v126);
sub_100278250((float *)&v210, 30.0, v206 + -80.0);
cocos2d::CCNode::convertToNodeSpace((double *)__s, v117, (unsigned int *)&v210);
v127 = (*(double (__fastcall **)(void *, char *))(*(_QWORD *)v126 + 184LL))(v126, __s);
v128 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_paintBtn_001.png", v127);
v129 = CCMenuItemSpriteExtra::create((__int64)v128, 0, (__int64)v75, (__int64)GJGarageLayer::onPaint, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v117 + 456LL))(v117, v129);
sub_100278250((float *)&v210, 30.0, v206 + -120.0);
v199 = v117;
cocos2d::CCNode::convertToNodeSpace((double *)__s, v117, (unsigned int *)&v210);
v130 = (*(double (__fastcall **)(void *, char *))(*(_QWORD *)v129 + 184LL))(v129, __s);
v131 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_starsIcon_001.png", v130);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v131 + 160LL))(v131, 0.54000002);
(*(void (__fastcall **)(__int64 *, char *))(*v75 + 456))(v75, v131);
v132 = cocos2d::CCDirector::sharedDirector(v75, v131);
v211 = sub_100479770(v132) + -18.0;
v133 = cocos2d::CCDirector::sharedDirector(v132, v131);
v134 = sub_100479740(v133);
v135 = *(float *)&v134 + -12.0;
v136 = (__m128)LODWORD(v211);
sub_100278250((float *)__s, v211, v135);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v131 + 184LL))(v131, __s);
v137 = GameStatsManager::sharedState();
GameStatsManager::getStat(v137, "6", v136);
v138 = sub_10088E820("%i", v198);
CString = cocos2d::CCString::getCString(v138);
v140 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64))(*v75 + 456))(v75, v140);
sub_100278250((float *)__s, 1.0, 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v140 + 296LL))(v140, __s);
v141 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v131 + 192LL))(v131);
sub_100278250((float *)&v210, -12.0, 0.5);
sub_100278350((double *)__s, v141, &v210);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v140 + 184LL))(v140, __s);
*(double *)v136.i64 = (*(double (__fastcall **)(__int64, float))(*(_QWORD *)v140 + 160LL))(v140, 0.34);
v142 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_moonsIcon_001.png", *(double *)v136.i64);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v142 + 160LL))(v142, 0.54000002);
v143 = v207;
(*(void (__fastcall **)(__int64 *, char *))(*v207 + 456))(v207, v142);
v144 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v131 + 192LL))(v131);
sub_100278250((float *)&v210, 0.0, -15.0);
sub_100278350((double *)__s, v144, &v210);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v142 + 184LL))(v142, __s);
v145 = GameStatsManager::sharedState();
GameStatsManager::getStat(v145, "28", (__m128)0LL);
v146 = sub_10088E820("%i", v198);
v147 = cocos2d::CCString::getCString(v146);
v148 = cocos2d::CCLabelBMFont::create_3(v147, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64))(*v143 + 456))(v143, v148);
sub_100278250((float *)__s, 1.0, 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v148 + 296LL))(v148, __s);
v149 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v142 + 192LL))(v142);
sub_100278250((float *)&v210, -12.0, 0.5);
sub_100278350((double *)__s, v149, &v210);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v148 + 184LL))(v148, __s);
*(double *)v136.i64 = (*(double (__fastcall **)(__int64, float))(*(_QWORD *)v148 + 160LL))(v148, 0.34);
v150 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_coinsIcon_001.png", *(double *)v136.i64);
v151 = v207;
(*(void (__fastcall **)(__int64 *, char *))(*v207 + 456))(v207, v150);
v152 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v142 + 192LL))(v142);
sub_100278250((float *)&v210, 0.0, -15.0);
sub_100278350((double *)__s, v152, &v210);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v150 + 184LL))(v150, __s);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v150 + 160LL))(v150, 0.51000005);
v153 = GameStatsManager::sharedState();
GameStatsManager::getStat(v153, "8", (__m128)0x3F028F5Du);
v154 = sub_10088E820("%i", v198);
v155 = cocos2d::CCString::getCString(v154);
v156 = cocos2d::CCLabelBMFont::create_3(v155, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64))(*v151 + 456))(v151, v156);
sub_100278250((float *)__s, 1.0, 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v156 + 296LL))(v156, __s);
v157 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v150 + 192LL))(v150);
sub_100278250((float *)&v210, -12.0, 0.5);
sub_100278350((double *)__s, v157, &v210);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v156 + 184LL))(v156, __s);
*(double *)v136.i64 = (*(double (__fastcall **)(__int64, float))(*(_QWORD *)v156 + 160LL))(v156, 0.34);
v158 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_coinsIcon2_001.png", *(double *)v136.i64);
v159 = v207;
(*(void (__fastcall **)(__int64 *, char *))(*v207 + 456))(v207, v158);
v160 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v150 + 192LL))(v150);
sub_100278250((float *)&v210, 0.0, -15.0);
sub_100278350((double *)__s, v160, &v210);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v158 + 184LL))(v158, __s);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v158 + 160LL))(v158, 0.51000005);
v161 = GameStatsManager::sharedState();
GameStatsManager::getStat(v161, "12", (__m128)0x3F028F5Du);
v162 = sub_10088E820("%i", v198);
v163 = cocos2d::CCString::getCString(v162);
v164 = cocos2d::CCLabelBMFont::create_3(v163, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64))(*v159 + 456))(v159, v164);
sub_100278250((float *)__s, 1.0, 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v164 + 296LL))(v164, __s);
v165 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v158 + 192LL))(v158);
sub_100278250((float *)&v210, -12.0, 0.5);
sub_100278350((double *)__s, v165, &v210);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v164 + 184LL))(v164, __s);
*(double *)v136.i64 = (*(double (__fastcall **)(__int64, float))(*(_QWORD *)v164 + 160LL))(v164, 0.34);
v166 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"currencyOrbIcon_001.png", *(double *)v136.i64);
v167 = v207;
(*(void (__fastcall **)(__int64 *, char *))(*v207 + 456))(v207, v166);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v166 + 160LL))(v166, 0.54000002);
v168 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v158 + 192LL))(v158);
sub_100278250((float *)&v210, 0.0, -15.0);
sub_100278350((double *)__s, v168, &v210);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v166 + 184LL))(v166, __s);
v169 = GameStatsManager::sharedState();
GameStatsManager::getStat(v169, "14", (__m128)0LL);
v170 = sub_10088E820("%i", v198);
v171 = cocos2d::CCString::getCString(v170);
v172 = cocos2d::CCLabelBMFont::create_3(v171, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64))(*v167 + 456))(v167, v172);
sub_100278250((float *)__s, 1.0, 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v172 + 296LL))(v172, __s);
v173 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v166 + 192LL))(v166);
sub_100278250((float *)&v210, -12.0, 0.5);
sub_100278350((double *)__s, v173, &v210);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v172 + 184LL))(v172, __s);
*(double *)v136.i64 = (*(double (__fastcall **)(__int64, float))(*(_QWORD *)v172 + 160LL))(v172, 0.34);
v174 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_diamondsIcon_001.png", *(double *)v136.i64);
v175 = v207;
(*(void (__fastcall **)(__int64 *, char *))(*v207 + 456))(v207, v174);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v174 + 160LL))(v174, 0.60000002);
v176 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v166 + 192LL))(v166);
sub_100278250((float *)&v210, 0.0, -15.0);
sub_100278350((double *)__s, v176, &v210);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v174 + 184LL))(v174, __s);
v177 = GameStatsManager::sharedState();
GameStatsManager::getStat(v177, "13", (__m128)0LL);
v178 = sub_10088E820("%i", v198);
v179 = cocos2d::CCString::getCString(v178);
v180 = cocos2d::CCLabelBMFont::create_3(v179, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64))(*v175 + 456))(v175, v180);
sub_100278250((float *)__s, 1.0, 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v180 + 296LL))(v180, __s);
v181 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v174 + 192LL))(v174);
sub_100278250((float *)&v210, -12.0, 0.5);
sub_100278350((double *)__s, v181, &v210);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v180 + 184LL))(v180, __s);
*(double *)v136.i64 = (*(double (__fastcall **)(__int64, float))(*(_QWORD *)v180 + 160LL))(v180, 0.34);
v182 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"currencyDiamondIcon_001.png", *(double *)v136.i64);
v183 = v207;
(*(void (__fastcall **)(__int64 *, char *))(*v207 + 456))(v207, v182);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v182 + 160LL))(v182, 0.54000002);
v184 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v174 + 192LL))(v174);
sub_100278250((float *)&v210, 0.0, -15.0);
sub_100278350((double *)__s, v184, &v210);
(*(void (__fastcall **)(char *, char *))(*(_QWORD *)v182 + 184LL))(v182, __s);
v185 = GameStatsManager::sharedState();
GameStatsManager::getStat(v185, "29", (__m128)0LL);
v186 = sub_10088E820("%i", v198);
v187 = cocos2d::CCString::getCString(v186);
v188 = cocos2d::CCLabelBMFont::create_3(v187, "bigFont.fnt");
(*(void (__fastcall **)(__int64 *, __int64))(*v183 + 456))(v183, v188);
sub_100278250((float *)__s, 1.0, 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v188 + 296LL))(v188, __s);
v189 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v182 + 192LL))(v182);
sub_100278250((float *)&v210, -12.0, 0.5);
sub_100278350((double *)__s, v189, &v210);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v188 + 184LL))(v188, __s);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v188 + 160LL))(v188, 0.34);
*(_QWORD *)&v191 = GameManager::sharedState(v188, __s, v190).u64[0];
if ( *(_DWORD *)(v192 + 660) != *(_DWORD *)(v192 + 664) )
{
v193 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_infoIcon_001.png", v191);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v193 + 160LL))(v193, 0.80000001);
v194 = CCMenuItemSpriteExtra::create((__int64)v193, 0, (__int64)v207, (__int64)GJGarageLayer::onInfo, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v194, 2.0);
v195 = cocos2d::CCDirector::sharedDirector(v194, 0);
v211 = sub_100479770(v195) + -15.0;
v196 = cocos2d::CCDirector::sharedDirector(v195, 0);
v197 = sub_100479740(v196);
sub_100278250((float *)&v210, v211, *(float *)&v197 + -15.0);
cocos2d::CCNode::convertToNodeSpace((double *)__s, v199, (unsigned int *)&v210);
v191 = (*(double (__fastcall **)(void *, char *))(*(_QWORD *)v194 + 184LL))(v194, __s);
}
if ( (unsigned __int8)PlatformToolbox::isControllerConnected(v191) )
GameToolbox::addBackButton(v207, *(_QWORD *)v208);
return v209;
}