//
// LevelSearchLayer::init from 0x100704400 to 0x100706a31 (9777 bytes)
//
// 2 xrefs:
// > LevelSearchLayer::scene @ 0x1007042a1
// > LevelSearchLayer::create @ 0x1007043b8
//
// 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:36:01 +0000
//
bool __fastcall LevelSearchLayer::init(__int64 a1, int a2)
{
bool result; // al
_QWORD *v3; // rax
__int64 v4; // rax
float *v5; // rbx
double v6; // xmm0_8
char *v7; // r14
__int64 v8; // rax
__int64 v9; // rax
float v10; // xmm1_4
double v11; // xmm0_8
unsigned __int8 *v12; // rbx
__int64 v13; // rax
__int64 v14; // rax
float v15; // xmm1_4
__int64 v16; // rdx
__int64 v17; // rcx
__int64 v18; // rbx
__int64 v19; // rax
__int64 v20; // rax
float v21; // xmm1_4
double v22; // xmm0_8
char *v23; // r15
void *v24; // r15
double v25; // xmm0_8
char *v26; // r12
void *v27; // r14
unsigned __int64 *v28; // r15
_DWORD *v29; // r13
const char *v30; // rdi
char *v31; // r15
void *v32; // r15
unsigned __int64 *v33; // rbx
void *v34; // r14
void *v35; // r14
int v36; // r13d
const char *v37; // r14
__int64 v38; // rbx
__int64 v39; // r15
__int8 *v40; // r12
size_t v41; // rdx
__int8 *v42; // r15
__int8 *v43; // rdi
void *v44; // rax
_QWORD *v45; // rbx
_QWORD *v46; // r14
__int64 v47; // r14
__int64 v48; // r14
__int64 v49; // rbx
__int64 v50; // r14
__int64 v51; // rdi
__int64 v52; // rdx
__int64 v53; // rcx
__int64 v54; // rbx
double v55; // xmm0_8
char *v56; // rax
void *v57; // r14
double v58; // xmm0_8
char *v59; // rax
void *v60; // r14
double v61; // xmm0_8
__int64 v62; // rax
char *v63; // rax
void *v64; // r14
void *v65; // rbx
void *v66; // rbx
__int64 v67; // rdx
__int64 v68; // rcx
__int64 v69; // r15
char *v70; // r14
void *v71; // r13
char *v72; // r14
void *v73; // rbx
char *v74; // r14
__int64 v75; // rbx
unsigned __int64 *v76; // r12
void *v77; // rbx
char *v78; // r14
void *v79; // r14
char *v80; // r14
void *v81; // r14
char *v82; // r14
void *v83; // r14
char *v84; // r14
void *v85; // r14
char *v86; // r14
void *v87; // r12
__int64 v88; // rbx
unsigned __int64 *v89; // r13
void *v90; // r13
char *v91; // r14
void *v92; // rbx
void *v93; // rbx
void *v94; // rbx
__int64 v95; // rax
__int64 v96; // rdi
__int64 v97; // rdx
__int64 v98; // rcx
__int64 v99; // r12
__int64 v100; // rax
__int64 CString; // rax
char *v102; // rbx
void *v103; // rbx
__int64 v104; // rax
__int64 v105; // rax
char *v106; // rbx
void *v107; // rbx
__int64 v108; // rax
__int64 v109; // rax
char *v110; // rbx
void *v111; // rbx
__int64 v112; // rax
__int64 v113; // rax
char *v114; // rbx
void *v115; // rbx
__int64 v116; // rax
__int64 v117; // rax
char *v118; // rbx
void *v119; // rbx
__int64 v120; // rax
__int64 v121; // rax
char *v122; // rbx
void *v123; // rbx
__int64 v124; // rax
__int64 v125; // rax
char *v126; // rbx
void *v127; // r14
__int64 v128; // rax
char *v129; // rbx
void *v130; // rbx
__int64 v131; // xmm0_8
unsigned int v132; // ebx
__int64 v133; // rax
__int64 v134; // rax
char *v135; // rax
__int64 v136; // rbx
void *v137; // rax
__int64 v138; // rbx
void *v139; // rbx
__int64 v140; // xmm0_8
__int64 v141; // rax
__int64 (__fastcall **v142)(); // rdi
__int64 v143; // rdx
__int64 v144; // rcx
__int64 v145; // rbx
char *v146; // rax
void *v147; // r14
unsigned int i; // r12d
__int8 *v149; // rdi
void *v150; // r15
void *v151; // r15
char *v152; // rax
__int64 v153; // rdx
void *v154; // r14
char *v155; // rax
__int64 v156; // rdx
void *v157; // r14
__int64 v158; // xmm0_8
unsigned int v159; // r14d
__int64 v160; // rax
__int64 v161; // rax
char *v162; // rax
void *v163; // rbx
int v164; // edx
int v165; // ecx
int v166; // r8d
int v167; // r9d
__int64 v168; // r14
__int64 v169; // rax
__int64 v170; // rax
float v171; // xmm1_4
double v172; // xmm0_8
__int64 v173; // rax
unsigned __int8 v174; // al
__int64 v175; // rax
unsigned __int8 v176; // al
__int64 v177; // rax
unsigned __int8 v178; // al
__int64 v179; // rax
unsigned __int8 v180; // al
__int64 v181; // rax
unsigned __int8 v182; // al
__int64 v183; // rax
unsigned __int8 v184; // al
__int64 v185; // rax
unsigned __int8 v186; // al
__int64 v187; // rax
unsigned __int8 v188; // al
__int64 v189; // rax
unsigned __int8 v190; // al
__int64 v191; // rax
unsigned __int8 v192; // al
__int64 v193; // rax
unsigned __int8 v194; // al
__int64 v195; // rax
unsigned __int8 v196; // al
__int64 v197; // rax
unsigned __int8 v198; // al
__int64 v199; // rax
unsigned __int8 v200; // al
__int64 v201; // rax
char BoolForKey; // al
__int64 v203; // rdi
__int64 v204; // rax
char v205; // al
__int64 v206; // rdi
__int64 v207; // rbx
__int64 v208; // rax
const char *v209; // r14
size_t v210; // rax
size_t v211; // r15
__int8 *v212; // r12
size_t v213; // r13
void *v214; // rax
unsigned __int8 v215; // bl
bool v216; // r14
__int64 v217; // rax
unsigned int IntForKey; // eax
char v219; // [rsp+0h] [rbp-130h]
char v220; // [rsp+0h] [rbp-130h]
char v221; // [rsp+0h] [rbp-130h]
char v222; // [rsp+0h] [rbp-130h]
char v223; // [rsp+0h] [rbp-130h]
char v224; // [rsp+0h] [rbp-130h]
char v225; // [rsp+0h] [rbp-130h]
char v226; // [rsp+0h] [rbp-130h]
char v227; // [rsp+0h] [rbp-130h]
unsigned int v228; // [rsp+8h] [rbp-128h] BYREF
float v229; // [rsp+10h] [rbp-120h] BYREF
unsigned __int64 v230; // [rsp+18h] [rbp-118h] BYREF
void *v231; // [rsp+20h] [rbp-110h]
void *v232; // [rsp+28h] [rbp-108h]
void *v233; // [rsp+30h] [rbp-100h]
void *v234; // [rsp+38h] [rbp-F8h]
void *v235; // [rsp+40h] [rbp-F0h]
void *v236; // [rsp+48h] [rbp-E8h]
unsigned __int64 v237[2]; // [rsp+50h] [rbp-E0h] BYREF
std::string v238; // [rsp+60h] [rbp-D0h] BYREF
unsigned __int64 v239; // [rsp+78h] [rbp-B8h] BYREF
__int64 v240; // [rsp+80h] [rbp-B0h] BYREF
unsigned __int64 v241; // [rsp+88h] [rbp-A8h] BYREF
__int64 (__fastcall **v242)(); // [rsp+90h] [rbp-A0h]
__int64 (__fastcall **v243)(); // [rsp+98h] [rbp-98h]
__int64 v244; // [rsp+A0h] [rbp-90h] BYREF
unsigned __int64 v245; // [rsp+A8h] [rbp-88h] BYREF
__m128 __dst; // [rsp+B0h] [rbp-80h] BYREF
void *v247; // [rsp+C0h] [rbp-70h]
bool v248; // [rsp+CFh] [rbp-61h]
unsigned __int64 v249; // [rsp+D0h] [rbp-60h] BYREF
unsigned __int64 v250; // [rsp+D8h] [rbp-58h] BYREF
__int64 (__fastcall **v251)(); // [rsp+E0h] [rbp-50h]
__m128 v252; // [rsp+E8h] [rbp-48h] BYREF
void *v253; // [rsp+F8h] [rbp-38h]
__int64 v254; // [rsp+100h] [rbp-30h]
result = cocos2d::CCLayer::init((_WORD *)a1);
if ( !result )
return result;
v248 = result;
*(_DWORD *)(GameManager::sharedState() + 964) = -1;
*(_DWORD *)(GameManager::sharedState() + 968) = -1;
*(_DWORD *)(GameManager::sharedState() + 708) = 4;
*(_DWORD *)(a1 + 432) = a2;
*(_DWORD *)(GameManager::sharedState() + 1312) = a2;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1088LL))(a1, 1);
v3 = cocos2d::CCDictionary::create();
*(_QWORD *)(a1 + 480) = v3;
cocos2d::CCObject::retain((__int64)v3);
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v244, v4);
v5 = (float *)cocos2d::CCSprite::create_1((__int64)"GJ_gradientBG.png");
sub_100278250(__dst.f32, 0.0, 0.0);
(*(void (__fastcall **)(float *, __m128 *))(*(_QWORD *)v5 + 296LL))(v5, &__dst);
(*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v5, 4294967293LL);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v5 + 128LL))(v5, (float)(*(float *)&v244 + 10.0) / v5[108]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v5 + 144LL))(v5, (float)(*((float *)&v244 + 1) + 10.0) / v5[109]);
sub_100278250(__dst.f32, -5.0, -5.0);
(*(void (__fastcall **)(float *, __m128 *))(*(_QWORD *)v5 + 184LL))(v5, &__dst);
__dst.i8[2] = -1;
__dst.i16[0] = 26112;
v6 = (*(double (__fastcall **)(float *, __m128 *))(*(_QWORD *)v5 + 960LL))(v5, &__dst);
v7 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png", v6);
sub_100278250(__dst.f32, 0.0, 0.0);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v7 + 296LL))(v7, &__dst);
v8 = cocos2d::CCDirector::sharedDirector();
*(float *)&v254 = sub_100479760(v8) + -1.0;
v9 = cocos2d::CCDirector::sharedDirector();
v10 = sub_100479750(v9) + -1.0;
sub_100278250(__dst.f32, *(float *)&v254, v10);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v7 + 184LL))(v7, &__dst);
v11 = (*(double (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v7, 1);
v12 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png", v11);
sub_100278250(__dst.f32, 1.0, 0.0);
(*(void (__fastcall **)(unsigned __int8 *, __m128 *))(*(_QWORD *)v12 + 296LL))(v12, &__dst);
v13 = cocos2d::CCDirector::sharedDirector();
*(float *)&v254 = sub_100479770(v13) + 1.0;
v14 = cocos2d::CCDirector::sharedDirector();
v15 = sub_100479750(v14) + -1.0;
sub_100278250(__dst.f32, *(float *)&v254, v15);
(*(void (__fastcall **)(unsigned __int8 *, __m128 *))(*(_QWORD *)v12 + 184LL))(v12, &__dst);
cocos2d::CCSprite::setFlipX(v12, 1u);
(*(void (__fastcall **)(__int64, unsigned __int8 *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v12, 1);
sub_100278270((__int64)v237, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v18 = cocos2d::CCMenu::create(v237, v12, v16, v17);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v18, 2);
v19 = cocos2d::CCDirector::sharedDirector();
*(float *)&v254 = sub_100479770(v19) + -25.0;
v20 = cocos2d::CCDirector::sharedDirector();
v21 = sub_100479740(v20) + -25.0;
*(_QWORD *)&v22 = (unsigned int)v254;
sub_100278250((float *)&v228, *(float *)&v254, v21);
v23 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_closeBtn_001.png", v22);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v23 + 160LL))(v23, 0.80000001);
v24 = CCMenuItemSpriteExtra::create((__int64)v23, 0, a1, (__int64)LevelSearchLayer::confirmClearFilters, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v18 + 456LL))(v18, v24);
cocos2d::CCNode::convertToNodeSpace((double *)__dst.i64, v18, &v228);
v25 = (*(double (__fastcall **)(void *, __m128 *))(*(_QWORD *)v24 + 184LL))(v24, &__dst);
v26 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_plusBtn_001.png", v25);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v26 + 160LL))(v26, 0.80000001);
v27 = CCMenuItemSpriteExtra::create((__int64)v26, 0, a1, (__int64)LevelSearchLayer::onMoreOptions, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v18 + 456LL))(v18, v27);
CCMenuItemSpriteExtra::setSizeMult((__int64)v27, 1.5);
v254 = a1;
if ( *(_DWORD *)(a1 + 432) == 1 )
{
memset(&__dst, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v26 + 960LL))(v26, &__dst);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v27 + 1056LL))(v27, 0);
}
v28 = (unsigned __int64 *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v24 + 192LL))(v24);
sub_100278250(v252.f32, 0.0, -50.0);
sub_100278350((double *)__dst.i64, v28, (unsigned __int64 *)&v252);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v27 + 184LL))(v27, &__dst);
v29 = (_DWORD *)v254;
v30 = "GJ_viewLevelsBtn_001.png";
if ( !*(_DWORD *)(v254 + 432) )
v30 = "GJ_viewListsBtn_001.png";
v31 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v30, 0.0);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v31 + 160LL))(v31, 0.80000001);
v32 = CCMenuItemSpriteExtra::create((__int64)v31, 0, (__int64)v29, (__int64)LevelSearchLayer::onSearchMode, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v18 + 456LL))(v18, v32);
v33 = (unsigned __int64 *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v27 + 192LL))(v27);
sub_100278250(v252.f32, 0.0, -50.0);
sub_100278350((double *)__dst.i64, v33, (unsigned __int64 *)&v252);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v32 + 184LL))(v32, &__dst);
sub_100278250((float *)&v239, *(float *)&v244 * 0.5, (float)(0.5 * *((float *)&v244 + 1)) + 130.0);
sub_1002787F0(&__dst, v237);
v34 = cocos2d::extension::CCScale9Sprite::create_2((__int64)"square02b_001.png", (unsigned __int64 *)&__dst);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v34 + 912LL))(v34, 255);
sub_100278260((float *)&v240, 365.0, 40.0);
(*(void (__fastcall **)(void *, __int64 *))(*(_QWORD *)v34 + 320LL))(v34, &v240);
(*(void (__fastcall **)(_DWORD *, void *, __int64))(*(_QWORD *)v29 + 464LL))(v29, v34, 4294967294LL);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v34 + 184LL))(v34, &v239);
__dst.i8[2] = -115;
__dst.i16[0] = 14336;
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v34 + 960LL))(v34, &__dst);
sub_100278270((__int64)&__dst, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u);
v35 = cocos2d::extension::CCScale9Sprite::create_2((__int64)"square02b_small.png", (unsigned __int64 *)&__dst);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v35 + 912LL))(v35, 255);
sub_100278260(&v229, 210.0, 30.0);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v35 + 320LL))(v35, &v229);
(*(void (__fastcall **)(_DWORD *, void *, __int64))(*(_QWORD *)v29 + 464LL))(v29, v35, 0xFFFFFFFFLL);
sub_100278250(v252.f32, -73.0, 0.0);
sub_100278350((double *)__dst.i64, &v239, (unsigned __int64 *)&v252);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v35 + 184LL))(v35, &__dst);
__dst.i8[2] = 98;
__dst.i16[0] = 9984;
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v35 + 960LL))(v35, &__dst);
v36 = v29[108];
v37 = "Enter a level, user or id";
v38 = 25;
if ( v36 == 1 )
v37 = "Enter a list or id";
v39 = 25;
if ( v36 == 1 )
{
v39 = 18;
__dst.i8[0] = 36;
v40 = &__dst.i8[1];
v38 = 18;
}
else
{
v40 = (__int8 *)operator new(0x20u);
v247 = v40;
__dst.i64[0] = 33;
__dst.i64[1] = 25;
}
v41 = v39;
v42 = &__dst.i8[1];
memcpy(v40, v37, v41);
v40[v38] = 0;
v43 = &__dst.i8[1];
if ( v36 != 1 )
v43 = (__int8 *)v247;
v44 = CCTextInputNode::create((__int64)v43, (__int64)"Thonburi", 0x18u, (__int64)"bigFont.fnt", 194.0, 50.0);
v45 = (_QWORD *)v254;
*(_QWORD *)(v254 + 440) = v44;
(*(void (__fastcall **)(_QWORD *, void *, __int64))(*v45 + 464LL))(v45, v44, 20);
v46 = (_QWORD *)v45[55];
v46[73] = v45 + 51;
sub_100278250((float *)&v245, -174.0, 0.0);
sub_100278350((double *)v252.i64, &v239, &v245);
(*(void (__fastcall **)(_QWORD *, __m128 *))(*v46 + 184LL))(v46, &v252);
v47 = *(_QWORD *)(*(_QWORD *)(v254 + 440) + 576LL);
sub_100278250(v252.f32, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v47 + 296LL))(v47, &v252);
v48 = *(_QWORD *)(*(_QWORD *)(v254 + 440) + 600LL);
sub_100278250(v252.f32, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v48 + 296LL))(v48, &v252);
v49 = v254;
CCTextInputNode::setMaxLabelScale(*(_QWORD *)(v254 + 440), 0.69999999);
CCTextInputNode::setMaxLabelWidth(*(_QWORD *)(v49 + 440), 194.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(v49 + 440) + 576LL) + 344LL))(
*(_QWORD *)(*(_QWORD *)(v49 + 440) + 576LL),
0);
v50 = *(_QWORD *)(v49 + 440);
*(_DWORD *)(v50 + 592) = 20;
v238.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u);
v238.__r_.__value_.__r.__words[0] = 65;
v238.__r_.__value_.__l.__size_ = 63;
strcpy(v238.__r_.__value_.__l.__data_, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
CCTextInputNode::setAllowedChars(v50, &v238);
if ( (*(_BYTE *)&v238.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v238.__r_.__value_.__l.__data_);
if ( (__dst.i8[0] & 1) != 0 )
v42 = (__int8 *)v247;
v51 = v254;
LevelSearchLayer::updateSearchLabel(v254, v42);
v54 = cocos2d::CCMenu::create(v51, v42, v52, v53);
v55 = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)v254 + 456LL))(v254, v54);
v56 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_longBtn06_001.png", v55);
v57 = CCMenuItemSpriteExtra::create((__int64)v56, 0, v254, (__int64)LevelSearchLayer::onSearch, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v54 + 456LL))(v54, v57);
sub_100278250((float *)&v249, 63.0, 0.0);
sub_100278350((double *)&v245, &v239, &v249);
cocos2d::CCNode::convertToNodeSpace((double *)v252.i64, v54, (unsigned int *)&v245);
v58 = (*(double (__fastcall **)(void *, __m128 *))(*(_QWORD *)v57 + 184LL))(v57, &v252);
v59 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_longBtn05_001.png", v58);
v60 = CCMenuItemSpriteExtra::create((__int64)v59, 0, v254, (__int64)LevelSearchLayer::onSearchUser, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v54 + 456LL))(v54, v60);
*(_QWORD *)&v61 = 1121714176;
sub_100278250((float *)&v249, 110.0, 0.0);
sub_100278350((double *)&v245, &v239, &v249);
cocos2d::CCNode::convertToNodeSpace((double *)v252.i64, v54, (unsigned int *)&v245);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v60 + 184LL))(v60, &v252);
v62 = GameManager::sharedState();
if ( GameManager::safeModeEnabled(v62) )
{
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v60 + 344LL))(v60, 0);
v61 = (*(double (__fastcall **)(void *, _QWORD))(*(_QWORD *)v60 + 1056LL))(v60, 0);
}
v63 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_longBtn07_001.png", v61);
v64 = CCMenuItemSpriteExtra::create((__int64)v63, 0, v254, (__int64)LevelSearchLayer::onClearFreeSearch, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v54 + 456LL))(v54, v64);
sub_100278250((float *)&v249, 157.0, 0.0);
sub_100278350((double *)&v245, &v239, &v249);
cocos2d::CCNode::convertToNodeSpace((double *)v252.i64, v54, (unsigned int *)&v245);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v64 + 184LL))(v64, &v252);
sub_100278250((float *)&v245, *(float *)&v244 * 0.5, (float)(0.5 * *((float *)&v244 + 1)) + 28.0);
v65 = cocos2d::CCLabelBMFont::create_3((__int64)"Quick Search", (__int64)"bigFont.fnt");
sub_100278250((float *)&v249, 0.0, 69.5);
sub_100278350((double *)v252.i64, &v245, &v249);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v65 + 184LL))(v65, &v252);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v254 + 456LL))(v254, v65);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v65 + 160LL))(v65, 0.5);
sub_1002787F0(&v252, v237);
v66 = cocos2d::extension::CCScale9Sprite::create_2((__int64)"square02b_001.png", (unsigned __int64 *)&v252);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v66 + 912LL))(v66, 255);
sub_100278260(v252.f32, 365.0, 115.0);
sub_100278660(&v240, &v252);
(*(void (__fastcall **)(void *, __int64 *))(*(_QWORD *)v66 + 320LL))(v66, &v240);
(*(void (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)v254 + 464LL))(v254, v66, 0xFFFFFFFFLL);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v66 + 184LL))(v66, &v245);
v252.i8[2] = 117;
v252.i16[0] = 11776;
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v66 + 960LL))(v66, &v252);
v69 = cocos2d::CCMenu::create(v66, &v252, v67, v68);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v254 + 456LL))(v254, v69);
cocos2d::CCNode::convertToNodeSpace((double *)&v249, v69, (unsigned int *)&v245);
v70 = (char *)operator new(0x268u);
__bzero(v70, 616);
cocos2d::CCSprite::CCSprite((__int64)v70);
v242 = off_100B98F90;
*(_QWORD *)v70 = off_100B98F90;
v243 = off_100B99478;
*((_QWORD *)v70 + 40) = off_100B99478;
v251 = off_100B994F8;
*((_QWORD *)v70 + 43) = off_100B994F8;
*(_OWORD *)(v70 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(
v70,
"GJ_longBtn04_001.png",
"Downloads",
"GJ_sDownloadIcon_001.png",
0.43000001,
1.1) )
{
cocos2d::CCObject::autorelease((__int64)v70);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v70 + 16LL))(v70);
v70 = nullptr;
}
v71 = CCMenuItemSpriteExtra::create((__int64)v70, 0, v254, (__int64)sub_100707480, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v71);
v72 = (char *)operator new(0x268u);
__bzero(v72, 616);
cocos2d::CCSprite::CCSprite((__int64)v72);
*(_QWORD *)v72 = v242;
*((_QWORD *)v72 + 40) = v243;
*((_QWORD *)v72 + 43) = v251;
*(_OWORD *)(v72 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(v72, "GJ_longBtn04_001.png", "Likes", "GJ_sLikeIcon_001.png", 0.5, 1.1) )
{
cocos2d::CCObject::autorelease((__int64)v72);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v72 + 16LL))(v72);
v72 = nullptr;
}
v73 = CCMenuItemSpriteExtra::create((__int64)v72, 0, v254, (__int64)sub_1007074F0, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v73);
v74 = (char *)operator new(0x268u);
__bzero(v74, 616);
cocos2d::CCSprite::CCSprite((__int64)v74);
*(_QWORD *)v74 = v242;
*((_QWORD *)v74 + 40) = v243;
*((_QWORD *)v74 + 43) = v251;
*(_OWORD *)(v74 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(v74, "GJ_longBtn04_001.png", "Hyped", "particle_228_001.png", 0.5, 1.1) )
{
cocos2d::CCObject::autorelease((__int64)v74);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v74 + 16LL))(v74);
v74 = nullptr;
}
v231 = v73;
v75 = *((_QWORD *)v74 + 76);
v76 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v75 + 192LL))(v75);
sub_100278250((float *)&v250, -1.0, 1.0);
sub_100278350((double *)v252.i64, v76, &v250);
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v75 + 184LL))(v75, &v252);
v77 = CCMenuItemSpriteExtra::create((__int64)v74, 0, v254, (__int64)sub_100707560, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v77);
v78 = (char *)operator new(0x268u);
__bzero(v78, 616);
cocos2d::CCSprite::CCSprite((__int64)v78);
*(_QWORD *)v78 = v242;
*((_QWORD *)v78 + 40) = v243;
*((_QWORD *)v78 + 43) = v251;
*(_OWORD *)(v78 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(v78, "GJ_longBtn04_001.png", "Trending", "GJ_sTrendingIcon_001.png", 0.5, 1.1) )
{
cocos2d::CCObject::autorelease((__int64)v78);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v78 + 16LL))(v78);
v78 = nullptr;
}
v79 = CCMenuItemSpriteExtra::create((__int64)v78, 0, v254, (__int64)sub_1007075D0, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v79);
v232 = v79;
v80 = (char *)operator new(0x268u);
__bzero(v80, 616);
cocos2d::CCSprite::CCSprite((__int64)v80);
*(_QWORD *)v80 = v242;
*((_QWORD *)v80 + 40) = v243;
*((_QWORD *)v80 + 43) = v251;
*(_OWORD *)(v80 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(v80, "GJ_longBtn04_001.png", "Recent", "GJ_sRecentIcon_001.png", 0.5, 1.1) )
{
cocos2d::CCObject::autorelease((__int64)v80);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v80 + 16LL))(v80);
v80 = nullptr;
}
v81 = CCMenuItemSpriteExtra::create((__int64)v80, 0, v254, (__int64)sub_100707640, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v81);
v233 = v81;
v82 = (char *)operator new(0x268u);
__bzero(v82, 616);
cocos2d::CCSprite::CCSprite((__int64)v82);
*(_QWORD *)v82 = v242;
*((_QWORD *)v82 + 40) = v243;
*((_QWORD *)v82 + 43) = v251;
*(_OWORD *)(v82 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(v82, "GJ_longBtn04_001.png", "Magic", "GJ_sMagicIcon_001.png", 0.5, 1.1) )
{
cocos2d::CCObject::autorelease((__int64)v82);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v82 + 16LL))(v82);
v82 = nullptr;
}
v83 = CCMenuItemSpriteExtra::create((__int64)v82, 0, v254, (__int64)sub_1007076B0, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v83);
v235 = v83;
v84 = (char *)operator new(0x268u);
__bzero(v84, 616);
cocos2d::CCSprite::CCSprite((__int64)v84);
*(_QWORD *)v84 = v242;
*((_QWORD *)v84 + 40) = v243;
*((_QWORD *)v84 + 43) = v251;
*(_OWORD *)(v84 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(v84, "GJ_longBtn04_001.png", "Awarded", "GJ_sStarsIcon_001.png", 0.5, 1.1) )
{
cocos2d::CCObject::autorelease((__int64)v84);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v84 + 16LL))(v84);
v84 = nullptr;
}
v85 = CCMenuItemSpriteExtra::create((__int64)v84, 0, v254, (__int64)sub_100707720, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v85);
v236 = v85;
v86 = (char *)operator new(0x268u);
__bzero(v86, 616);
cocos2d::CCSprite::CCSprite((__int64)v86);
*(_QWORD *)v86 = v242;
*((_QWORD *)v86 + 40) = v243;
*((_QWORD *)v86 + 43) = v251;
*(_OWORD *)(v86 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(v86, "GJ_longBtn04_001.png", "Followed", "GJ_followIcon_001.png", 0.5, 0.71249998) )
{
cocos2d::CCObject::autorelease((__int64)v86);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v86 + 16LL))(v86);
v86 = nullptr;
}
v234 = v77;
v87 = v71;
v88 = *((_QWORD *)v86 + 76);
v89 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v88 + 192LL))(v88);
sub_100278250((float *)&v250, -2.5, 0.5);
sub_100278350((double *)v252.i64, v89, &v250);
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v88 + 184LL))(v88, &v252);
v90 = CCMenuItemSpriteExtra::create((__int64)v86, 0, v254, (__int64)LevelSearchLayer::onFriends, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v90);
v91 = (char *)operator new(0x268u);
__bzero(v91, 616);
cocos2d::CCSprite::CCSprite((__int64)v91);
*(_QWORD *)v91 = v242;
*((_QWORD *)v91 + 40) = v243;
*((_QWORD *)v91 + 43) = v251;
*(_OWORD *)(v91 + 600) = 0;
if ( (unsigned __int8)sub_1007097C0(v91, "GJ_longBtn04_001.png", "Friends", "GJ_sFriendsIcon_001.png", 0.5, 1.1) )
{
cocos2d::CCObject::autorelease((__int64)v91);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v91 + 16LL))(v91);
v91 = nullptr;
}
v92 = CCMenuItemSpriteExtra::create((__int64)v91, 0, v254, (__int64)LevelSearchLayer::onStarAward, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v69 + 456LL))(v69, v92);
sub_100278250((float *)&v250, -119.0, 36.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v87 + 184LL))(v87, &v252);
sub_100278250((float *)&v250, 0.0, 36.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v231 + 184LL))(v231, &v252);
sub_100278250((float *)&v250, 119.0, 36.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v234 + 184LL))(v234, &v252);
sub_100278250((float *)&v250, -119.0, 0.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v232 + 184LL))(v232, &v252);
sub_100278250((float *)&v250, 0.0, 0.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v233 + 184LL))(v233, &v252);
sub_100278250((float *)&v250, 119.0, 0.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v235 + 184LL))(v235, &v252);
sub_100278250((float *)&v250, -119.0, -36.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v236 + 184LL))(v236, &v252);
sub_100278250((float *)&v250, 0.0, -36.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v90 + 184LL))(v90, &v252);
sub_100278250((float *)&v250, 119.0, -36.0);
sub_100278350((double *)v252.i64, &v249, &v250);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v92 + 184LL))(v92, &v252);
sub_100278250((float *)&v250, *(float *)&v244 * 0.5, (float)(0.5 * *((float *)&v244 + 1)) + -77.0);
v93 = cocos2d::CCLabelBMFont::create_3((__int64)"Filters", (__int64)"bigFont.fnt");
sub_100278250((float *)&v241, 0.0, 37.0);
sub_100278350((double *)v252.i64, &v250, &v241);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v93 + 184LL))(v93, &v252);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v254 + 456LL))(v254, v93);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v93 + 160LL))(v93, 0.5);
sub_1002787F0(&v252, v237);
v94 = cocos2d::extension::CCScale9Sprite::create_2((__int64)"square02b_001.png", (unsigned __int64 *)&v252);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v94 + 912LL))(v94, 255);
sub_100278260(v252.f32, 365.0, 50.0);
sub_100278660(&v240, &v252);
(*(void (__fastcall **)(void *, __int64 *))(*(_QWORD *)v94 + 320LL))(v94, &v240);
(*(void (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)v254 + 464LL))(v254, v94, 0xFFFFFFFFLL);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v94 + 184LL))(v94, &v250);
v252.i8[2] = 91;
v252.i16[0] = 9216;
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v94 + 960LL))(v94, &v252);
v95 = sub_1007FE900(v94);
*(_QWORD *)(v254 + 464) = v95;
v96 = v95;
cocos2d::CCObject::retain(v95);
v251 = (__int64 (__fastcall **)())sub_1007FE900(v96);
v99 = cocos2d::CCMenu::create(v96, &v252, v97, v98);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v254 + 464LL))(v254, v99, 10);
v100 = sub_10088E820("difficulty_%02d_btn_001.png", v219);
CString = cocos2d::CCString::getCString(v100);
v102 = cocos2d::CCSprite::createWithSpriteFrameName(CString, COERCE_DOUBLE(1136033792));
memset(&v252, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v102 + 960LL))(v102, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 464), v102);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v102 + 160LL))(v102, 0.80000001);
v103 = CCMenuItemSpriteExtra::create((__int64)v102, 0, v254, (__int64)LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v103 + 72LL))(v103, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v103);
sub_1007FEBF0(v251, v103);
v104 = sub_10088E820("difficulty_%02d_btn_001.png", v220);
v105 = cocos2d::CCString::getCString(v104);
v106 = cocos2d::CCSprite::createWithSpriteFrameName(v105, COERCE_DOUBLE(1061997773));
memset(&v252, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v106 + 960LL))(v106, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 464), v106);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v106 + 160LL))(v106, 0.80000001);
v107 = CCMenuItemSpriteExtra::create((__int64)v106, 0, v254, (__int64)LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v107 + 72LL))(v107, 1);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v107);
sub_1007FEBF0(v251, v107);
v108 = sub_10088E820("difficulty_%02d_btn_001.png", v221);
v109 = cocos2d::CCString::getCString(v108);
v110 = cocos2d::CCSprite::createWithSpriteFrameName(v109, COERCE_DOUBLE(1061997773));
memset(&v252, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v110 + 960LL))(v110, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 464), v110);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v110 + 160LL))(v110, 0.80000001);
v111 = CCMenuItemSpriteExtra::create((__int64)v110, 0, v254, (__int64)LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v111 + 72LL))(v111, 2);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v111);
sub_1007FEBF0(v251, v111);
v112 = sub_10088E820("difficulty_%02d_btn_001.png", v222);
v113 = cocos2d::CCString::getCString(v112);
v114 = cocos2d::CCSprite::createWithSpriteFrameName(v113, COERCE_DOUBLE(1061997773));
memset(&v252, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v114 + 960LL))(v114, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 464), v114);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v114 + 160LL))(v114, 0.80000001);
v115 = CCMenuItemSpriteExtra::create((__int64)v114, 0, v254, (__int64)LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v115 + 72LL))(v115, 3);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v115);
sub_1007FEBF0(v251, v115);
v116 = sub_10088E820("difficulty_%02d_btn_001.png", v223);
v117 = cocos2d::CCString::getCString(v116);
v118 = cocos2d::CCSprite::createWithSpriteFrameName(v117, COERCE_DOUBLE(1061997773));
memset(&v252, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v118 + 960LL))(v118, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 464), v118);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v118 + 160LL))(v118, 0.80000001);
v119 = CCMenuItemSpriteExtra::create((__int64)v118, 0, v254, (__int64)LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v119 + 72LL))(v119, 4);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v119);
sub_1007FEBF0(v251, v119);
v120 = sub_10088E820("difficulty_%02d_btn_001.png", v224);
v121 = cocos2d::CCString::getCString(v120);
v122 = cocos2d::CCSprite::createWithSpriteFrameName(v121, COERCE_DOUBLE(1061997773));
memset(&v252, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v122 + 960LL))(v122, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 464), v122);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v122 + 160LL))(v122, 0.80000001);
v123 = CCMenuItemSpriteExtra::create((__int64)v122, 0, v254, (__int64)LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v123 + 72LL))(v123, 5);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v123);
sub_1007FEBF0(v251, v123);
v124 = sub_10088E820("difficulty_%02d_btn_001.png", v225);
v125 = cocos2d::CCString::getCString(v124);
v126 = cocos2d::CCSprite::createWithSpriteFrameName(v125, COERCE_DOUBLE(1061997773));
memset(&v252, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v126 + 960LL))(v126, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 464), v126);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v126 + 160LL))(v126, 0.80000001);
v127 = CCMenuItemSpriteExtra::create((__int64)v126, 0, v254, (__int64)LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v127 + 72LL))(v127, 6);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v127);
sub_1007FEBF0(v251, v127);
*(_QWORD *)(v254 + 488) = v126;
v128 = sub_10088E820("difficulty_%02d_btn_001.png", v226);
cocos2d::CCString::getCString(v128);
v129 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"difficulty_auto_btn_001.png", COERCE_DOUBLE(1061997773));
memset(&v252, 125, 3);
(*(void (__fastcall **)(char *, __m128 *))(*(_QWORD *)v129 + 960LL))(v129, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 464), v129);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v129 + 160LL))(v129, 0.80000001);
v130 = CCMenuItemSpriteExtra::create((__int64)v129, 0, v254, (__int64)LevelSearchLayer::toggleDifficulty, 0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v130 + 72LL))(v130, 7);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v130);
sub_1007FEBF0(v251, v130);
cocos2d::CCNode::convertToNodeSpace((double *)v252.i64, v99, (unsigned int *)&v250);
v131 = 1099956224;
v132 = 0;
GameToolbox::alignItemsHorisontally((__int64)v251, (unsigned __int64 *)&v252, 0, (__m128)0x41900000u);
while ( v132 < (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v99 + 496LL))(v99) )
{
v133 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v99 + 488LL))(v99);
v134 = sub_1007FEFE0(v133, v132);
v131 = 1069547520;
CCMenuItemSpriteExtra::setSizeMult(v134, 1.5);
++v132;
}
v135 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_plus2Btn_001.png", *(double *)&v131);
v136 = v254;
v137 = CCMenuItemSpriteExtra::create((__int64)v135, 0, v254, (__int64)LevelSearchLayer::onSpecialDemon, 0);
*(_QWORD *)(v136 + 496) = v137;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v99 + 456LL))(v99, v137);
v138 = *(_QWORD *)(v136 + 496);
cocos2d::CCNode::convertToNodeSpace((double *)&v241, v99, (unsigned int *)&v250);
sub_100278250((float *)&v230, 202.5, 0.0);
sub_100278350((double *)v252.i64, &v241, &v230);
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v138 + 184LL))(v138, &v252);
sub_100278250((float *)&v241, *(float *)&v244 * 0.5, (float)(0.5 * *((float *)&v244 + 1)) + -128.0);
sub_1002787F0(&v252, v237);
v139 = cocos2d::extension::CCScale9Sprite::create_2((__int64)"square02b_001.png", (unsigned __int64 *)&v252);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v139 + 912LL))(v139, 255);
v140 = 1136033792;
sub_100278260(v252.f32, 365.0, 35.0);
sub_100278660(&v240, &v252);
(*(void (__fastcall **)(void *, __int64 *))(*(_QWORD *)v139 + 320LL))(v139, &v240);
(*(void (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)v254 + 464LL))(v254, v139, 0xFFFFFFFFLL);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v139 + 184LL))(v139, &v241);
v252.i8[2] = 79;
v252.i16[0] = 7936;
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v139 + 960LL))(v139, &v252);
v141 = sub_1007FE900(v139);
*(_QWORD *)(v254 + 472) = v141;
cocos2d::CCObject::retain(v141);
v142 = v251;
sub_1007FF190(v251);
v145 = cocos2d::CCMenu::create(v142, &v252, v143, v144);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v254 + 464LL))(v254, v145, 10);
if ( !*(_DWORD *)(v254 + 432) )
{
v146 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_timeIcon_001.png", COERCE_DOUBLE(1136033792));
v147 = CCMenuItemSpriteExtra::create((__int64)v146, 0, 0, 0, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v145 + 456LL))(v145, v147);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v147 + 1056LL))(v147, 0);
sub_1007FEBF0(v251, v147);
for ( i = 0; i != 6; ++i )
{
GJGameLevel::lengthKeyToString(&v252, i);
v149 = &v252.i8[1];
if ( (v252.i8[0] & 1) != 0 )
v149 = (__int8 *)v253;
v150 = cocos2d::CCLabelBMFont::create_3((__int64)v149, (__int64)"bigFont.fnt");
if ( (v252.i8[0] & 1) != 0 )
operator delete(v253);
memset(&v252, 125, 3);
(*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v150 + 1072LL))(v150, &v252);
sub_1007FEBF0(*(_QWORD *)(v254 + 472), v150);
v140 = 1054280253;
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v150 + 160LL))(v150, 0.41999999);
v151 = CCMenuItemSpriteExtra::create((__int64)v150, 0, v254, (__int64)LevelSearchLayer::toggleTime, 0);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v151 + 72LL))(v151, i);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v145 + 456LL))(v145, v151);
sub_1007FEBF0(v251, v151);
}
}
v152 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_starsIcon_001.png", *(double *)&v140);
v153 = v254;
*(_QWORD *)(v254 + 448) = v152;
v154 = CCMenuItemSpriteExtra::create((__int64)v152, 0, v153, (__int64)LevelSearchLayer::toggleStar, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v145 + 456LL))(v145, v154);
sub_1007FEBF0(v251, v154);
if ( *(_DWORD *)(v254 + 432) == 1 )
{
v155 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_noStarsIcon_001.png", *(double *)&v140);
v156 = v254;
*(_QWORD *)(v254 + 456) = v155;
v157 = CCMenuItemSpriteExtra::create((__int64)v155, 0, v156, (__int64)sub_100708000, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v145 + 456LL))(v145, v157);
sub_1007FEBF0(v251, v157);
}
cocos2d::CCNode::convertToNodeSpace((double *)v252.i64, v145, (unsigned int *)&v241);
v158 = 1094713344;
v159 = 0;
GameToolbox::alignItemsHorisontally((__int64)v251, (unsigned __int64 *)&v252, 0, (__m128)0x41400000u);
while ( v159 < (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v145 + 496LL))(v145) )
{
v160 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v145 + 488LL))(v145);
v161 = sub_1007FEFE0(v160, v159);
v158 = 1067869798;
CCMenuItemSpriteExtra::setSizeMult(v161, 1.3);
++v159;
}
v162 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_01_001.png", *(double *)&v158);
v163 = CCMenuItemSpriteExtra::create((__int64)v162, 0, v254, (__int64)LevelSearchLayer::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v163, 1.5);
v168 = sub_1008735E0((_DWORD)v163, 0, v164, v165, v166, v167);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v254 + 464LL))(v254, v168, 1);
v169 = cocos2d::CCDirector::sharedDirector();
LODWORD(v251) = sub_100479760(v169);
v170 = cocos2d::CCDirector::sharedDirector();
v171 = sub_100479740(v170);
*(_QWORD *)&v172 = (unsigned int)v251;
*(float *)&v172 = *(float *)&v251 + 24.0;
sub_100278250(v252.f32, *(float *)&v251 + 24.0, v171 + -23.0);
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v168 + 184LL))(v168, &v252);
if ( PlatformToolbox::isControllerConnected() )
GameToolbox::addBackButton(v254, (__int64)v163, v172);
v173 = GameLevelManager::sharedState();
v174 = sub_100581D80(v173);
LevelSearchLayer::toggleDifficultyNum(v254, 0, v174);
v175 = GameLevelManager::sharedState();
v176 = sub_100581D80(v175);
LevelSearchLayer::toggleDifficultyNum(v254, 1, v176);
v177 = GameLevelManager::sharedState();
v178 = sub_100581D80(v177);
LevelSearchLayer::toggleDifficultyNum(v254, 2, v178);
v179 = GameLevelManager::sharedState();
v180 = sub_100581D80(v179);
LevelSearchLayer::toggleDifficultyNum(v254, 3, v180);
v181 = GameLevelManager::sharedState();
v182 = sub_100581D80(v181);
LevelSearchLayer::toggleDifficultyNum(v254, 4, v182);
v183 = GameLevelManager::sharedState();
v184 = sub_100581D80(v183);
LevelSearchLayer::toggleDifficultyNum(v254, 5, v184);
v185 = GameLevelManager::sharedState();
v186 = sub_100581D80(v185);
LevelSearchLayer::toggleDifficultyNum(v254, 6, v186);
v187 = GameLevelManager::sharedState();
v188 = sub_100581D80(v187);
LevelSearchLayer::toggleDifficultyNum(v254, 7, v188);
v189 = GameLevelManager::sharedState();
v190 = sub_100581FC0(v189);
LevelSearchLayer::toggleTimeNum(v254, 0, v190);
v191 = GameLevelManager::sharedState();
v192 = sub_100581FC0(v191);
LevelSearchLayer::toggleTimeNum(v254, 1, v192);
v193 = GameLevelManager::sharedState();
v194 = sub_100581FC0(v193);
LevelSearchLayer::toggleTimeNum(v254, 2, v194);
v195 = GameLevelManager::sharedState();
v196 = sub_100581FC0(v195);
LevelSearchLayer::toggleTimeNum(v254, 3, v196);
v197 = GameLevelManager::sharedState();
v198 = sub_100581FC0(v197);
LevelSearchLayer::toggleTimeNum(v254, 4, v198);
v199 = GameLevelManager::sharedState();
v200 = sub_100581FC0(v199);
LevelSearchLayer::toggleTimeNum(v254, 5, v200);
v201 = GameLevelManager::sharedState();
BoolForKey = GameLevelManager::getBoolForKey(v201, "star_filter");
v203 = *(_QWORD *)(v254 + 448);
if ( BoolForKey )
{
v252.i8[2] = -1;
v252.i16[0] = -1;
}
else
{
memset(&v252, 125, 3);
}
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v203 + 960LL))(v203, &v252);
if ( *(_QWORD *)(v254 + 456) )
{
v204 = GameLevelManager::sharedState();
v205 = GameLevelManager::getBoolForKey(v204, "nostar_filter");
v206 = *(_QWORD *)(v254 + 456);
if ( v205 )
{
v252.i8[2] = -1;
v252.i16[0] = -1;
}
else
{
memset(&v252, 125, 3);
}
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v206 + 960LL))(v206, &v252);
}
v207 = *(_QWORD *)(v254 + 480);
v208 = sub_10088E820("D%i", v227);
v209 = (const char *)cocos2d::CCString::getCString(v208);
v210 = strlen(v209);
if ( v210 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v211 = v210;
if ( v210 >= 0x17 )
{
v213 = 26;
if ( (v210 | 7) != 0x17 )
v213 = (v210 | 7) + 1;
v212 = (__int8 *)operator new(v213);
v253 = v212;
v252.i64[0] = v213 | 1;
v252.i64[1] = v211;
}
else
{
v252.i8[0] = 2 * v210;
v212 = &v252.i8[1];
if ( !v210 )
goto LABEL_79;
}
memmove(v212, v209, v211);
LABEL_79:
v212[v211] = 0;
v214 = cocos2d::CCDictionary::valueForKey(v207, (__int64)&v252);
v215 = cocos2d::CCString::boolValue(v214);
v216 = v248;
if ( (v252.i8[0] & 1) != 0 )
operator delete(v253);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v254 + 496) + 1056LL))(*(_QWORD *)(v254 + 496), v215);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v254 + 496) + 344LL))(*(_QWORD *)(v254 + 496), v215);
v217 = GameLevelManager::sharedState();
IntForKey = GameLevelManager::getIntForKey(v217, "demon_filter");
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v254 + 1184LL))(v254, IntForKey);
if ( (__dst.i8[0] & 1) != 0 )
operator delete(v247);
return v216;
}