//
// LevelSearchLayer::init from 0x7e23d8 to 0x7e3fac (7124 bytes)
//
// 2 xrefs:
// > LevelSearchLayer::create @ 0x7e40c4
// > ??> @ 0xa3588
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:54:28 +0000
//
__int64 __fastcall LevelSearchLayer::init(CCTextInputNode **this, int a2)
{
GameManager *v5; // x0
GameManager *v6; // x0
cocos2d::CCDictionary *v7; // x0
cocos2d::CCObject *v8; // x0
cocos2d::CCDirector *v9; // x0
cocos2d::CCDirector *v10; // x0
const char *v11; // x1
float *v12; // x19
void (__fastcall *v13)(float *, __int64 *); // x25
void (__fastcall *v14)(float *, __int64 *); // x24
void (__fastcall *v15)(float *, __int64 *); // x2
const char *v16; // x1
cocos2d::CCDirector **v17; // x22
void (__fastcall *v18)(cocos2d::CCDirector **, __int64 *); // x24
void (__fastcall *v19)(cocos2d::CCDirector **, __int64 *); // x24
cocos2d::CCDirector *v20; // x0
cocos2d::CCDirector *ScreenLeft; // x0
float v22; // s0
float v23; // s9
cocos2d::CCDirector *v24; // x0
float v25; // s0
const char *v26; // x1
cocos2d::CCDirector **v27; // x19
void (__fastcall *v28)(cocos2d::CCDirector **, __int64 *); // x22
void (__fastcall *v29)(cocos2d::CCDirector **, __int64 *); // x22
cocos2d::CCDirector *v30; // x0
cocos2d::CCDirector *ScreenRight; // x0
float v32; // s0
float v33; // s9
cocos2d::CCDirector *v34; // x0
float v35; // s0
cocos2d::CCMenu *v36; // x0
cocos2d::CCNode *v37; // x19
cocos2d::CCDirector *v38; // x0
cocos2d::CCDirector *v39; // x0
cocos2d::CCDirector *v40; // x0
float v41; // s0
float v42; // s8
cocos2d::CCDirector *v43; // x0
float v44; // s0
const char *v45; // x1
__int64 v46; // x22
__int64 v47; // x22
void (__fastcall *v48)(__int64, __int64 *); // x23
const char *v49; // x1
__int64 v50; // x24
__int64 v51; // x23
__int64 v52; // x0
__int64 (__fastcall *v53)(__int64); // x1
void (__fastcall *v54)(__int64, __int64 *); // x22
__int64 v55; // x25
char *v56; // x0
__int64 v57; // x26
__int64 v58; // x26
void (__fastcall *v59)(__int64, __int64 *); // x19
__int64 v60; // x23
__int64 v61; // x23
void (__fastcall *v62)(__int64, __int64 *); // x2
__int64 v63; // x19
void (__fastcall *v64)(__int64, __int64 *); // x23
void (__fastcall *v65)(__int64, __int64 *); // x2
const char *v66; // x1
size_t v67; // x0
const char *v68; // x4
CCTextInputNode *v69; // x0
__int64 v70; // x0
CCTextInputNode *v71; // x3
__int64 v72; // x23
void (__fastcall *v73)(__int64, __int64 *); // x25
__int64 v74; // x23
void (__fastcall *v75)(__int64, __int64 *); // x25
__int64 v76; // x23
void (__fastcall *v77)(__int64, __int64 *); // x25
__int64 v78; // x25
char *v79; // x1
cocos2d::CCMenu *updated; // x0
cocos2d::CCNode *v81; // x19
const char *v82; // x1
__int64 v83; // x0
__int64 v84; // x23
void (__fastcall *v85)(__int64, __int64 *); // x25
const char *v86; // x1
__int64 v87; // x0
__int64 v88; // x23
__int64 (__fastcall *v89)(__int64, __int64 *); // x25
GameManager *v90; // x0
GameManager *v91; // x0
const char *v92; // x1
__int64 v93; // x0
__int64 v94; // x23
void (__fastcall *v95)(__int64, __int64 *); // x25
const char *v96; // x2
__int64 v97; // x19
void (__fastcall *v98)(__int64, __int64 *); // x22
__int64 v99; // x19
__int64 (__fastcall *v100)(__int64, __int64 *); // x2
cocos2d::CCMenu *v101; // x0
cocos2d::CCNode *v102; // x19
const char *v103; // x3
_QWORD *v104; // x0
__int64 v105; // x28
const char *v106; // x3
_QWORD *v107; // x0
const char *v108; // x3
_QWORD *v109; // x0
__int64 v110; // x23
__int64 v111; // x25
__int64 v112; // x26
__int64 v113; // x26
const char *v114; // x3
_QWORD *v115; // x0
const char *v116; // x3
_QWORD *v117; // x0
const char *v118; // x3
_QWORD *v119; // x0
const char *v120; // x3
_QWORD *v121; // x0
const char *v122; // x3
_QWORD *v123; // x0
__int64 v124; // x25
__int64 v125; // x23
__int64 v126; // x25
const char *v127; // x3
_QWORD *v128; // x0
__int64 v129; // x23
void (__fastcall *v130)(__int64, __int64 *); // x19
void (__fastcall *v131)(__int64, __int64 *); // x19
void (__fastcall *v132)(__int64, __int64 *); // x19
void (__fastcall *v133)(char *, __int64 *); // x19
void (__fastcall *v134)(cocos2d::CCPoint *, __int64 *); // x19
void (__fastcall *v135)(__int64, __int64 *); // x19
void (__fastcall *v136)(__int64, __int64 *); // x19
void (__fastcall *v137)(__int64, __int64 *); // x19
void (__fastcall *v138)(__int64, __int64 *); // x19
const char *v139; // x2
__int64 v140; // x19
void (__fastcall *v141)(__int64, __int64 *); // x22
__int64 v142; // x19
__int64 (__fastcall *v143)(__int64, __int64 *); // x2
cocos2d::CCArray *v144; // x0
cocos2d::CCObject *v145; // x0
cocos2d::CCArray *v146; // x0
cocos2d::CCMenu *v147; // x28
cocos2d::CCNode *v148; // x19
int v149; // w27
unsigned int v150; // w23
cocos2d::CCString *i; // x0
cocos2d::CCSprite *CString; // x0
cocos2d::CCObject *v153; // x22
void (__fastcall *v154)(cocos2d::CCObject *, __int64 *); // x2
cocos2d::CCObject *v155; // x25
unsigned int j; // w22
cocos2d::CCArray *v157; // x0
__int64 v158; // x0
const char *v159; // x1
__int64 v160; // x0
__int64 v161; // x0
__int64 v162; // x22
cocos2d::CCNode *v163; // x0
void (__fastcall *v164)(__int64, __int64 *); // x19
__int64 v165; // x19
__int64 (__fastcall *v166)(__int64, __int64 *); // x2
cocos2d::CCArray *v167; // x0
cocos2d::CCObject *v168; // x0
cocos2d::CCMenu *v169; // x0
cocos2d::CCNode *v170; // x19
const char *v171; // x1
__int64 v172; // x0
cocos2d::CCObject *v173; // x22
unsigned int k; // w23
void (__fastcall *v175)(cocos2d::CCObject *, __int64 *); // x2
cocos2d::CCObject *v176; // x22
const char *v177; // x2
cocos2d::CCLabelBMFont *v178; // x0
cocos2d::CCObject *v179; // x22
__int64 v180; // x0
cocos2d::CCObject *v181; // x22
const char *v182; // x1
unsigned int m; // w22
cocos2d::CCArray *v184; // x0
__int64 v185; // x0
const char *v186; // x1
__int64 v187; // x0
cocos2d::CCMenu *v188; // x22
cocos2d::CCDirector **v189; // x19
__int64 (__fastcall *v190)(cocos2d::CCDirector **, __int64 *); // x23
cocos2d::CCDirector *v191; // x0
cocos2d::CCDirector *v192; // x0
float v193; // s0
float v194; // s8
cocos2d::CCDirector *v195; // x0
float v196; // s0
PlatformToolbox *v197; // x0
__int64 isControllerConnected; // x0
cocos2d::CCMenuItem *v199; // x2
unsigned int n; // w19
GameLevelManager *v201; // x0
unsigned __int8 DiffVal; // w0
unsigned int ii; // w19
GameLevelManager *v204; // x0
char LenVal; // w0
GameLevelManager *v206; // x0
char BoolForKey; // w0
char v208; // w2
__int64 v209; // x0
void (__fastcall *v210)(__int64, __int64 *); // x3
GameLevelManager *v211; // x0
GameLevelManager *v212; // x0
char v213; // w0
char v214; // w2
__int64 v215; // x0
void (__fastcall *v216)(__int64, __int64 *); // x3
__int64 v217; // x21
size_t v218; // x0
cocos2d::CCString *v219; // x0
unsigned int v220; // w19
void (__fastcall *v221)(CCTextInputNode **, _QWORD); // x19
GameLevelManager *v222; // x0
unsigned int IntForKey; // w0
__int64 v224; // x0
cocos2d::CCObject *v225; // x22
void (__fastcall *v226)(__int64, __int64 *); // x3
__int64 v227; // [xsp+90h] [xbp+90h]
void (__fastcall *v228)(__int64, __int64 *); // [xsp+98h] [xbp+98h]
__int64 v229; // [xsp+A0h] [xbp+A0h]
__int64 v230; // [xsp+A8h] [xbp+A8h]
cocos2d::CCPoint *v231; // [xsp+B8h] [xbp+B8h]
unsigned __int8 v232; // [xsp+D7h] [xbp+D7h]
char *v233; // [xsp+D8h] [xbp+D8h]
char *v234; // [xsp+D8h] [xbp+D8h]
char *v235; // [xsp+E0h] [xbp+E0h]
__int64 v236; // [xsp+E0h] [xbp+E0h]
char *DiffKey; // [xsp+E0h] [xbp+E0h]
__int64 v238; // [xsp+F8h] [xbp+F8h] BYREF
_BYTE v239[8]; // [xsp+100h] [xbp+100h] BYREF
_BYTE v240[8]; // [xsp+108h] [xbp+108h] BYREF
char v241[8]; // [xsp+110h] [xbp+110h] BYREF
_BYTE v242[8]; // [xsp+118h] [xbp+118h] BYREF
_BYTE v243[8]; // [xsp+120h] [xbp+120h] BYREF
__int64 v244; // [xsp+128h] [xbp+128h] BYREF
_BYTE v245[8]; // [xsp+130h] [xbp+130h] BYREF
__int64 v246; // [xsp+138h] [xbp+138h] BYREF
__int64 v247; // [xsp+140h] [xbp+140h] BYREF
_BYTE v248[16]; // [xsp+148h] [xbp+148h] BYREF
__int64 v249[2]; // [xsp+158h] [xbp+158h] BYREF
__int64 v250[2]; // [xsp+168h] [xbp+168h] BYREF
CCTextInputNode *v251; // [xsp+178h] [xbp+178h]
__int64 v252[2]; // [xsp+180h] [xbp+180h] BYREF
void *v253; // [xsp+190h] [xbp+190h]
__int64 v254[2]; // [xsp+198h] [xbp+198h] BYREF
void *v255; // [xsp+1A8h] [xbp+1A8h]
__int64 v256[2]; // [xsp+1B0h] [xbp+1B0h] BYREF
void *v257; // [xsp+1C0h] [xbp+1C0h]
v232 = cocos2d::CCLayer::init((cocos2d::CCLayer *)this);
if ( !v232 )
return v232;
*(_DWORD *)(GameManager::sharedState((GameManager *)v232) + 964) = -1;
v5 = (GameManager *)GameManager::sharedState((GameManager *)v248);
*((_DWORD *)v5 + 242) = -1;
v6 = (GameManager *)GameManager::sharedState(v5);
*((_DWORD *)v6 + 177) = 4;
*((_DWORD *)this + 108) = a2;
*(_DWORD *)(GameManager::sharedState(v6) + 1312) = a2;
(*((void (__fastcall **)(CCTextInputNode **, __int64))*this + 134))(this, 1);
v7 = (cocos2d::CCDictionary *)(*((__int64 (__fastcall **)(CCTextInputNode **, __int64))*this + 136))(this, 1);
v8 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v7);
*(this + 60) = v8;
v9 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(v8);
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(&v238, v10);
v12 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v11);
v13 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v12 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, 0.0, 0.0);
v13(v12, v249);
(*((void (__fastcall **)(CCTextInputNode **, float *, __int64))*this + 58))(this, v12, 4294967293LL);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v12 + 128LL))(v12, (float)(*(float *)&v238 + 10.0) / v12[108]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v12 + 144LL))(
v12,
(float)(*((float *)&v238 + 1) + 10.0) / v12[109]);
v14 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v12 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, -5.0, -5.0);
v14(v12, v249);
v15 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v12 + 960LL);
BYTE2(v249[0]) = -1;
LOWORD(v249[0]) = 26112;
v15(v12, v249);
v17 = (cocos2d::CCDirector **)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_sideArt_001.png",
v16);
v18 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v17 + 37);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, 0.0, 0.0);
v18(v17, v249);
v19 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v17 + 23);
v20 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v17);
ScreenLeft = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v20);
v23 = v22;
v24 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenLeft);
cocos2d::CCDirector::getScreenBottom(v24);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, v23 - 1.0, v25 - 1.0);
v19(v17, v249);
(*((void (__fastcall **)(CCTextInputNode **, cocos2d::CCDirector **, __int64))*this + 58))(this, v17, 1);
v27 = (cocos2d::CCDirector **)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_sideArt_001.png",
v26);
v28 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v27 + 37);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, 1.0, 0.0);
v28(v27, v249);
v29 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v27 + 23);
v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v27);
ScreenRight = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenRight(v30);
v33 = v32;
v34 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenRight);
cocos2d::CCDirector::getScreenBottom(v34);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, v33 + 1.0, v35 - 1.0);
v29(v27, v249);
cocos2d::CCSprite::setFlipX((cocos2d::CCSprite *)v27, 1);
(*((void (__fastcall **)(CCTextInputNode **, cocos2d::CCDirector **, __int64))*this + 58))(this, v27, 1);
v36 = (cocos2d::CCMenu *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)v248, 0.0, 0.0, 80.0, 80.0);
v37 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v36);
v38 = (cocos2d::CCDirector *)(*((__int64 (__fastcall **)(CCTextInputNode **, cocos2d::CCNode *, __int64))*this + 58))(
this,
v37,
2);
v39 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v38);
v40 = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenRight(v39);
v42 = v41;
v43 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v40);
cocos2d::CCDirector::getScreenTop(v43);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v239, v42 - 25.0, v44 - 25.0);
v46 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v45);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v46 + 160LL))(v46, 0.8);
v47 = CCMenuItemSpriteExtra::create(v46, 0, (__int64)this, (__int64)LevelSearchLayer::confirmClearFilters, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v37 + 456LL))(v37, v47);
v48 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v47 + 184LL);
cocos2d::CCNode::convertToNodeSpace(v249, v37, (const cocos2d::CCPoint *)v239);
v48(v47, v249);
v50 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_plusBtn_001.png", v49);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v50 + 160LL))(v50, 0.8);
v51 = CCMenuItemSpriteExtra::create(v50, 0, (__int64)this, (__int64)LevelSearchLayer::onMoreOptions, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v37 + 456LL))(v37, v51);
CCMenuItemSpriteExtra::setSizeMult(v51, 1.5);
if ( *((_DWORD *)this + 108) == 1 )
{
v226 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v50 + 960LL);
memset(v249, 125, 3);
v226(v50, v249);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v51 + 1056LL))(v51, 0);
}
v52 = v47;
v53 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v47 + 192LL);
v54 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v51 + 184LL);
v55 = v53(v52);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 0.0, -50.0);
cocos2d::CCPoint::operator+(v249, v55);
v54(v51, v249);
if ( *((_DWORD *)this + 108) )
v56 = "GJ_viewLevelsBtn_001.png";
else
v56 = "GJ_viewListsBtn_001.png";
v57 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v56, v241);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v57 + 160LL))(v57, 0.8);
v58 = CCMenuItemSpriteExtra::create(v57, 0, (__int64)this, (__int64)LevelSearchLayer::onSearchMode, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v37 + 456LL))(v37, v58);
v59 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v58 + 184LL);
v60 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 192LL))(v51);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 0.0, -50.0);
cocos2d::CCPoint::operator+(v249, v60);
v59(v58, v249);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v240,
*(float *)&v238 * 0.5,
(float)(*((float *)&v238 + 1) * 0.5) + 130.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v249, (const cocos2d::CCRect *)v248);
v61 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v249);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v61 + 912LL))(v61, 0xFFFFFFFFLL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v241, 365.0, 40.0);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v61 + 320LL))(v61, v241);
(*((void (__fastcall **)(CCTextInputNode **, __int64, __int64))*this + 58))(this, v61, 4294967294LL);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v61 + 184LL))(v61, v240);
v62 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v61 + 960LL);
LOWORD(v249[0]) = 14336;
BYTE2(v249[0]) = -115;
v62(v61, v249);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v249, 0.0, 0.0, 40.0, 40.0);
v63 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v249);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v63 + 912LL))(v63, 0xFFFFFFFFLL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v242, 210.0, 30.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v63 + 320LL))(v63, v242);
(*((void (__fastcall **)(CCTextInputNode **, __int64, __int64))*this + 58))(this, v63, 0xFFFFFFFFLL);
v64 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v63 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, -73.0, 0.0);
cocos2d::CCPoint::operator+(v249, v240);
v64(v63, v249);
v65 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v63 + 960LL);
LOWORD(v249[0]) = 9984;
BYTE2(v249[0]) = 98;
v65(v63, v249);
if ( *((_DWORD *)this + 108) == 1 )
v66 = "Enter a list or id";
else
v66 = "Enter a level, user or id";
v235 = (char *)v66;
v250[0] = 0;
v250[1] = 0;
v251 = nullptr;
v67 = strlen(v66);
std::string::__init(v250, v235, v67);
v69 = (CCTextInputNode *)((char *)v250 + 1);
if ( (v250[0] & 1) != 0 )
v69 = v251;
v70 = CCTextInputNode::create(v69, 194.0, 50.0, "Thonburi", (const char *)&off_18, "bigFont.fnt", v68);
v71 = *this;
*(this + 55) = (CCTextInputNode *)v70;
(*((void (__fastcall **)(CCTextInputNode **, __int64, __int64))v71 + 58))(this, v70, 20);
*((_QWORD *)*(this + 55) + 73) = this + 51;
v72 = (__int64)*(this + 55);
v73 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v72 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, -174.0, 0.0);
cocos2d::CCPoint::operator+(v249, v240);
v73(v72, v249);
v74 = *((_QWORD *)*(this + 55) + 72);
v75 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v74 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, 0.0, 0.5);
v75(v74, v249);
v76 = *((_QWORD *)*(this + 55) + 75);
v77 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v76 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, 0.0, 0.5);
v77(v76, v249);
CCTextInputNode::setMaxLabelScale(*(this + 55), 0.7);
CCTextInputNode::setMaxLabelWidth(*(this + 55), 194.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)*(this + 55) + 72) + 344LL))(*((_QWORD *)*(this + 55) + 72), 0);
*((_DWORD *)*(this + 55) + 148) = 20;
v252[0] = 0;
v78 = (__int64)*(this + 55);
v252[1] = 0;
v253 = nullptr;
std::string::__init(v252, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 0x3Fu);
CCTextInputNode::setAllowedChars(v78, (__int64)v252);
if ( (v252[0] & 1) != 0 )
operator delete(v253);
v79 = (char *)v250 + 1;
if ( (v250[0] & 1) != 0 )
v79 = (char *)v251;
updated = (cocos2d::CCMenu *)LevelSearchLayer::updateSearchLabel((LevelSearchLayer *)this, v79);
v81 = (cocos2d::CCNode *)cocos2d::CCMenu::create(updated);
(*((void (__fastcall **)(CCTextInputNode **, cocos2d::CCNode *))*this + 57))(this, v81);
v83 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_longBtn06_001.png", v82);
v84 = CCMenuItemSpriteExtra::create(v83, 0, (__int64)this, (__int64)LevelSearchLayer::onSearch, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v81 + 456LL))(v81, v84);
v85 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v84 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v246, 63.0, 0.0);
cocos2d::CCPoint::operator+(&v247, v240);
cocos2d::CCNode::convertToNodeSpace(v249, v81, (const cocos2d::CCPoint *)&v247);
v85(v84, v249);
v87 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_longBtn05_001.png", v86);
v88 = CCMenuItemSpriteExtra::create(v87, 0, (__int64)this, (__int64)LevelSearchLayer::onSearchUser, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v81 + 456LL))(v81, v88);
v89 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v88 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v246, 110.0, 0.0);
cocos2d::CCPoint::operator+(&v247, v240);
cocos2d::CCNode::convertToNodeSpace(v249, v81, (const cocos2d::CCPoint *)&v247);
v90 = (GameManager *)v89(v88, v249);
v91 = (GameManager *)GameManager::sharedState(v90);
if ( (unsigned __int8)GameManager::safeModeEnabled(v91) )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v88 + 344LL))(v88, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v88 + 1056LL))(v88, 0);
}
v93 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_longBtn07_001.png", v92);
v94 = CCMenuItemSpriteExtra::create(v93, 0, (__int64)this, (__int64)LevelSearchLayer::onClearFreeSearch, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v81 + 456LL))(v81, v94);
v95 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v94 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v246, 157.0, 0.0);
cocos2d::CCPoint::operator+(&v247, v240);
cocos2d::CCNode::convertToNodeSpace(v249, v81, (const cocos2d::CCPoint *)&v247);
v95(v94, v249);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v243,
*(float *)&v238 * 0.5,
(float)(*((float *)&v238 + 1) * 0.5) + 28.0);
v97 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Quick Search", "bigFont.fnt", v96);
v98 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v97 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 0.0, 69.5);
cocos2d::CCPoint::operator+(v249, v243);
v98(v97, v249);
(*((void (__fastcall **)(CCTextInputNode **, __int64))*this + 57))(this, v97);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v97 + 160LL))(v97, 0.5);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v249, (const cocos2d::CCRect *)v248);
v99 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v249);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v99 + 912LL))(v99, 0xFFFFFFFFLL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v249, 365.0, 115.0);
cocos2d::CCSize::operator=(v241, v249);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v99 + 320LL))(v99, v241);
(*((void (__fastcall **)(CCTextInputNode **, __int64, __int64))*this + 58))(this, v99, 0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v99 + 184LL))(v99, v243);
v100 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v99 + 960LL);
LOWORD(v249[0]) = 11776;
BYTE2(v249[0]) = 117;
v101 = (cocos2d::CCMenu *)v100(v99, v249);
v102 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v101);
(*((void (__fastcall **)(CCTextInputNode **, cocos2d::CCNode *))*this + 57))(this, v102);
cocos2d::CCNode::convertToNodeSpace(&v244, v102, (const cocos2d::CCPoint *)v243);
v104 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Downloads",
(cocos2d::CCSprite *)"GJ_sDownloadIcon_001.png",
0.43,
v103,
1.1);
v105 = CCMenuItemSpriteExtra::create((__int64)v104, 0, (__int64)this, (__int64)LevelSearchLayer::onMostDownloaded, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v102 + 456LL))(v102, v105);
v107 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Likes",
(cocos2d::CCSprite *)"GJ_sLikeIcon_001.png",
0.5,
v106,
1.1);
v236 = CCMenuItemSpriteExtra::create((__int64)v107, 0, (__int64)this, (__int64)LevelSearchLayer::onMostLikes, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v102 + 456LL))(v102, v236);
v109 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Hyped",
(cocos2d::CCSprite *)"particle_228_001.png",
0.5,
v108,
1.1);
v110 = v109[76];
v111 = (__int64)v109;
v233 = *(char **)(*(_QWORD *)v110 + 184LL);
v112 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v110 + 192LL))(v110);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, -1.0, 1.0);
cocos2d::CCPoint::operator+(v249, v112);
((void (__fastcall *)(__int64, __int64 *))v233)(v110, v249);
v113 = CCMenuItemSpriteExtra::create(v111, 0, (__int64)this, (__int64)LevelSearchLayer::onHyped, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v102 + 456LL))(v102, v113);
v115 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Trending",
(cocos2d::CCSprite *)"GJ_sTrendingIcon_001.png",
0.5,
v114,
1.1);
v234 = (char *)CCMenuItemSpriteExtra::create(
(__int64)v115,
0,
(__int64)this,
(__int64)LevelSearchLayer::onTrending,
0);
(*(void (__fastcall **)(cocos2d::CCNode *, char *))(*(_QWORD *)v102 + 456LL))(v102, v234);
v117 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Recent",
(cocos2d::CCSprite *)"GJ_sRecentIcon_001.png",
0.5,
v116,
1.1);
v231 = (cocos2d::CCPoint *)CCMenuItemSpriteExtra::create(
(__int64)v117,
0,
(__int64)this,
(__int64)LevelSearchLayer::onMostRecent,
0);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCPoint *))(*(_QWORD *)v102 + 456LL))(v102, v231);
v119 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Magic",
(cocos2d::CCSprite *)"GJ_sMagicIcon_001.png",
0.5,
v118,
1.1);
v230 = CCMenuItemSpriteExtra::create((__int64)v119, 0, (__int64)this, (__int64)LevelSearchLayer::onMagic, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v102 + 456LL))(v102, v230);
v121 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Awarded",
(cocos2d::CCSprite *)"GJ_sStarsIcon_001.png",
0.5,
v120,
1.1);
v229 = CCMenuItemSpriteExtra::create((__int64)v121, 0, (__int64)this, (__int64)LevelSearchLayer::onLatestStars, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v102 + 456LL))(v102, v229);
v123 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Followed",
(cocos2d::CCSprite *)"GJ_followIcon_001.png",
0.5,
v122,
0.7125);
v124 = v123[76];
v125 = (__int64)v123;
v228 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v124 + 184LL);
v227 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v124 + 192LL))(v124);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, -2.5, 0.5);
cocos2d::CCPoint::operator+(v249, v227);
v228(v124, v249);
v126 = CCMenuItemSpriteExtra::create(v125, 0, (__int64)this, (__int64)LevelSearchLayer::onFollowed, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v102 + 456LL))(v102, v126);
v128 = SearchButton::create(
(SearchButton *)"GJ_longBtn04_001.png",
(cocos2d::CCLabelBMFont *)"Friends",
(cocos2d::CCSprite *)"GJ_sFriendsIcon_001.png",
0.5,
v127,
1.1);
v129 = CCMenuItemSpriteExtra::create((__int64)v128, 0, (__int64)this, (__int64)LevelSearchLayer::onFriends, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v102 + 456LL))(v102, v129);
v130 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v105 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, -119.0, 36.0);
cocos2d::CCPoint::operator+(v249, &v244);
v130(v105, v249);
v131 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v236 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 0.0, 36.0);
cocos2d::CCPoint::operator+(v249, &v244);
v131(v236, v249);
v132 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v113 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 119.0, 36.0);
cocos2d::CCPoint::operator+(v249, &v244);
v132(v113, v249);
v133 = *(void (__fastcall **)(char *, __int64 *))(*(_QWORD *)v234 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, -119.0, 0.0);
cocos2d::CCPoint::operator+(v249, &v244);
v133(v234, v249);
v134 = *(void (__fastcall **)(cocos2d::CCPoint *, __int64 *))(*(_QWORD *)v231 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 0.0, 0.0);
cocos2d::CCPoint::operator+(v249, &v244);
v134(v231, v249);
v135 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v230 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 119.0, 0.0);
cocos2d::CCPoint::operator+(v249, &v244);
v135(v230, v249);
v136 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v229 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, -119.0, -36.0);
cocos2d::CCPoint::operator+(v249, &v244);
v136(v229, v249);
v137 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v126 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 0.0, -36.0);
cocos2d::CCPoint::operator+(v249, &v244);
v137(v126, v249);
v138 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v129 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 119.0, -36.0);
cocos2d::CCPoint::operator+(v249, &v244);
v138(v129, v249);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v245,
*(float *)&v238 * 0.5,
(float)(*((float *)&v238 + 1) * 0.5) + -77.0);
v140 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Filters", "bigFont.fnt", v139);
v141 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v140 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 0.0, 37.0);
cocos2d::CCPoint::operator+(v249, v245);
v141(v140, v249);
(*((void (__fastcall **)(CCTextInputNode **, __int64))*this + 57))(this, v140);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v140 + 160LL))(v140, 0.5);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v249, (const cocos2d::CCRect *)v248);
v142 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v249);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v142 + 912LL))(v142, 0xFFFFFFFFLL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v249, 365.0, 50.0);
cocos2d::CCSize::operator=(v241, v249);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v142 + 320LL))(v142, v241);
(*((void (__fastcall **)(CCTextInputNode **, __int64, __int64))*this + 58))(this, v142, 0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v142 + 184LL))(v142, v245);
v143 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v142 + 960LL);
LOWORD(v249[0]) = 9216;
BYTE2(v249[0]) = 91;
v144 = (cocos2d::CCArray *)v143(v142, v249);
v145 = (cocos2d::CCObject *)cocos2d::CCArray::create(v144);
*(this + 58) = v145;
v146 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v145);
v147 = (cocos2d::CCMenu *)cocos2d::CCArray::create(v146);
v148 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v147);
(*((void (__fastcall **)(CCTextInputNode **, cocos2d::CCNode *, __int64))*this + 58))(this, v148, 10);
v149 = 1;
v150 = 0;
for ( i = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn_001.png",
nullptr);
;
i = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn_001.png",
(const char *)v150) )
{
CString = (cocos2d::CCSprite *)cocos2d::CCString::getCString(i);
if ( v150 == 7 )
CString = (cocos2d::CCSprite *)"difficulty_auto_btn_001.png";
v153 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(CString, "difficulty_auto_btn_001.png");
v154 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v153 + 960LL);
memset(v249, 125, 3);
v154(v153, v249);
cocos2d::CCArray::addObject(*(this + 58), v153);
(*(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v153 + 160LL))(v153, 0.8);
v155 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(__int64)v153,
0,
(__int64)this,
(__int64)LevelSearchLayer::toggleDifficulty,
0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v155 + 72LL))(v155, v150);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCObject *))(*(_QWORD *)v148 + 456LL))(v148, v155);
cocos2d::CCArray::addObject(v147, v155);
if ( v150 != 6 )
break;
*(this + 61) = v153;
LABEL_18:
++v150;
++v149;
}
if ( v149 != 8 )
goto LABEL_18;
cocos2d::CCNode::convertToNodeSpace(v249, v148, (const cocos2d::CCPoint *)v245);
GameToolbox::alignItemsHorisontally((__int64)v147, (__int64)v249, 0, 18.0);
for ( j = 0; j < (*(unsigned int (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v148 + 496LL))(v148); ++j )
{
v157 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v148 + 488LL))(v148);
v158 = cocos2d::CCArray::objectAtIndex(v157, j);
CCMenuItemSpriteExtra::setSizeMult(v158, 1.5);
}
v160 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_plus2Btn_001.png", v159);
v161 = CCMenuItemSpriteExtra::create(v160, 0, (__int64)this, (__int64)LevelSearchLayer::onSpecialDemon, 0);
*(this + 62) = (CCTextInputNode *)v161;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v148 + 456LL))(v148, v161);
v162 = (__int64)*(this + 62);
v163 = v148;
v164 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v162 + 184LL);
cocos2d::CCNode::convertToNodeSpace(&v246, v163, (const cocos2d::CCPoint *)v245);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v247, 202.5, 0.0);
cocos2d::CCPoint::operator+(v249, &v246);
v164(v162, v249);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v247,
*(float *)&v238 * 0.5,
(float)(*((float *)&v238 + 1) * 0.5) + -128.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v249, (const cocos2d::CCRect *)v248);
v165 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v249);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v165 + 912LL))(v165, 0xFFFFFFFFLL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v249, 365.0, 35.0);
cocos2d::CCSize::operator=(v241, v249);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v165 + 320LL))(v165, v241);
(*((void (__fastcall **)(CCTextInputNode **, __int64, __int64))*this + 58))(this, v165, 0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v165 + 184LL))(v165, &v247);
v166 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v165 + 960LL);
LOWORD(v249[0]) = 7936;
BYTE2(v249[0]) = 79;
v167 = (cocos2d::CCArray *)v166(v165, v249);
v168 = (cocos2d::CCObject *)cocos2d::CCArray::create(v167);
*(this + 59) = v168;
cocos2d::CCObject::retain(v168);
v169 = (cocos2d::CCMenu *)cocos2d::CCArray::removeAllObjects(v147);
v170 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v169);
(*((void (__fastcall **)(CCTextInputNode **, cocos2d::CCNode *, __int64))*this + 58))(this, v170, 10);
if ( !*((_DWORD *)this + 108) )
{
v172 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_timeIcon_001.png", v171);
v173 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v172, 0, 0, 0, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCObject *))(*(_QWORD *)v170 + 456LL))(v170, v173);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v173 + 1056LL))(v173, 0);
cocos2d::CCArray::addObject(v147, v173);
for ( k = 0; k != 6; ++k )
{
GJGameLevel::lengthKeyToString(v254, (GJGameLevel *)k, (int)v171);
v178 = (cocos2d::CCLabelBMFont *)((char *)v254 + 1);
if ( (v254[0] & 1) != 0 )
v178 = (cocos2d::CCLabelBMFont *)v255;
v179 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v178, "bigFont.fnt", v177);
if ( (v254[0] & 1) != 0 )
operator delete(v255);
v175 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v179 + 1072LL);
memset(v249, 125, 3);
v175(v179, v249);
cocos2d::CCArray::addObject(*(this + 59), v179);
(*(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v179 + 160LL))(v179, 0.42);
v176 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(__int64)v179,
0,
(__int64)this,
(__int64)LevelSearchLayer::toggleTime,
0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v176 + 72LL))(v176, k);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCObject *))(*(_QWORD *)v170 + 456LL))(v170, v176);
cocos2d::CCArray::addObject(v147, v176);
}
}
v180 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_starsIcon_001.png", v171);
*(this + 56) = (CCTextInputNode *)v180;
v181 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v180,
0,
(__int64)this,
(__int64)LevelSearchLayer::toggleStar,
0);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCObject *))(*(_QWORD *)v170 + 456LL))(v170, v181);
cocos2d::CCArray::addObject(v147, v181);
if ( *((_DWORD *)this + 108) == 1 )
{
v224 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_noStarsIcon_001.png", v182);
*(this + 57) = (CCTextInputNode *)v224;
v225 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v224,
0,
(__int64)this,
(__int64)LevelSearchLayer::toggleNoStar,
0);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCObject *))(*(_QWORD *)v170 + 456LL))(v170, v225);
cocos2d::CCArray::addObject(v147, v225);
}
cocos2d::CCNode::convertToNodeSpace(v249, v170, (const cocos2d::CCPoint *)&v247);
GameToolbox::alignItemsHorisontally((__int64)v147, (__int64)v249, 0, 12.0);
for ( m = 0; m < (*(unsigned int (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v170 + 496LL))(v170); ++m )
{
v184 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v170 + 488LL))(v170);
v185 = cocos2d::CCArray::objectAtIndex(v184, m);
CCMenuItemSpriteExtra::setSizeMult(v185, 1.3);
}
v187 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v186);
v188 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v187, 0, (__int64)this, (__int64)LevelSearchLayer::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v188, 1.5);
v189 = (cocos2d::CCDirector **)cocos2d::CCMenu::create(v188, nullptr);
(*((void (__fastcall **)(CCTextInputNode **, cocos2d::CCDirector **, __int64))*this + 58))(this, v189, 1);
v190 = *((__int64 (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v189 + 23);
v191 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v189);
v192 = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v191);
v194 = v193 + 24.0;
v195 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v192);
cocos2d::CCDirector::getScreenTop(v195);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v249, v194, v196 - 23.0);
v197 = (PlatformToolbox *)v190(v189, v249);
isControllerConnected = (unsigned __int8)PlatformToolbox::isControllerConnected(v197);
if ( (_BYTE)isControllerConnected )
isControllerConnected = GameToolbox::addBackButton((GameToolbox *)this, v188, v199);
for ( n = 0; n != 8; ++n )
{
v201 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)isControllerConnected);
DiffVal = GameLevelManager::getDiffVal(v201, n);
isControllerConnected = LevelSearchLayer::toggleDifficultyNum((LevelSearchLayer *)this, n, DiffVal);
}
for ( ii = 0; ii != 6; ++ii )
{
v204 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)isControllerConnected);
LenVal = GameLevelManager::getLenVal(v204, ii);
isControllerConnected = LevelSearchLayer::toggleTimeNum((LevelSearchLayer *)this, ii, LenVal);
}
v206 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)isControllerConnected);
BoolForKey = GameLevelManager::getBoolForKey(v206, "star_filter");
v208 = -1;
if ( !BoolForKey )
v208 = 125;
v209 = (__int64)*(this + 56);
v210 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v209 + 960LL);
LOBYTE(v249[0]) = v208;
BYTE1(v249[0]) = v208;
BYTE2(v249[0]) = v208;
v210(v209, v249);
v211 = *(this + 57);
if ( v211 )
{
v212 = (GameLevelManager *)GameLevelManager::sharedState(v211);
v213 = GameLevelManager::getBoolForKey(v212, "nostar_filter");
v214 = -1;
if ( !v213 )
v214 = 125;
v215 = (__int64)*(this + 57);
v216 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v215 + 960LL);
LOBYTE(v249[0]) = v214;
BYTE1(v249[0]) = v214;
BYTE2(v249[0]) = v214;
v216(v215, v249);
}
v217 = (__int64)*(this + 60);
DiffKey = (char *)LevelSearchLayer::getDiffKey((LevelSearchLayer *)this, &byte_6);
v256[0] = 0;
v256[1] = 0;
v257 = nullptr;
v218 = strlen(DiffKey);
std::string::__init(v256, DiffKey, v218);
v219 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v217, v256);
v220 = cocos2d::CCString::boolValue(v219);
if ( (v256[0] & 1) != 0 )
operator delete(v257);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 62) + 1056LL))(*(this + 62), v220);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 62) + 344LL))(*(this + 62), v220);
v221 = *((void (__fastcall **)(CCTextInputNode **, _QWORD))*this + 148);
v222 = (GameLevelManager *)GameLevelManager::sharedState(*this);
IntForKey = GameLevelManager::getIntForKey(v222, "demon_filter");
v221(this, IntForKey);
if ( (v250[0] & 1) != 0 )
operator delete(v251);
return v232;
}