//
// LevelSearchLayer::init from 0x14030c190 to 0x14030e176 (8166 bytes)
//
// 2 xrefs:
// > LevelSearchLayer::scene @ 0x14030c13f
// > ??> @ 0x1406d4700
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=18
bool LevelSearchLayer::init(LevelSearchLayer *a1, int a2)
{
float v2; // xmm0_4
bool result; // al
_BOOL8 v6; // rdx
_DWORD *v7; // rax
_BOOL8 v8; // rdx
__int64 v9; // rcx
cocos2d::CCDictionary *v10; // rax
__int64 v11; // rcx
cocos2d::CCDirector *v12; // rax
struct cocos2d::CCSprite *v13; // rdi
cocos2d::CCSprite_vtbl *v14; // rbx
const cocos2d::CCPoint *v15; // rax
float v16; // xmm0_4
cocos2d::CCSprite_vtbl *v17; // rbx
double v18; // xmm0_8
const cocos2d::CCPoint *v19; // rax
struct cocos2d::CCSprite *v20; // rdi
cocos2d::CCSprite_vtbl *v21; // rbx
const cocos2d::CCPoint *v22; // rax
cocos2d::CCSprite_vtbl *v23; // rbx
__int64 v24; // rcx
cocos2d::CCDirector *v25; // rax
__int64 v26; // rcx
cocos2d::CCDirector *v27; // rax
float v28; // xmm0_4
double v29; // xmm0_8
const cocos2d::CCPoint *v30; // rax
struct cocos2d::CCSprite *v31; // rdi
cocos2d::CCSprite_vtbl *v32; // rbx
const cocos2d::CCPoint *v33; // rax
cocos2d::CCSprite_vtbl *v34; // rbx
__int64 v35; // rcx
cocos2d::CCDirector *v36; // rax
__int64 v37; // rcx
cocos2d::CCDirector *v38; // rax
float v39; // xmm0_4
const cocos2d::CCPoint *v40; // rax
__int64 v41; // rcx
cocos2d::CCNode *v42; // r12
__int64 v43; // rcx
cocos2d::CCDirector *v44; // rax
__int64 v45; // rcx
cocos2d::CCDirector *v46; // rax
float ScreenRight; // xmm0_4
double v48; // xmm0_8
struct cocos2d::CCSprite *v49; // rbx
CCMenuItemSpriteExtra *v50; // rdi
CCMenuItemSpriteExtra_vtbl *v51; // rbx
struct cocos2d::CCPoint v52; // rax
struct cocos2d::CCSprite *v53; // rbx
CCMenuItemSpriteExtra *v54; // rsi
__int64 v55; // rax
const char *v56; // rcx
struct cocos2d::CCSprite *v57; // rbx
CCMenuItemSpriteExtra *v58; // rdi
float v59; // xmm0_4
__int64 v60; // rax
float v61; // xmm0_4
struct cocos2d::CCRect *v62; // rax
struct cocos2d::extension::CCScale9Sprite *v63; // rbx
__int64 v64; // rdx
struct cocos2d::CCRect *v65; // rax
struct cocos2d::extension::CCScale9Sprite *v66; // rbx
__int64 v67; // rdx
float v68; // xmm0_4
const char *v69; // rdx
size_t v70; // r8
const char *v71; // r9
const char *v72; // r8
CCTextInputNode *v73; // rax
float v74; // xmm0_4
float v75; // xmm0_4
cocos2d::CCTextFieldTTF *m_textField; // rbx
cocos2d::CCTextFieldTTF_vtbl *v77; // rdi
__int64 v78; // rax
float v79; // xmm0_4
cocos2d::CCLabelBMFont *m_textLabel; // rbx
cocos2d::CCLabelBMFont_vtbl *v81; // rdi
const cocos2d::CCPoint *v82; // rax
CCTextInputNode *m_searchInput; // rcx
CCTextInputNode *v84; // rcx
std::string *p_m_allowedChars; // rcx
void **v86; // rdx
const char *v87; // rdx
__int64 v88; // rcx
cocos2d::CCNode *v89; // rsi
struct cocos2d::CCSprite *v90; // rax
CCMenuItemSpriteExtra *v91; // rdi
float v92; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v93; // rbx
struct cocos2d::CCPoint v94; // rax
struct cocos2d::CCSprite *v95; // rax
CCMenuItemSpriteExtra *v96; // rdi
float v97; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v98; // rbx
struct cocos2d::CCPoint v99; // rax
struct cocos2d::CCSprite *v100; // rax
CCMenuItemSpriteExtra *v101; // rdi
float v102; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v103; // rbx
struct cocos2d::CCPoint v104; // rax
float v105; // xmm0_4
double v106; // xmm0_8
struct cocos2d::CCLabelBMFont *v107; // rbx
struct cocos2d::CCRect *v108; // rax
struct cocos2d::extension::CCScale9Sprite *v109; // rbx
__int64 v110; // rdx
double v111; // xmm0_8
__int64 v112; // rax
__int64 v113; // rcx
cocos2d::CCNode *v114; // r15
const char *v115; // rcx
SearchButton *v116; // rax
const char *v117; // rcx
SearchButton *v118; // rax
const char *v119; // rcx
SearchButton *v120; // rsi
cocos2d::CCSprite *m_icon; // rdi
__int64 v122; // rax
CCMenuItemSpriteExtra *v123; // r13
const char *v124; // rcx
SearchButton *v125; // rax
CCMenuItemSpriteExtra *v126; // r12
const char *v127; // rcx
SearchButton *v128; // rax
CCMenuItemSpriteExtra *v129; // r15
cocos2d::CCNode *v130; // rdi
const char *v131; // rcx
SearchButton *v132; // rax
CCMenuItemSpriteExtra *v133; // r14
const char *v134; // rcx
SearchButton *v135; // rax
cocos2d::CCObject *v136; // rbx
CCMenuItemSpriteExtra *v137; // rsi
const char *v138; // rcx
SearchButton *v139; // rax
CCMenuItemSpriteExtra *v140; // rdi
const char *v141; // rcx
SearchButton *v142; // rax
CCMenuItemSpriteExtra *v143; // rbx
float v144; // xmm0_4
float v145; // xmm0_4
float v146; // xmm0_4
float v147; // xmm0_4
float v148; // xmm0_4
float v149; // xmm0_4
float v150; // xmm0_4
float v151; // xmm0_4
float v152; // xmm0_4
double v153; // xmm0_8
GJAccountManager *v154; // rax
const char *v155; // rcx
SearchButton *v156; // rax
LevelSearchLayer *v157; // rsi
CCMenuItemSpriteExtra *v158; // rbx
float v159; // xmm0_4
double v160; // xmm0_8
struct cocos2d::CCLabelBMFont *v161; // rbx
struct cocos2d::CCRect *v162; // rax
struct cocos2d::extension::CCScale9Sprite *v163; // rbx
__int64 v164; // rdx
__int64 v165; // rax
__int64 v166; // rcx
cocos2d::CCObject *v167; // rax
__int64 v168; // rcx
cocos2d::CCArray *v169; // r13
__int64 v170; // rcx
cocos2d::CCNode *v171; // r14
int v172; // edi
cocos2d::CCString *v173; // rax
const char *CString; // rax
const char *v175; // rcx
struct cocos2d::CCSprite *v176; // r15
CCMenuItemSpriteExtra *v177; // rbx
struct cocos2d::CCPoint v178; // rax
unsigned int v179; // r15d
unsigned int v180; // ebx
size_t i; // r12
cocos2d::CCArray *v182; // rax
struct cocos2d::CCSprite *v183; // rdi
CCMenuItemSpriteExtra *v184; // rbx
float v185; // xmm0_4
struct cocos2d::CCPoint v186; // rax
float v187; // xmm0_4
struct cocos2d::CCRect *v188; // rax
struct cocos2d::extension::CCScale9Sprite *v189; // rbx
__int64 v190; // rdx
__int64 v191; // rax
__int64 v192; // rcx
cocos2d::CCObject *v193; // rax
__int64 v194; // rcx
cocos2d::CCNode *v195; // rdi
struct cocos2d::CCSprite *v196; // r14
CCMenuItemSpriteExtra *v197; // rax
cocos2d::CCObject *v198; // rbx
__int64 v199; // rax
struct cocos2d::CCLabelBMFont *v200; // r14
CCMenuItemSpriteExtra *v201; // rbx
struct cocos2d::CCSprite *v202; // r14
CCMenuItemSpriteExtra *v203; // rbx
struct cocos2d::CCPoint v204; // rax
unsigned int j; // ebx
cocos2d::CCArray *v206; // rax
struct cocos2d::CCSprite *v207; // rbx
CCMenuItemSpriteExtra *v208; // r14
struct cocos2d::CCMenu *v209; // rdi
cocos2d::CCMenu_vtbl *v210; // rbx
__int64 v211; // rcx
cocos2d::CCDirector *v212; // rax
__int64 v213; // rcx
cocos2d::CCDirector *v214; // rax
float v215; // xmm0_4
const cocos2d::CCPoint *v216; // rax
__int64 v217; // rdx
__int64 v218; // rcx
int k; // ebx
__int64 v220; // rdi
cocos2d::CCString *v221; // rax
const char *v222; // rax
size_t v223; // r8
cocos2d::CCString *v224; // rax
bool v225; // di
void *origin; // rcx
int m; // ebx
__int64 v228; // rdi
cocos2d::CCString *v229; // rax
const char *v230; // rax
size_t v231; // r8
cocos2d::CCString *v232; // rax
bool v233; // di
void *v234; // rcx
__int64 v235; // rcx
cocos2d::CCString *v236; // rax
bool v237; // bl
void *v238; // rcx
cocos2d::CCRGBAProtocol *v239; // rcx
cocos2d::CCString *v240; // rax
const char *v241; // rax
cocos2d::CCString *v242; // rax
bool v243; // bl
void *v244; // rcx
__int64 v245; // rcx
cocos2d::CCString *v246; // rax
int v247; // ebx
void *v248; // rcx
int v249; // [rsp+28h] [rbp-E0h]
__int64 v250; // [rsp+38h] [rbp-D0h] BYREF
CCMenuItemSpriteExtra *v251; // [rsp+40h] [rbp-C8h] BYREF
cocos2d::CCNode *v252; // [rsp+48h] [rbp-C0h] BYREF
struct cocos2d::CCPoint v253; // [rsp+50h] [rbp-B8h] BYREF
float v254; // [rsp+58h] [rbp-B0h]
cocos2d::CCSize v255; // [rsp+60h] [rbp-A8h] BYREF
__int64 v256; // [rsp+68h] [rbp-A0h] BYREF
CCMenuItemSpriteExtra *v257; // [rsp+70h] [rbp-98h] BYREF
cocos2d::CCPoint v258; // [rsp+78h] [rbp-90h] BYREF
cocos2d::CCPoint v259; // [rsp+80h] [rbp-88h] BYREF
LevelSearchLayer *v260; // [rsp+88h] [rbp-80h]
cocos2d::CCPoint v261; // [rsp+90h] [rbp-78h] BYREF
void *Src[2]; // [rsp+98h] [rbp-70h] BYREF
size_t Size; // [rsp+A8h] [rbp-60h]
unsigned __int64 v264; // [rsp+B0h] [rbp-58h]
cocos2d::CCPoint v265; // [rsp+B8h] [rbp-50h] BYREF
cocos2d::CCSize v266; // [rsp+C0h] [rbp-48h] BYREF
cocos2d::CCRect v267; // [rsp+C8h] [rbp-40h] BYREF
cocos2d::CCSize v268; // [rsp+E0h] [rbp-28h] BYREF
cocos2d::CCRect v269; // [rsp+E8h] [rbp-20h] BYREF
void *Block[2]; // [rsp+118h] [rbp+10h] BYREF
__int64 v271; // [rsp+128h] [rbp+20h]
unsigned __int64 v272; // [rsp+130h] [rbp+28h]
cocos2d::CCRect v273; // [rsp+138h] [rbp+30h] BYREF
__int64 v274; // [rsp+148h] [rbp+40h]
unsigned __int64 v275; // [rsp+150h] [rbp+48h]
cocos2d::CCRect v276; // [rsp+158h] [rbp+50h] BYREF
__int64 v277; // [rsp+168h] [rbp+60h]
unsigned __int64 v278; // [rsp+170h] [rbp+68h]
__int128 v279; // [rsp+178h] [rbp+70h] BYREF
__int64 v280; // [rsp+188h] [rbp+80h]
unsigned __int64 v281; // [rsp+190h] [rbp+88h]
v260 = a1;
result = cocos2d::CCLayer::init(a1);
if ( !result )
return result;
v7 = (_DWORD *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v251 = (CCMenuItemSpriteExtra *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v251);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v7 = (_DWORD *)qword_1406C2ED8;
}
v7[237] = -1;
v7[175] = 4;
a1->m_type = a2;
v7[302] = a2;
LOBYTE(v6) = 1;
a1->setKeypadEnabled(a1, v6);
LOBYTE(v8) = 1;
a1->setKeyboardEnabled(a1, v8);
v10 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(v9);
a1->m_difficultyDict = v10;
cocos2d::CCObject::retain(v10);
v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);
cocos2d::CCDirector::getWinSize(v12);
v13 = cocos2d::CCSprite::create("GJ_gradientBG.png");
v14 = v13->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v2, 0.0);
v14->setAnchorPoint(v13, v15);
a1->addChild_0(a1, v13, -3);
((void (__fastcall *)(struct cocos2d::CCSprite *))v13->setScaleX)(v13);
v16 = ((float (__fastcall *)(struct cocos2d::CCSprite *))v13->setScaleY)(v13);
v17 = v13->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v18 = cocos2d::CCPoint::CCPoint(v16, -5.0);
v17->setPosition_0(v13, v19);
LOWORD(v250) = 26112;
BYTE2(v250) = -1;
v13->setColor(&v13->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
v20 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
v21 = v20->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v18, 0.0);
v21->setAnchorPoint(v20, v22);
v23 = v20->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v25 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v24);
cocos2d::CCDirector::getScreenBottom(v25);
v27 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v26);
v28 = cocos2d::CCDirector::getScreenLeft(v27) - 1.0;
v29 = cocos2d::CCPoint::CCPoint(v28, v28);
v23->setPosition_0(v20, v30);
a1->addChild_0(a1, v20, 1);
v31 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
v32 = v31->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v29, 1.0);
v32->setAnchorPoint(v31, v33);
v34 = v31->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v36 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v35);
cocos2d::CCDirector::getScreenBottom(v36);
v38 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v37);
v39 = cocos2d::CCDirector::getScreenRight(v38) + 1.0;
cocos2d::CCPoint::CCPoint(v39, v39);
v34->setPosition_0(v31, v40);
cocos2d::CCSprite::setFlipX(v31, 1);
a1->addChild_0(a1, v31, 1);
cocos2d::CCRect::CCRect(&v267, 0.0, 0.0, 80.0, 80.0);
v42 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v41);
a1->addChild_0(a1, v42, 2);
v44 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v43);
cocos2d::CCDirector::getScreenTop(v44);
v46 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v45);
ScreenRight = cocos2d::CCDirector::getScreenRight(v46);
v48 = cocos2d::CCPoint::CCPoint(ScreenRight - 25.0, ScreenRight - 25.0);
v49 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v49->setScale_0)(v49);
v50 = CCMenuItemSpriteExtra::create(
v49,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)LevelSearchLayer::confirmClearFilters);
v42->addChild_1(v42, v50);
v51 = v50->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v52 = cocos2d::CCNode::convertToNodeSpace(v42, (const struct cocos2d::CCPoint *)&v251);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v51->setPosition_0)(v50, v52);
v53 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plusBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v53->setScale_0)(v53);
v54 = CCMenuItemSpriteExtra::create(v53, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onMoreOptions);
v42->addChild_1(v42, v54);
HIDWORD(v54->m_pfnSelector.adj) = 1069547520;
if ( a1->m_type == 1 )
{
memset(&v250, 125, 3);
v53->setColor(&v53->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
*(float *)&v48 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v54->setEnabled)(v54, 0);
}
cocos2d::CCPoint::CCPoint(*(float *)&v48, 0.0);
v55 = (__int64)v50->getPosition_0(v50);
cocos2d::CCPoint::operator+(v55, &v252);
v54->setPosition_0(v54, (const cocos2d::CCPoint *)&v252);
v56 = "GJ_viewLevelsBtn_001.png";
if ( !a1->m_type )
v56 = "GJ_viewListsBtn_001.png";
v57 = cocos2d::CCSprite::createWithSpriteFrameName(v56);
((void (__fastcall *)(struct cocos2d::CCSprite *))v57->setScale_0)(v57);
v58 = CCMenuItemSpriteExtra::create(v57, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onSearchMode);
v59 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v42->addChild_1)(v42, v58);
cocos2d::CCPoint::CCPoint(v59, 0.0);
v60 = (__int64)v54->getPosition_0(v54);
cocos2d::CCPoint::operator+(v60, &v252);
v61 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCNode **))v58->setPosition_0)(v58, &v252);
cocos2d::CCPoint::CCPoint(v61, v254 * 0.5);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)Block, &v267);
v63 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v62);
LOBYTE(v64) = -1;
v63->setOpacity(&v63->cocos2d::CCRGBAProtocol, v64);
cocos2d::CCSize::CCSize(&v255, 365.0, 40.0);
v63->setContentSize(v63, &v255);
a1->addChild_0(a1, v63, -2);
v63->setPosition_0(v63, (const cocos2d::CCPoint *)&v256);
LOWORD(v250) = 14336;
BYTE2(v250) = -115;
v63->setColor(&v63->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)Block, 0.0, 0.0, 40.0, 40.0);
v66 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v65);
LOBYTE(v67) = -1;
v66->setOpacity(&v66->cocos2d::CCRGBAProtocol, v67);
cocos2d::CCSize::CCSize(&v268, 210.0, 30.0);
v66->setContentSize(v66, &v268);
v68 = ((float (__fastcall *)(LevelSearchLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))a1->addChild_0)(
a1,
v66,
0xFFFFFFFFLL);
cocos2d::CCPoint::CCPoint(v68, -73.0);
cocos2d::CCPoint::operator+(&v256, &v252);
v66->setPosition_0(v66, (const cocos2d::CCPoint *)&v252);
LOWORD(v250) = 9984;
BYTE2(v250) = 98;
v66->setColor(&v66->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
v69 = "Enter a level, user or id";
if ( a1->m_type == 1 )
v69 = "Enter a list or id";
v279 = 0;
v280 = 0;
v281 = 0;
v70 = -1;
do
++v70;
while ( v69[v70] );
sub_14003A930(&v279, v69, v70);
v72 = (const char *)&v279;
if ( v281 > 0xF )
v72 = (const char *)v279;
v73 = CCTextInputNode::create(194.0, 50.0, v72, v71, v249, (const char *)&qword_14052A4D8);
a1->m_searchInput = v73;
v74 = ((float (__fastcall *)(LevelSearchLayer *, CCTextInputNode *, __int64))a1->addChild_0)(a1, v73, 20);
a1->m_searchInput->m_delegate = &a1->TextInputDelegate;
cocos2d::CCPoint::CCPoint(v74, -174.0);
cocos2d::CCPoint::operator+(&v256, &v252);
v75 = ((float (__fastcall *)(CCTextInputNode *, cocos2d::CCNode **))a1->m_searchInput->setPosition_0)(
a1->m_searchInput,
&v252);
m_textField = a1->m_searchInput->m_textField;
v77 = m_textField->cocos2d::CCLabelTTF::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v75, 0.0);
v79 = ((float (__fastcall *)(cocos2d::CCTextFieldTTF *, __int64))v77->setAnchorPoint)(m_textField, v78);
m_textLabel = a1->m_searchInput->m_textLabel;
v81 = m_textLabel->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v79, 0.0);
v81->setAnchorPoint(m_textLabel, v82);
m_searchInput = a1->m_searchInput;
m_searchInput->m_maxLabelScale = 0.69999999;
CCTextInputNode::refreshLabel(m_searchInput);
v84 = a1->m_searchInput;
v84->m_maxLabelWidth = 194.0;
CCTextInputNode::refreshLabel(v84);
a1->m_searchInput->m_textField->setVisible(a1->m_searchInput->m_textField, 0);
a1->m_searchInput->m_maxLabelLength = 20;
*(_OWORD *)Src = 0;
Size = 0;
v264 = 15;
Src[0] = sub_14003AA10(0x40u);
Size = 63;
v264 = 63;
strcpy((char *)Src[0], " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
v251 = (CCMenuItemSpriteExtra *)Src;
p_m_allowedChars = &a1->m_searchInput->m_allowedChars;
if ( p_m_allowedChars != (std::string *)Src )
{
v86 = Src;
if ( v264 > 0xF )
v86 = (void **)Src[0];
sub_14003CCE0((void **)p_m_allowedChars, v86, Size);
}
sub_14003A830((__int64)Src);
v87 = (const char *)&v279;
if ( v281 > 0xF )
v87 = (const char *)v279;
LevelSearchLayer::updateSearchLabel(a1, v87);
v89 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v88);
a1->addChild_1(a1, v89);
v90 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn06_001.png");
v91 = CCMenuItemSpriteExtra::create(v90, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onSearch);
v92 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v89->addChild_1)(v89, v91);
cocos2d::CCPoint::CCPoint(v92, 63.0);
cocos2d::CCPoint::operator+(&v256, &v252);
v93 = v91->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v94 = cocos2d::CCNode::convertToNodeSpace(v89, (const struct cocos2d::CCPoint *)&v257);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v93->setPosition_0)(v91, v94);
v95 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn05_001.png");
v96 = CCMenuItemSpriteExtra::create(v95, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onSearchUser);
v97 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v89->addChild_1)(v89, v96);
cocos2d::CCPoint::CCPoint(v97, 110.0);
cocos2d::CCPoint::operator+(&v256, &v252);
v98 = v96->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v99 = cocos2d::CCNode::convertToNodeSpace(v89, (const struct cocos2d::CCPoint *)&v257);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v98->setPosition_0)(v96, v99);
v100 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn07_001.png");
v101 = CCMenuItemSpriteExtra::create(
v100,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)LevelSearchLayer::onClearFreeSearch);
v102 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v89->addChild_1)(v89, v101);
cocos2d::CCPoint::CCPoint(v102, 157.0);
cocos2d::CCPoint::operator+(&v256, &v252);
v103 = v101->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v104 = cocos2d::CCNode::convertToNodeSpace(v89, (const struct cocos2d::CCPoint *)&v257);
v105 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v103->setPosition_0)(v101, v104);
v106 = cocos2d::CCPoint::CCPoint(v105, v254 * 0.5);
v107 = cocos2d::CCLabelBMFont::create("Quick Search", (const char *)&qword_14052A4D8);
cocos2d::CCPoint::CCPoint(*(float *)&v106, 0.0);
cocos2d::CCPoint::operator+(&v259, &v252);
v107->setPosition_0(v107, (const cocos2d::CCPoint *)&v252);
a1->addChild_1(a1, v107);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v107->setScale_0)(v107);
cocos2d::CCRect::CCRect(&v269, &v267);
v109 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v108);
LOBYTE(v110) = -1;
v109->setOpacity(&v109->cocos2d::CCRGBAProtocol, v110);
v111 = cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v251, 365.0, 115.0);
cocos2d::CCSize::operator=(&v255, v112);
v109->setContentSize(v109, &v255);
a1->addChild_0(a1, v109, -1);
v109->setPosition_0(v109, &v259);
LOWORD(v250) = 11776;
BYTE2(v250) = 117;
v109->setColor(&v109->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
v114 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v113);
v252 = v114;
a1->addChild_1(a1, v114);
cocos2d::CCNode::convertToNodeSpace(v114, &v253);
v116 = SearchButton::create(v115, "Downloads", 0.43000001, "GJ_sDownloadIcon_001.png");
v257 = CCMenuItemSpriteExtra::create(
v116,
nullptr,
a1,
(cocos2d::SEL_MenuHandler *)LevelSearchLayer::onMostDownloaded);
v114->addChild_1(v114, v257);
v118 = SearchButton::create(v117, "Likes", 0.5, "GJ_sLikeIcon_001.png");
v251 = CCMenuItemSpriteExtra::create(v118, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onMostLikes);
v114->addChild_1(v114, v251);
v120 = SearchButton::create(v119, "Sent", 0.5, "GJ_sModIcon_001.png");
m_icon = v120->m_icon;
cocos2d::CCPoint::CCPoint(*(float *)&v111, 0.0);
v122 = (__int64)m_icon->getPosition_0(m_icon);
cocos2d::CCPoint::operator+(v122, &v261);
m_icon->setPosition_0(m_icon, &v261);
v123 = CCMenuItemSpriteExtra::create(v120, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onSuggested);
v114->addChild_1(v114, v123);
v125 = SearchButton::create(v124, "Trending", 0.5, "GJ_sTrendingIcon_001.png");
v126 = CCMenuItemSpriteExtra::create(v125, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onTrending);
v114->addChild_1(v114, v126);
v128 = SearchButton::create(v127, "Recent", 0.5, "GJ_sRecentIcon_001.png");
v129 = CCMenuItemSpriteExtra::create(v128, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onMostRecent);
v130 = v252;
v252->addChild_1(v252, v129);
v132 = SearchButton::create(v131, (const char *)&dword_140564790, 0.5, "GJ_sMagicIcon_001.png");
v133 = CCMenuItemSpriteExtra::create(v132, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onMagic);
v130->addChild_1(v130, v133);
v135 = SearchButton::create(v134, "Awarded", 0.5, "GJ_sStarsIcon_001.png");
v136 = v260;
v137 = CCMenuItemSpriteExtra::create(v135, nullptr, v260, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onLatestStars);
v130->addChild_1(v130, v137);
v139 = SearchButton::create(v138, "Followed", 0.5, "GJ_sFollowedIcon_001.png");
v140 = CCMenuItemSpriteExtra::create(v139, nullptr, v136, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onFollowed);
v252->addChild_1(v252, v140);
v142 = SearchButton::create(v141, "Friends", 0.5, "GJ_sFriendsIcon_001.png");
v143 = CCMenuItemSpriteExtra::create(v142, nullptr, v136, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onFriends);
v144 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v252->addChild_1)(v252, v143);
cocos2d::CCPoint::CCPoint(v144, -119.0);
cocos2d::CCPoint::operator+(&v253, &v261);
v145 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v257->setPosition_0)(v257, &v261);
cocos2d::CCPoint::CCPoint(v145, 0.0);
cocos2d::CCPoint::operator+(&v253, &v257);
v146 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, CCMenuItemSpriteExtra **))v251->setPosition_0)(v251, &v257);
cocos2d::CCPoint::CCPoint(v146, 119.0);
cocos2d::CCPoint::operator+(&v253, &v251);
v147 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, CCMenuItemSpriteExtra **))v123->setPosition_0)(v123, &v251);
cocos2d::CCPoint::CCPoint(v147, -119.0);
cocos2d::CCPoint::operator+(&v253, &v251);
v148 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, CCMenuItemSpriteExtra **))v126->setPosition_0)(v126, &v251);
cocos2d::CCPoint::CCPoint(v148, 0.0);
cocos2d::CCPoint::operator+(&v253, &v251);
v149 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, CCMenuItemSpriteExtra **))v129->setPosition_0)(v129, &v251);
cocos2d::CCPoint::CCPoint(v149, 119.0);
cocos2d::CCPoint::operator+(&v253, &v251);
v150 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, CCMenuItemSpriteExtra **))v133->setPosition_0)(v133, &v251);
cocos2d::CCPoint::CCPoint(v150, -119.0);
cocos2d::CCPoint::operator+(&v253, &v251);
v151 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, CCMenuItemSpriteExtra **))v137->setPosition_0)(v137, &v251);
cocos2d::CCPoint::CCPoint(v151, 0.0);
cocos2d::CCPoint::operator+(&v253, &v251);
v152 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, CCMenuItemSpriteExtra **))v140->setPosition_0)(v140, &v251);
cocos2d::CCPoint::CCPoint(v152, 119.0);
v153 = cocos2d::CCPoint::operator+(&v253, &v251);
v143->setPosition_0(v143, (const cocos2d::CCPoint *)&v251);
v154 = GJAccountManager::sharedState();
v155 = (const char *)(unsigned int)(v154->m_accountID - v154->m_unkInt1);
if ( (_DWORD)v155 == 2795 )
{
v156 = SearchButton::create(v155, "Star Award", 0.5, "GJ_sMagicIcon_001.png");
v157 = v260;
v158 = CCMenuItemSpriteExtra::create(v156, nullptr, v260, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onStarAward);
v159 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v252->addChild_1)(v252, v158);
cocos2d::CCPoint::CCPoint(v159, 0.0);
v153 = cocos2d::CCPoint::operator+(&v253, &v251);
v158->setPosition_0(v158, (const cocos2d::CCPoint *)&v251);
}
else
{
v157 = v260;
}
v160 = cocos2d::CCPoint::CCPoint(*(float *)&v153, v254 * 0.5);
v161 = cocos2d::CCLabelBMFont::create("Filters", (const char *)&qword_14052A4D8);
cocos2d::CCPoint::CCPoint(*(float *)&v160, 0.0);
cocos2d::CCPoint::operator+(&v258, &v251);
v161->setPosition_0(v161, (const cocos2d::CCPoint *)&v251);
v157->addChild_1(v157, v161);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v161->setScale_0)(v161);
cocos2d::CCRect::CCRect(&v273, &v267);
v163 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v162);
LOBYTE(v164) = -1;
v163->setOpacity(&v163->cocos2d::CCRGBAProtocol, v164);
cocos2d::CCSize::CCSize(&v266, 365.0, 50.0);
cocos2d::CCSize::operator=(&v255, v165);
v163->setContentSize(v163, &v255);
v157->addChild_0(v157, v163, -1);
v163->setPosition_0(v163, &v258);
LOWORD(v250) = 9216;
BYTE2(v250) = 91;
v163->setColor(&v163->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
v167 = (cocos2d::CCObject *)cocos2d::CCArray::create(v166);
v157->m_difficultySprites = (cocos2d::CCArray *)v167;
cocos2d::CCObject::retain(v167);
v169 = (cocos2d::CCArray *)cocos2d::CCArray::create(v168);
v171 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v170);
v157->addChild_0(v157, v171, 10);
v172 = 0;
LOWORD(v250) = 32125;
do
{
while ( 1 )
{
v173 = cocos2d::CCString::createWithFormat("difficulty_%02d_btn_001.png", v172);
CString = cocos2d::CCString::getCString(v173);
v175 = "difficulty_auto_btn_001.png";
if ( v172 != 7 )
v175 = CString;
v176 = cocos2d::CCSprite::createWithSpriteFrameName(v175);
memset(&v250, 125, 3);
v176->setColor(&v176->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
cocos2d::CCArray::addObject(v157->m_difficultySprites, v176);
((void (__fastcall *)(struct cocos2d::CCSprite *))v176->setScale_0)(v176);
Block[0] = operator new(0x208u);
v177 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)Block[0]);
if ( v177 )
{
if ( CCMenuItemSpriteExtra::init(
v177,
v176,
nullptr,
v157,
(cocos2d::SEL_MenuHandler *)LevelSearchLayer::toggleDifficulty) )
{
cocos2d::CCObject::autorelease(v177);
goto LABEL_31;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v177->~CCMenuItemSpriteExtra)(v177, 1);
}
v177 = nullptr;
LABEL_31:
v177->setTag(v177, v172);
v171->addChild_1(v171, v177);
cocos2d::CCArray::addObject(v169, v177);
if ( v172 != 6 )
break;
v157->m_lastDifficultySprite = v176;
v172 = 7;
}
++v172;
}
while ( v172 <= 7 );
v178 = cocos2d::CCNode::convertToNodeSpace(v171, (const struct cocos2d::CCPoint *)Block);
GameToolbox::alignItemsHorisontally(v169, 18.0, v178, 0);
v179 = 0;
v180 = 0;
for ( i = -1;
v180 < v171->getChildrenCount(v171);
cocos2d::CCArray::objectAtIndex(v182, v180++)[6].m_uUnknown = 1069547520 )
{
v182 = v171->getChildren(v171);
}
v183 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
Block[0] = operator new(0x208u);
v184 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)Block[0]);
if ( v184 )
{
if ( CCMenuItemSpriteExtra::init(
v184,
v183,
nullptr,
v157,
(cocos2d::SEL_MenuHandler *)LevelSearchLayer::onSpecialDemon) )
{
cocos2d::CCObject::autorelease(v184);
goto LABEL_41;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v184->~CCMenuItemSpriteExtra)(v184, 1);
}
v184 = nullptr;
LABEL_41:
v157->m_demonTypeButton = v184;
v185 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v171->addChild_1)(v171, v184);
cocos2d::CCPoint::CCPoint(v185, 202.5);
v186 = cocos2d::CCNode::convertToNodeSpace(v171, (const struct cocos2d::CCPoint *)&v266);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator+)(v186, &v251);
v187 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, CCMenuItemSpriteExtra **))v157->m_demonTypeButton->setPosition_0)(
v157->m_demonTypeButton,
&v251);
cocos2d::CCPoint::CCPoint(v187, v254 * 0.5);
cocos2d::CCRect::CCRect(&v276, &v267);
v189 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v188);
LOBYTE(v190) = -1;
v189->setOpacity(&v189->cocos2d::CCRGBAProtocol, v190);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v273, 365.0, 35.0);
cocos2d::CCSize::operator=(&v255, v191);
v189->setContentSize(v189, &v255);
v157->addChild_0(v157, v189, -1);
v189->setPosition_0(v189, &v265);
LOWORD(v250) = 7936;
BYTE2(v250) = 79;
v189->setColor(&v189->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
v193 = (cocos2d::CCObject *)cocos2d::CCArray::create(v192);
v157->m_lengthSprites = (cocos2d::CCArray *)v193;
cocos2d::CCObject::retain(v193);
cocos2d::CCArray::removeAllObjects(v169);
v195 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v194);
v157->addChild_0(v157, v195, 10);
if ( v157->m_type )
goto LABEL_57;
v196 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png");
Block[0] = operator new(0x208u);
v197 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)Block[0]);
v198 = v197;
if ( v197 )
{
if ( CCMenuItemSpriteExtra::init(v197, v196, nullptr, nullptr, nullptr) )
{
cocos2d::CCObject::autorelease(v198);
goto LABEL_47;
}
((void (__fastcall *)(cocos2d::CCObject *, __int64))v198->~CCObject)(v198, 1);
}
v198 = nullptr;
LABEL_47:
v195->addChild_1(v195, (cocos2d::CCNode *)v198);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v198->__vftable[12].getTag)(v198, 0);
cocos2d::CCArray::addObject(v169, v198);
LOWORD(v250) = 32125;
while ( 2 )
{
v199 = GJGameLevel::lengthKeyToString((__int64)&v273, v179);
if ( *(_QWORD *)(v199 + 24) > 0xFu )
v199 = *(_QWORD *)v199;
v200 = cocos2d::CCLabelBMFont::create((const char *)v199, (const char *)&qword_14052A4D8);
sub_14003A830((__int64)&v273);
memset(&v250, 125, 3);
v200->setColor(&v200->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v250);
cocos2d::CCArray::addObject(v157->m_lengthSprites, v200);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v200->setScale_0)(v200);
Block[0] = operator new(0x208u);
v201 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)Block[0]);
if ( v201 )
{
if ( CCMenuItemSpriteExtra::init(
v201,
v200,
nullptr,
v157,
(cocos2d::SEL_MenuHandler *)LevelSearchLayer::toggleTime) )
{
cocos2d::CCObject::autorelease(v201);
goto LABEL_55;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v201->~CCMenuItemSpriteExtra)(v201, 1);
}
v201 = nullptr;
LABEL_55:
v201->setTag(v201, v179);
v195->addChild_1(v195, v201);
cocos2d::CCArray::addObject(v169, v201);
if ( (int)++v179 < 6 )
continue;
break;
}
i = -1;
LABEL_57:
v202 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starsIcon_001.png");
v157->m_starsSprite = v202;
Block[0] = operator new(0x208u);
v203 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)Block[0]);
if ( v203 )
{
if ( CCMenuItemSpriteExtra::init(
v203,
v202,
nullptr,
v157,
(cocos2d::SEL_MenuHandler *)LevelSearchLayer::toggleStar) )
{
cocos2d::CCObject::autorelease(v203);
goto LABEL_62;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v203->~CCMenuItemSpriteExtra)(v203, 1);
}
v203 = nullptr;
LABEL_62:
v195->addChild_1(v195, v203);
cocos2d::CCArray::addObject(v169, v203);
v204 = cocos2d::CCNode::convertToNodeSpace(v195, (const struct cocos2d::CCPoint *)Block);
GameToolbox::alignItemsHorisontally(v169, 12.0, v204, 0);
for ( j = 0; j < v195->getChildrenCount(v195); cocos2d::CCArray::objectAtIndex(v206, j++)[6].m_uUnknown = 1067869798 )
v206 = v195->getChildren(v195);
v207 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
Block[0] = operator new(0x208u);
v208 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((CCMenuItemSpriteExtra *)Block[0]);
if ( v208 )
{
if ( CCMenuItemSpriteExtra::init(v208, v207, nullptr, v157, (cocos2d::SEL_MenuHandler *)LevelSearchLayer::onBack) )
{
cocos2d::CCObject::autorelease(v208);
goto LABEL_69;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v208->~CCMenuItemSpriteExtra)(v208, 1);
}
v208 = nullptr;
LABEL_69:
HIDWORD(v208->m_pfnSelector.adj) = 1069547520;
v209 = cocos2d::CCMenu::create(v208, 0);
v157->addChild_0(v157, v209, 1);
v210 = v209->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v212 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v211);
cocos2d::CCDirector::getScreenTop(v212);
v214 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v213);
v215 = cocos2d::CCDirector::getScreenLeft(v214) + 24.0;
cocos2d::CCPoint::CCPoint(v215, v215);
v210->setPosition_0(v209, v216);
if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v218, v217) + 197) )
GameToolbox::addBackButton(v157, v208);
for ( k = 0; k <= 7; ++k )
{
v220 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
Block[0] = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)Block[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v220 = qword_1406C2EC0;
}
v221 = cocos2d::CCString::createWithFormat("Diff%i", k);
v222 = cocos2d::CCString::getCString(v221);
v273 = 0;
v274 = 0;
v275 = 0;
v223 = -1;
do
++v223;
while ( v222[v223] );
sub_14003A930(&v273, v222, v223);
v224 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v220 + 344), &v273);
v225 = cocos2d::CCString::boolValue(v224);
if ( v275 > 0xF )
{
origin = (void *)v273.origin;
if ( v275 + 1 >= 0x1000 )
{
origin = *(void **)(*(_QWORD *)&v273.origin - 8LL);
if ( (unsigned __int64)(*(_QWORD *)&v273.origin - (_QWORD)origin - 8LL) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(origin);
}
v274 = 0;
v275 = 15;
LOBYTE(v273.origin.x) = 0;
LevelSearchLayer::toggleDifficultyNum(v157, k, v225);
}
for ( m = 0; m <= 5; ++m )
{
v228 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
Block[0] = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)Block[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v228 = qword_1406C2EC0;
}
v229 = cocos2d::CCString::createWithFormat("Len%i", m);
v230 = cocos2d::CCString::getCString(v229);
v276 = 0;
v277 = 0;
v278 = 0;
v231 = -1;
do
++v231;
while ( v230[v231] );
sub_14003A930(&v276, v230, v231);
v232 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v228 + 344), &v276);
v233 = cocos2d::CCString::boolValue(v232);
if ( v278 > 0xF )
{
v234 = (void *)v276.origin;
if ( v278 + 1 >= 0x1000 )
{
v234 = *(void **)(*(_QWORD *)&v276.origin - 8LL);
if ( (unsigned __int64)(*(_QWORD *)&v276.origin - (_QWORD)v234 - 8LL) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v234);
}
v277 = 0;
v278 = 15;
LOBYTE(v276.origin.x) = 0;
LevelSearchLayer::toggleTimeNum(v157, m, v233);
}
v235 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
Block[0] = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)Block[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v235 = qword_1406C2EC0;
}
v271 = 11;
v272 = 15;
Block[0] = (void *)0x6C69665F72617473LL;
Block[1] = (void *)7497076;
v236 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v235 + 344), Block);
v237 = cocos2d::CCString::boolValue(v236);
if ( v272 > 0xF )
{
v238 = Block[0];
if ( v272 + 1 >= 0x1000 )
{
v238 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v238 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v238);
}
v239 = &v157->m_starsSprite->cocos2d::CCRGBAProtocol;
if ( v237 )
{
LOWORD(v250) = -1;
BYTE2(v250) = -1;
}
else
{
memset(&v250, 125, 3);
}
v239->setColor(v239, (const cocos2d::ccColor3B *)&v250);
v240 = cocos2d::CCString::createWithFormat("D%i", 6);
v241 = cocos2d::CCString::getCString(v240);
*(_OWORD *)Block = 0;
v271 = 0;
v272 = 0;
do
++i;
while ( v241[i] );
sub_14003A930(Block, v241, i);
v242 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v157->m_difficultyDict, Block);
v243 = cocos2d::CCString::boolValue(v242);
if ( v272 > 0xF )
{
v244 = Block[0];
if ( v272 + 1 >= 0x1000 )
{
v244 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v244 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v244);
}
v157->m_demonTypeButton->setEnabled(v157->m_demonTypeButton, v243);
v157->m_demonTypeButton->setVisible(v157->m_demonTypeButton, v243);
v245 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
Block[0] = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)Block[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v245 = qword_1406C2EC0;
}
v271 = 12;
v272 = 15;
strcpy((char *)Block, "demon_filter");
BYTE5(Block[1]) = 0;
HIWORD(Block[1]) = 0;
v246 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v245 + 344), Block);
v247 = cocos2d::CCString::intValue(v246);
if ( v272 > 0xF )
{
v248 = Block[0];
if ( v272 + 1 >= 0x1000 )
{
v248 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v248 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v248);
}
v271 = 0;
v272 = 15;
LOBYTE(Block[0]) = 0;
v157->demonFilterSelectClosed(&v157->DemonFilterDelegate, v247);
sub_14003A830((__int64)&v279);
return 1;
}