//
// ItemInfoPopup::init from 0x14027b8a0 to 0x14027d7f0 (8016 bytes)
//
// 2 xrefs:
// > ItemInfoPopup::create @ 0x14027b85c
// > ??> @ 0x1406d116c
//
// 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=21
bool ItemInfoPopup::init(ItemInfoPopup *a1, int a2, UnlockType a3)
{
UnlockType v3; // r13d
ItemInfoPopup *v5; // r12
bool result; // al
_BOOL8 v7; // rdx
_BOOL8 v8; // rdx
__int64 v9; // rcx
cocos2d::CCDirector *v10; // rax
struct cocos2d::CCRect *v11; // rax
struct cocos2d::extension::CCScale9Sprite *v12; // rdi
cocos2d::extension::CCScale9Sprite_vtbl *v13; // rbx
const cocos2d::CCSize *v14; // rax
float v15; // xmm0_4
float v16; // xmm0_4
struct cocos2d::CCRect *v17; // rax
struct cocos2d::extension::CCScale9Sprite *v18; // rdi
__int64 v19; // rdx
cocos2d::extension::CCScale9Sprite_vtbl *v20; // rbx
const cocos2d::CCSize *v21; // rax
size_t v22; // rsi
const char *v23; // rdx
cocos2d::CCString *v24; // rax
const char *CString; // rax
size_t v26; // r8
void **v27; // rcx
struct cocos2d::CCLabelBMFont *v28; // rdi
cocos2d::CCLabelBMFont_vtbl *v29; // rbx
const cocos2d::CCPoint *v30; // rax
AchievementManager *v31; // rax
__int64 v32; // rdx
__int64 v33; // r8
__int64 v34; // r9
__int64 v35; // r14
unsigned __int64 v36; // rdi
void **v37; // r12
unsigned __int64 v38; // rbx
AchievementManager *v39; // rax
void **v40; // rdx
__int64 AchievementsWithID; // rax
cocos2d::CCString *v42; // rbx
void *v43; // rcx
int v44; // edi
__int64 v45; // rbx
unsigned __int64 v46; // rdi
_BYTE *v47; // rbx
__int64 v48; // rcx
char *v49; // r13
void *v50; // rcx
unsigned __int64 v51; // rdi
void **v52; // rbx
__int64 v53; // rcx
__int64 v54; // r13
_WORD *v55; // rbx
void *v56; // rcx
void **v57; // rcx
struct cocos2d::CCSprite *v58; // rdi
float v59; // xmm0_4
cocos2d::CCSprite_vtbl *v60; // rbx
const cocos2d::CCPoint *v61; // rax
float v62; // xmm0_4
void *v63; // rcx
GJItemIcon *BrowserItem; // rbx
float v65; // xmm0_4
__int64 v66; // rcx
__int64 v67; // rax
ButtonSprite *v68; // rax
CCMenuItemSpriteExtra *v69; // rax
float v70; // xmm0_4
cocos2d::CCMenu_vtbl *v71; // rbx
const cocos2d::CCPoint *v72; // rax
GameStatsManager *v73; // rcx
GameManager *v74; // rcx
int ItemUnlockState; // r12d
IconType v76; // eax
GameManager *v77; // r9
bool isIconUnlocked; // bl
double v79; // xmm0_8
const char *v80; // rdx
cocos2d::CCString *v81; // rax
char *v82; // rax
size_t v83; // r8
_QWORD *v84; // rcx
const char *v85; // r8
const char *v86; // rdx
cocos2d::CCString *v87; // rax
char *v88; // rax
size_t v89; // r8
void **v90; // rax
__int64 v91; // rdx
__int64 v92; // rcx
__int64 v93; // r9
bool v94; // sf
bool v95; // of
const char *v96; // rdx
cocos2d::CCString *v97; // rax
const char *v98; // rdx
cocos2d::CCString *v99; // rax
const char *v100; // rdx
cocos2d::CCString *v101; // rax
const char *v102; // rdx
cocos2d::CCString *v103; // rax
const char *v104; // rdx
cocos2d::CCString *v105; // rax
char *v106; // rax
size_t v107; // r8
void **v108; // rax
unsigned __int64 v109; // rdi
_BYTE *v110; // rbx
unsigned __int64 v111; // rcx
__int64 v112; // rbx
char *v113; // r13
void *v114; // rcx
const char *v115; // rdx
cocos2d::CCString *v116; // rax
char *v117; // rax
size_t v118; // r8
void **v119; // rax
AchievementManager *v120; // rax
_QWORD *v121; // rbx
AchievementManager *v122; // rax
__int64 v123; // rax
cocos2d::CCString *v124; // rax
const char *v125; // rax
size_t v126; // r8
void *v127; // rcx
void *v128; // rcx
const char *v129; // r8
const char *v130; // rdx
cocos2d::CCString *v131; // rax
char *v132; // rax
unsigned __int64 v133; // rdi
void **v134; // rbx
__int64 v135; // rcx
__int64 v136; // r13
_WORD *v137; // rbx
void *v138; // rcx
const char *v139; // rdx
cocos2d::CCString *v140; // rax
char *v141; // rax
int v142; // eax
unsigned __int64 v143; // rdi
__int64 v144; // rcx
__int64 v145; // r13
_BYTE *v146; // rax
char v147; // cl
_QWORD *v148; // rbx
void *v149; // rcx
const char *v150; // rdx
cocos2d::CCString *v151; // rax
char *v152; // rsi
__int128 v153; // xmm0
void **v154; // rbx
__int64 *v155; // rdx
__int64 v156; // rcx
__int64 v157; // r13
void **v158; // rbx
__int64 v159; // rcx
__int64 v160; // r13
const struct cocos2d::CCPoint *v161; // rax
char *v162; // rdi
ItemInfoPopup *v163; // r14
float v164; // xmm0_4
void **v165; // rcx
struct cocos2d::CCLabelBMFont *v166; // rbx
__int64 v167; // rdx
float v168; // xmm0_4
__int64 v169; // rax
void **v170; // rcx
cocos2d::CCLabelBMFont *v171; // rbx
__int64 v172; // r8
__int64 *v173; // rdx
__int64 *v174; // rax
int v175; // eax
ItemInfoPopup *v176; // r15
int m_accountID; // ecx
__int64 *v178; // rdx
__int64 *v179; // rax
unsigned __int64 v180; // rax
__int64 v181; // rcx
void **v182; // rdx
cocos2d::CCString *v183; // rax
const char *v184; // rax
struct cocos2d::CCLabelBMFont *v185; // r14
CCMenuItemSpriteExtra *v186; // rdi
CCMenuItemSpriteExtra_vtbl *v187; // rbx
struct cocos2d::CCPoint v188; // rax
void *v189; // rcx
void *v190; // rcx
void *v191; // rcx
char *v192; // rax
void *v193; // rcx
bool v194; // [rsp+48h] [rbp-C0h]
__int64 v195; // [rsp+50h] [rbp-B8h] BYREF
void **v196; // [rsp+58h] [rbp-B0h] BYREF
void **v197; // [rsp+60h] [rbp-A8h]
__int64 v198; // [rsp+68h] [rbp-A0h] BYREF
ItemInfoPopup *v199; // [rsp+70h] [rbp-98h]
float v200; // [rsp+78h] [rbp-90h]
cocos2d::CCPoint v201; // [rsp+80h] [rbp-88h] BYREF
void *v202[2]; // [rsp+88h] [rbp-80h] BYREF
__int128 v203; // [rsp+98h] [rbp-70h]
void *v204[2]; // [rsp+A8h] [rbp-60h] BYREF
__int128 v205; // [rsp+B8h] [rbp-50h]
void *v206[2]; // [rsp+C8h] [rbp-40h] BYREF
__int64 v207; // [rsp+D8h] [rbp-30h]
unsigned __int64 v208; // [rsp+E0h] [rbp-28h]
void *Block[2]; // [rsp+E8h] [rbp-20h] BYREF
__int64 v210; // [rsp+F8h] [rbp-10h]
unsigned __int64 v211; // [rsp+100h] [rbp-8h]
_QWORD v212[3]; // [rsp+108h] [rbp+0h] BYREF
unsigned __int64 v213; // [rsp+120h] [rbp+18h]
void *v214[2]; // [rsp+128h] [rbp+20h] BYREF
unsigned __int64 v215; // [rsp+138h] [rbp+30h]
unsigned __int64 v216; // [rsp+140h] [rbp+38h]
void *v217[2]; // [rsp+148h] [rbp+40h] BYREF
__int64 v218; // [rsp+158h] [rbp+50h]
unsigned __int64 v219; // [rsp+160h] [rbp+58h]
_QWORD v220[3]; // [rsp+168h] [rbp+60h] BYREF
unsigned __int64 v221; // [rsp+180h] [rbp+78h]
void *Src[2]; // [rsp+188h] [rbp+80h] BYREF
unsigned __int64 v223; // [rsp+198h] [rbp+90h]
unsigned __int64 v224; // [rsp+1A0h] [rbp+98h]
_QWORD v225[4]; // [rsp+1A8h] [rbp+A0h] BYREF
v3 = a3;
LODWORD(v195) = a3;
v5 = a1;
v199 = a1;
result = FLAlertLayer::init_1(a1, 150);
if ( !result )
return result;
LOBYTE(v7) = 1;
v5->setKeypadEnabled(v5, v7);
LOBYTE(v8) = 1;
v5->setTouchEnabled(v5, v8);
v5->m_itemID = a2;
v5->m_unlockType = v3;
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(v10);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v204, 0.0, 0.0, 80.0, 80.0);
v12 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v11);
v13 = v12->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v196, 300.0, 230.0);
v13->setContentSize(v12, v14);
v15 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))v5->m_mainLayer->addChild_0)(
v5->m_mainLayer,
v12,
4294967294LL);
cocos2d::CCPoint::CCPoint(v15, v200 * 0.5);
v16 = ((float (__fastcall *)(struct cocos2d::extension::CCScale9Sprite *, __int64 *))v12->setPosition_0)(v12, &v198);
cocos2d::CCPoint::CCPoint(v16, 0.0);
cocos2d::CCPoint::operator+(&v198, &v201);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v204, 0.0, 0.0, 80.0, 80.0);
v18 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v17);
v18->setColor(&v18->cocos2d::CCRGBAProtocol, &stru_140529AB8);
LOBYTE(v19) = 60;
v18->setOpacity(&v18->cocos2d::CCRGBAProtocol, v19);
v20 = v18->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v196, 260.0, 90.0);
v20->setContentSize(v18, v21);
v22 = -1;
v5->m_mainLayer->addChild_0(v5->m_mainLayer, v18, -1);
v18->setPosition_0(v18, &v201);
ItemInfoPopup::nameForUnlockType(v212, (unsigned int)a2, (unsigned int)v3);
v23 = (const char *)v212;
if ( v213 > 0xF )
v23 = (const char *)v212[0];
v24 = cocos2d::CCString::createWithFormat("%s %i", v23, a2);
CString = cocos2d::CCString::getCString(v24);
*(_OWORD *)v217 = 0;
v218 = 0;
v219 = 0;
v26 = -1;
do
++v26;
while ( CString[v26] );
sub_14003A930(v217, CString, v26);
v27 = v217;
if ( v219 > 0xF )
v27 = (void **)v217[0];
v28 = cocos2d::CCLabelBMFont::create((const char *)v27, "goldFont.fnt");
v29 = v28->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(0.0, *(float *)&v198);
v29->setPosition_0(v28, v30);
v5->m_mainLayer->addChild_1(v5->m_mainLayer, v28);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v28->setScale_0)(v28);
v31 = AchievementManager::sharedState();
AchievementManager::achievementForUnlock((__int64)v31, Src, a2, v3);
v35 = 0x7FFFFFFFFFFFFFFFLL;
v36 = v223;
if ( v223 )
{
v196 = v204;
*(_OWORD *)v204 = 0;
v205 = 0u;
v37 = Src;
if ( v224 > 0xF )
v37 = (void **)Src[0];
if ( v223 > 0x7FFFFFFFFFFFFFFFLL )
sub_140007B50(22, v32, v33, v34);
*((_QWORD *)&v205 + 1) = 15;
if ( v223 > 0xF )
{
v38 = v223 | 0xF;
if ( (v223 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
if ( v38 < 0x16 )
v38 = 22;
}
else
{
v38 = 0x7FFFFFFFFFFFFFFFLL;
}
v204[0] = sub_14003AA10(v38 + 1);
*(_QWORD *)&v205 = v36;
*((_QWORD *)&v205 + 1) = v38;
memcpy(v204[0], v37, v36 + 1);
}
else
{
*(_QWORD *)&v205 = v223;
*(_OWORD *)v204 = *(_OWORD *)v37;
}
v197 = v204;
v39 = AchievementManager::sharedState();
v40 = v204;
if ( *((_QWORD *)&v205 + 1) > 0xFu )
v40 = (void **)v204[0];
AchievementsWithID = AchievementManager::getAchievementsWithID((__int64)v39, (__int64)v40);
if ( !AchievementsWithID )
goto LABEL_64;
*(_OWORD *)Block = 0;
v210 = 6;
v211 = 15;
strcpy((char *)Block, "limits");
v42 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(AchievementsWithID, Block);
if ( v211 > 0xF )
{
v43 = Block[0];
if ( v211 + 1 >= 0x1000 )
{
v43 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v43 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v43);
}
v210 = 0;
v211 = 15;
LOBYTE(Block[0]) = 0;
if ( v42 )
{
v44 = cocos2d::CCString::intValue(v42);
sub_14003A830((__int64)v204);
if ( (unsigned int)(v44 - 2) <= 2 )
{
*(_OWORD *)v204 = 0;
*(_QWORD *)&v205 = 0;
*((_QWORD *)&v205 + 1) = 15;
v204[0] = sub_14003AA10(0x20u);
*(_QWORD *)&v205 = 22;
v45 = 31;
*((_QWORD *)&v205 + 1) = 31;
strcpy((char *)v204[0], "gj_subzeroLogo_001.png");
if ( v44 == 2 )
{
v46 = *((_QWORD *)&v205 + 1);
if ( *((_QWORD *)&v205 + 1) >= 0x14u )
{
v47 = v204[0];
*(_QWORD *)&v205 = 20;
memmove(v204[0], "gj_worldLogo_001.png", 0x14u);
v47[20] = 0;
LABEL_57:
v57 = v204;
if ( *((_QWORD *)&v205 + 1) > 0xFu )
v57 = (void **)v204[0];
v58 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v57);
v5 = v199;
v59 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCSprite *))v199->m_mainLayer->addChild_1)(
v199->m_mainLayer,
v58);
v60 = v58->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v59, 0.0);
v60->setAnchorPoint(v58, v61);
v62 = ((float (__fastcall *)(struct cocos2d::CCSprite *))v58->setScale_0)(v58);
cocos2d::CCPoint::CCPoint(v62, -140.0);
cocos2d::CCPoint::operator+(&v198, &v196);
v58->setPosition_0(v58, (const cocos2d::CCPoint *)&v196);
if ( *((_QWORD *)&v205 + 1) > 0xFu )
{
v63 = v204[0];
if ( (unsigned __int64)(*((_QWORD *)&v205 + 1) + 1LL) >= 0x1000 )
{
v63 = *((void **)v204[0] - 1);
if ( (unsigned __int64)((char *)v204[0] - (char *)v63 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v63);
}
goto LABEL_66;
}
v48 = *((_QWORD *)&v205 + 1) >> 1;
if ( *((_QWORD *)&v205 + 1) <= (unsigned __int64)(0x7FFFFFFFFFFFFFFFLL - (*((_QWORD *)&v205 + 1) >> 1)) )
{
if ( (unsigned __int64)(*((_QWORD *)&v205 + 1) + v48) > 0x1F )
v45 = *((_QWORD *)&v205 + 1) + v48;
}
else
{
v45 = 0x7FFFFFFFFFFFFFFFLL;
}
v49 = (char *)sub_14003AA10(v45 + 1);
*(_QWORD *)&v205 = 20;
*((_QWORD *)&v205 + 1) = v45;
strcpy(v49, "gj_worldLogo_001.png");
if ( v46 <= 0xF )
goto LABEL_40;
v50 = v204[0];
if ( v46 + 1 < 0x1000
|| (v50 = *((void **)v204[0] - 1), (unsigned __int64)((char *)v204[0] - (char *)v50 - 8) <= 0x1F) )
{
j_j_free(v50);
LABEL_40:
v204[0] = v49;
LABEL_56:
v3 = (int)v195;
goto LABEL_57;
}
LABEL_53:
invalid_parameter_noinfo_noreturn();
}
if ( v44 != 4 )
goto LABEL_57;
v51 = *((_QWORD *)&v205 + 1);
if ( *((_QWORD *)&v205 + 1) >= 0xDu )
{
v52 = v204;
if ( *((_QWORD *)&v205 + 1) > 0xFu )
v52 = (void **)v204[0];
*(_QWORD *)&v205 = 13;
memmove(v52, "GJ_md_001.png", 0xDu);
*((_BYTE *)v52 + 13) = 0;
goto LABEL_57;
}
v53 = *((_QWORD *)&v205 + 1) >> 1;
if ( *((_QWORD *)&v205 + 1) <= (unsigned __int64)(0x7FFFFFFFFFFFFFFFLL - (*((_QWORD *)&v205 + 1) >> 1)) )
{
v54 = 15;
if ( (unsigned __int64)(*((_QWORD *)&v205 + 1) + v53) > 0xF )
v54 = *((_QWORD *)&v205 + 1) + v53;
}
else
{
v54 = 0x7FFFFFFFFFFFFFFFLL;
}
v55 = sub_14003AA10(v54 + 1);
*(_QWORD *)&v205 = 13;
*((_QWORD *)&v205 + 1) = v54;
qmemcpy(v55, "GJ_md_001.pn", 12);
v55[6] = (unsigned __int8)aGjMd001Png[12];
if ( v51 > 0xF )
{
v56 = v204[0];
if ( v51 + 1 >= 0x1000 )
{
v56 = *((void **)v204[0] - 1);
if ( (unsigned __int64)((char *)v204[0] - (char *)v56 - 8) > 0x1F )
goto LABEL_53;
}
j_j_free(v56);
}
v204[0] = v55;
goto LABEL_56;
}
}
else
{
LABEL_64:
sub_14003A830((__int64)v204);
}
v5 = v199;
}
LABEL_66:
BrowserItem = GJItemIcon::createBrowserItem(v3, a2);
((void (__fastcall *)(GJItemIcon *))BrowserItem->setScale_0)(BrowserItem);
v65 = ((float (__fastcall *)(cocos2d::CCLayer *, GJItemIcon *, __int64))v5->m_mainLayer->addChild_0)(
v5->m_mainLayer,
BrowserItem,
12);
cocos2d::CCPoint::CCPoint(v65, 0.0);
cocos2d::CCPoint::operator+(&v198, &v196);
BrowserItem->setPosition_0(BrowserItem, (const cocos2d::CCPoint *)&v196);
v67 = cocos2d::CCMenu::create(v66);
v5->m_buttonMenu = (cocos2d::CCMenu *)v67;
v5->m_mainLayer->addChild_0(v5->m_mainLayer, (cocos2d::CCNode *)v67, 10);
v68 = ButtonSprite::create_1("OK", 0, 0, 1.0, 0, "goldFont.fnt", "GJ_button_01.png", 0.0);
v69 = CCMenuItemSpriteExtra::create(v68, nullptr, v5, (cocos2d::SEL_MenuHandler *)AudioAssetsBrowser::onClose);
v70 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v69);
v71 = v5->m_buttonMenu->FLAlertLayer::__vftable;
cocos2d::CCPoint::CCPoint(v70, v200 * 0.5);
v71->setPosition_0(v5->m_buttonMenu, v72);
v73 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v196 = (void **)operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0((__int64)v196);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v73 = (GameStatsManager *)qword_1406C2EE8;
}
ItemUnlockState = GameStatsManager::getItemUnlockState(v73, a2, v3);
if ( !qword_1406C2ED8 )
{
v197 = (void **)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v197);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
if ( !qword_1406C2ED8 )
{
v197 = (void **)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v197);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
}
}
v76 = GameManager::unlockTypeToIconType(v74, v3);
isIconUnlocked = GameManager::isIconUnlocked(v77, a2, v76);
v194 = isIconUnlocked;
LODWORD(v79) = 0;
*(_OWORD *)v214 = 0;
v215 = 0;
v216 = 15;
LOBYTE(v214[0]) = 0;
*(_OWORD *)v206 = 0;
v207 = 0;
v208 = 15;
LOBYTE(v206[0]) = 0;
*(_OWORD *)v202 = 0;
*(_QWORD *)&v203 = 0;
*((_QWORD *)&v203 + 1) = 15;
LOBYTE(v202[0]) = 0;
switch ( ItemUnlockState )
{
case 5:
*(_QWORD *)&v203 = 11;
LODWORD(v79) = 1919116627;
strcpy((char *)v202, "Secret Shop");
v80 = (const char *)v212;
if ( v213 > 0xF )
v80 = (const char *)v212[0];
v81 = cocos2d::CCString::createWithFormat(
"There may or may not exist a shop where you can buy this %s.",
v80);
v82 = (char *)cocos2d::CCString::getCString(v81);
v83 = -1;
do
++v83;
while ( v82[v83] );
LABEL_76:
sub_14003CCE0(v214, v82, v83);
break;
case 6:
*(_QWORD *)&v203 = 14;
LODWORD(v79) = 1835888451;
strcpy((char *)v202, "Community Shop");
v96 = (const char *)v212;
if ( v213 > 0xF )
v96 = (const char *)v212[0];
v97 = cocos2d::CCString::createWithFormat(
"You can buy this %s in the community shop!",
v96);
v82 = (char *)cocos2d::CCString::getCString(v97);
v83 = -1;
do
++v83;
while ( v82[v83] );
goto LABEL_76;
case 7:
*(_QWORD *)&v203 = 13;
LODWORD(v79) = 1751344461;
strcpy((char *)v202, "Mechanic Shop");
v98 = (const char *)v212;
if ( v213 > 0xF )
v98 = (const char *)v212[0];
v99 = cocos2d::CCString::createWithFormat("You can buy this %s at the Mechanic!", v98);
v82 = (char *)cocos2d::CCString::getCString(v99);
v83 = -1;
do
++v83;
while ( v82[v83] );
goto LABEL_76;
case 8:
*(_QWORD *)&v203 = 12;
LODWORD(v79) = 1835100484;
strcpy((char *)v202, "Diamond Shop");
v100 = (const char *)v212;
if ( v213 > 0xF )
v100 = (const char *)v212[0];
v101 = cocos2d::CCString::createWithFormat(
"You can buy this %s in the diamond shop!",
v100);
v82 = (char *)cocos2d::CCString::getCString(v101);
v83 = -1;
do
++v83;
while ( v82[v83] );
goto LABEL_76;
case 4:
*(_QWORD *)&v203 = 4;
strcpy((char *)v202, "Shop");
v102 = (const char *)v212;
if ( v213 > 0xF )
v102 = (const char *)v212[0];
v103 = cocos2d::CCString::createWithFormat("You can buy this %s in the shop!", v102);
v82 = (char *)cocos2d::CCString::getCString(v103);
v83 = -1;
do
++v83;
while ( v82[v83] );
goto LABEL_76;
case 2:
*(_QWORD *)&v203 = 12;
strcpy((char *)v202, "Secret Chest");
v104 = (const char *)v212;
if ( v213 > 0xF )
v104 = (const char *)v212[0];
v105 = cocos2d::CCString::createWithFormat(
"You can find this %s in a secret chest!",
v104);
v106 = (char *)cocos2d::CCString::getCString(v105);
v107 = -1;
do
++v107;
while ( v106[v107] );
sub_14003CCE0(v214, v106, v107);
v108 = v206;
if ( v208 > 0xF )
v108 = (void **)v206[0];
v207 = 0;
*(_BYTE *)v108 = 0;
*(float *)&v79 = (float)((float)rand() / -32767.0) * 10.0;
switch ( ~(int)*(float *)&v79 )
{
case 0:
sub_14003CCC0(v206, "Nothing happened.");
break;
case 1:
sub_14003CCC0(v206, "Without a key, it cannot be.");
break;
case 2:
sub_14003CCC0(v206, "Why you click?");
break;
case 3:
sub_14003CCC0(v206, "You are not yet ready.");
break;
case 4:
sub_14003CCC0(v206, "A key, you must have.");
break;
case 5:
sub_14003CCC0(v206, "The lock wont budge.");
break;
case 6:
sub_14003CCC0(v206, "A demon guards it. Find him.");
break;
case 7:
sub_14003CCC0(v206, "You have no power here.");
break;
case 8:
sub_14003CCC0(v206, "Forget about this one.");
break;
default:
v109 = v208;
if ( v208 < 0x20 )
{
v111 = v208 >> 1;
if ( v208 <= 0x7FFFFFFFFFFFFFFFLL - (v208 >> 1) )
{
v112 = 47;
if ( v208 + v111 > 0x2F )
v112 = v208 + v111;
}
else
{
v112 = 0x7FFFFFFFFFFFFFFFLL;
}
v113 = (char *)sub_14003AA10(v112 + 1);
v207 = 32;
v208 = v112;
LODWORD(v79) = *(_DWORD *)"A key... My kingdom for a key...";
strcpy(v113, "A key... My kingdom for a key...");
if ( v109 > 0xF )
{
v114 = v206[0];
if ( v109 + 1 >= 0x1000 )
{
v114 = *((void **)v206[0] - 1);
if ( (unsigned __int64)((char *)v206[0] - (char *)v114 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v114);
}
v206[0] = v113;
v3 = (int)v195;
isIconUnlocked = v194;
}
else
{
v110 = v206[0];
v207 = 32;
memmove(v206[0], "A key... My kingdom for a key...", 0x20u);
v110[32] = 0;
isIconUnlocked = v194;
}
break;
}
break;
case 3:
*(_QWORD *)&v203 = 13;
strcpy((char *)v202, "Special Chest");
v115 = (const char *)v212;
if ( v213 > 0xF )
v115 = (const char *)v212[0];
v116 = cocos2d::CCString::createWithFormat(
"You can find this %s in a special chest!",
v115);
v117 = (char *)cocos2d::CCString::getCString(v116);
v118 = -1;
do
++v118;
while ( v117[v118] );
sub_14003CCE0(v214, v117, v118);
v119 = v206;
if ( v208 > 0xF )
v119 = (void **)v206[0];
v207 = 0;
*(_BYTE *)v119 = 0;
*(float *)&v79 = (float)((float)rand() / -32767.0) * 10.0;
switch ( ~(int)*(float *)&v79 )
{
case 0:
sub_14003CCC0(v206, "That wont work.");
break;
case 1:
sub_14003CCC0(v206, "You must do something.");
break;
case 2:
sub_14003CCC0(v206, "It cannot be done.");
break;
case 3:
sub_14003CCC0(v206, "Prove that you are worthy.");
break;
case 4:
sub_14003CCC0(v206, "Need. More. Power.");
break;
case 5:
sub_14003CCC0(v206, "Player used tap.\nIt's not very effective.");
break;
case 6:
sub_14003CCC0(v206, "A wild lock appeared!");
break;
case 7:
sub_14003CCC0(v206, "You are not ready.");
break;
case 8:
sub_14003CCC0(v206, "ehehehehehe...");
break;
default:
sub_14003CCC0(v206, "IMPOSSIBRU!");
break;
}
break;
case 1:
v120 = AchievementManager::sharedState();
AchievementManager::achievementForUnlock((__int64)v120, v220, a2, v3);
v121 = v220;
if ( v221 > 0xF )
v121 = (_QWORD *)v220[0];
v122 = AchievementManager::sharedState();
v123 = AchievementManager::getAchievementsWithID((__int64)v122, (__int64)v121);
*(_OWORD *)Block = 0;
v210 = 5;
v211 = 15;
strcpy((char *)Block, "title");
v124 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v123, Block);
v125 = cocos2d::CCString::getCString(v124);
*(_OWORD *)v204 = 0;
v205 = 0u;
v126 = -1;
do
++v126;
while ( v125[v126] );
sub_14003A930(v204, v125, v126);
if ( v211 > 0xF )
{
v127 = Block[0];
if ( v211 + 1 >= 0x1000 )
{
v127 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v127 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v127);
}
v210 = 0;
v211 = 15;
LOBYTE(Block[0]) = 0;
sub_14003A830((__int64)v220);
if ( *((_QWORD *)&v203 + 1) > 0xFu )
{
v128 = v202[0];
if ( (unsigned __int64)(*((_QWORD *)&v203 + 1) + 1LL) >= 0x1000 )
{
v128 = *((void **)v202[0] - 1);
if ( (unsigned __int64)((char *)v202[0] - (char *)v128 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v128);
}
LODWORD(v79) = v204[0];
*(_OWORD *)v202 = *(_OWORD *)v204;
v203 = v205;
GJGarageLayer::descriptionForUnlock(v225, a2, v3);
v129 = (const char *)v212;
if ( v213 > 0xF )
v129 = (const char *)v212[0];
v130 = (const char *)v225;
if ( v225[3] > 0xFu )
v130 = (const char *)v225[0];
v131 = cocos2d::CCString::createWithFormat("%s to unlock this %s!", v130, v129);
v132 = (char *)cocos2d::CCString::getCString(v131);
do
++v22;
while ( v132[v22] );
sub_14003CCE0(v214, v132, v22);
sub_14003A830((__int64)v225);
goto LABEL_227;
}
v84 = (_QWORD *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v197 = (void **)operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0((__int64)v197);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v84 = (_QWORD *)qword_1406C2EE8;
}
GameStatsManager::getSpecialUnlockDescription(v84, (__int64)v220, a2, v3);
if ( v220[2] )
{
v85 = (const char *)v212;
if ( v213 > 0xF )
v85 = (const char *)v212[0];
v86 = (const char *)v220;
if ( v221 > 0xF )
v86 = (const char *)v220[0];
v87 = cocos2d::CCString::createWithFormat("%s to unlock this %s!", v86, v85);
v88 = (char *)cocos2d::CCString::getCString(v87);
v89 = -1;
do
++v89;
while ( v88[v89] );
sub_14003CCE0(v214, v88, v89);
v90 = v206;
if ( v208 > 0xF )
v90 = (void **)v206[0];
v207 = 0;
*(_BYTE *)v90 = 0;
}
sub_14003A830((__int64)v220);
if ( ItemUnlockState )
goto LABEL_227;
if ( !isIconUnlocked )
{
if ( v215 )
goto LABEL_227;
v142 = rand();
*(float *)&v79 = roundf((float)((float)v142 / 32767.0) * 10.0);
switch ( (int)*(float *)&v79 )
{
case 0:
v143 = *((_QWORD *)&v203 + 1);
if ( *((_QWORD *)&v203 + 1) >= 7u )
goto LABEL_250;
v144 = *((_QWORD *)&v203 + 1) >> 1;
if ( *((_QWORD *)&v203 + 1) <= (unsigned __int64)(0x7FFFFFFFFFFFFFFFLL - (*((_QWORD *)&v203 + 1) >> 1)) )
{
v145 = 15;
if ( (unsigned __int64)(*((_QWORD *)&v203 + 1) + v144) > 0xF )
v145 = *((_QWORD *)&v203 + 1) + v144;
}
else
{
v145 = 0x7FFFFFFFFFFFFFFFLL;
}
v146 = sub_14003AA10(v145 + 1);
*(_QWORD *)&v203 = 7;
*((_QWORD *)&v203 + 1) = v145;
*(_DWORD *)v146 = 1852796755;
*((_WORD *)v146 + 2) = 11822;
v147 = 46;
goto LABEL_217;
case 1:
v143 = *((_QWORD *)&v203 + 1);
if ( *((_QWORD *)&v203 + 1) >= 7u )
{
v155 = (__int64 *)"Not yet";
LABEL_251:
v158 = v202;
*(_QWORD *)&v203 = 7;
if ( v143 > 0xF )
v158 = (void **)v202[0];
memmove(v158, v155, 7u);
*((_BYTE *)v158 + 7) = 0;
goto LABEL_222;
}
v156 = *((_QWORD *)&v203 + 1) >> 1;
if ( *((_QWORD *)&v203 + 1) <= (unsigned __int64)(0x7FFFFFFFFFFFFFFFLL - (*((_QWORD *)&v203 + 1) >> 1)) )
{
v157 = 15;
if ( (unsigned __int64)(v156 + *((_QWORD *)&v203 + 1)) > 0xF )
v157 = v156 + *((_QWORD *)&v203 + 1);
}
else
{
v157 = 0x7FFFFFFFFFFFFFFFLL;
}
v146 = sub_14003AA10(v157 + 1);
*(_QWORD *)&v203 = 7;
*((_QWORD *)&v203 + 1) = v157;
qmemcpy(v146, "Not ye", 6);
v147 = aNotYet[6];
LABEL_217:
v146[6] = v147;
v146[7] = 0;
v148 = v146;
if ( v143 <= 0xF )
goto LABEL_221;
v149 = v202[0];
if ( v143 + 1 >= 0x1000 )
{
v149 = *((void **)v202[0] - 1);
if ( (unsigned __int64)((char *)v202[0] - (char *)v149 - 8) > 0x1F )
goto LABEL_261;
}
break;
case 2:
sub_14003CCC0(v202, "Huh?");
goto LABEL_222;
case 3:
sub_14003CCC0(v202, "Stay tuned!");
goto LABEL_222;
case 4:
sub_14003CCC0(v202, "Coming soon!");
goto LABEL_222;
case 5:
sub_14003CCC0(v202, "In the oven");
goto LABEL_222;
case 6:
sub_14003CCC0(v202, "It's cooking");
goto LABEL_222;
case 7:
sub_14003CCC0(v202, "Wait for it");
goto LABEL_222;
case 8:
sub_14003CCC0(v202, "Not now");
goto LABEL_222;
case 9:
sub_14003CCC0(v202, "Unavailable");
goto LABEL_222;
case 10:
sub_14003CCE0(v202, "Almost there", 0xCu);
goto LABEL_222;
default:
v143 = *((_QWORD *)&v203 + 1);
if ( *((_QWORD *)&v203 + 1) >= 7u )
{
LABEL_250:
v155 = &qword_1405699F8;
goto LABEL_251;
}
v159 = *((_QWORD *)&v203 + 1) >> 1;
if ( *((_QWORD *)&v203 + 1) <= (unsigned __int64)(0x7FFFFFFFFFFFFFFFLL - (*((_QWORD *)&v203 + 1) >> 1)) )
{
v160 = 15;
if ( (unsigned __int64)(v159 + *((_QWORD *)&v203 + 1)) > 0xF )
v160 = v159 + *((_QWORD *)&v203 + 1);
}
else
{
v160 = 0x7FFFFFFFFFFFFFFFLL;
}
v148 = sub_14003AA10(v160 + 1);
*(_QWORD *)&v203 = 7;
*((_QWORD *)&v203 + 1) = v160;
*(_DWORD *)v148 = 1852796755;
*((_WORD *)v148 + 2) = 11822;
*((_WORD *)v148 + 3) = 46;
if ( v143 <= 0xF )
goto LABEL_221;
v149 = v202[0];
if ( v143 + 1 >= 0x1000 )
{
v149 = *((void **)v202[0] - 1);
if ( (unsigned __int64)((char *)v202[0] - (char *)v149 - 8) > 0x1F )
goto LABEL_261;
}
break;
}
j_j_free(v149);
LABEL_221:
v3 = (int)v195;
v202[0] = v148;
LABEL_222:
v150 = (const char *)v212;
if ( v213 > 0xF )
v150 = (const char *)v212[0];
v151 = cocos2d::CCString::createWithFormat("This %s can be unlocked in update 2.21.", v150);
v141 = (char *)cocos2d::CCString::getCString(v151);
do
++v22;
while ( v141[v22] );
goto LABEL_226;
}
if ( v3 == 1 )
{
v95 = __OFSUB__(a2, 5);
v94 = a2 - 5 < 0;
}
else
{
if ( (unsigned int)(v3 - 2) > 1 )
{
if ( a2 < 2 )
goto LABEL_191;
goto LABEL_227;
}
v95 = __OFSUB__(a2, 4);
v94 = a2 - 4 < 0;
}
if ( v94 != v95 )
{
LABEL_191:
v133 = *((_QWORD *)&v203 + 1);
if ( *((_QWORD *)&v203 + 1) >= 7u )
{
v134 = v202;
if ( *((_QWORD *)&v203 + 1) > 0xFu )
v134 = (void **)v202[0];
*(_QWORD *)&v203 = 7;
memmove(v134, "Default", 7u);
*((_BYTE *)v134 + 7) = 0;
goto LABEL_204;
}
v135 = *((_QWORD *)&v203 + 1) >> 1;
if ( *((_QWORD *)&v203 + 1) <= (unsigned __int64)(0x7FFFFFFFFFFFFFFFLL - (*((_QWORD *)&v203 + 1) >> 1)) )
{
v136 = 15;
if ( (unsigned __int64)(*((_QWORD *)&v203 + 1) + v135) > 0xF )
v136 = *((_QWORD *)&v203 + 1) + v135;
}
else
{
v136 = 0x7FFFFFFFFFFFFFFFLL;
}
v137 = sub_14003AA10(v136 + 1);
*(_QWORD *)&v203 = 7;
*((_QWORD *)&v203 + 1) = v136;
qmemcpy(v137, "Defaul", 6);
v137[3] = (unsigned __int8)aDefault[6];
if ( v133 <= 0xF )
{
LABEL_203:
v3 = (int)v195;
v202[0] = v137;
LABEL_204:
v139 = (const char *)v212;
if ( v213 > 0xF )
v139 = (const char *)v212[0];
v140 = cocos2d::CCString::createWithFormat("This %s is unlocked by default.", v139);
v141 = (char *)cocos2d::CCString::getCString(v140);
do
++v22;
while ( v141[v22] );
LABEL_226:
sub_14003CCE0(v214, v141, v22);
goto LABEL_227;
}
v138 = v202[0];
if ( v133 + 1 < 0x1000
|| (v138 = *((void **)v202[0] - 1), (unsigned __int64)((char *)v202[0] - (char *)v138 - 8) <= 0x1F) )
{
j_j_free(v138);
goto LABEL_203;
}
LABEL_261:
invalid_parameter_noinfo_noreturn();
}
LABEL_227:
v152 = (char *)v214[0];
if ( v215 )
{
v197 = Block;
LODWORD(v153) = 0;
*(_OWORD *)Block = 0;
v210 = 0;
v211 = 0;
v154 = v214;
if ( v216 > 0xF )
v154 = (void **)v214[0];
if ( v215 > 0x7FFFFFFFFFFFFFFFLL )
sub_140007B50(v92, v91, v215, v93);
v211 = 15;
if ( v215 > 0xF )
{
if ( (v215 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
v35 = v215 | 0xF;
if ( (v215 | 0xF) < 0x16 )
v35 = 22;
}
Block[0] = sub_14003AA10(v35 + 1);
v210 = v215;
v211 = v35;
memcpy(Block[0], v154, v215 + 1);
}
else
{
v210 = v215;
v153 = *(_OWORD *)v154;
*(_OWORD *)Block = *(_OWORD *)v154;
}
cocos2d::CCPoint::CCPoint(*(float *)&v153, 0.5);
v162 = TextArea::create((__int64)Block, &qword_14052A4D8, 1.0, 600.0, v161, 1109917696, 0);
v163 = v199;
v164 = ((float (__fastcall *)(cocos2d::CCLayer *, char *, __int64))v199->m_mainLayer->addChild_0)(
v199->m_mainLayer,
v162,
10);
cocos2d::CCPoint::CCPoint(v164, 0.0);
cocos2d::CCPoint::operator+(&v201, &v196);
v79 = (*(double (__fastcall **)(char *, void ***))(*(_QWORD *)v162 + 184LL))(v162, &v196);
(*(void (__fastcall **)(char *))(*(_QWORD *)v162 + 160LL))(v162);
if ( v207 )
{
v165 = v206;
if ( v208 > 0xF )
v165 = (void **)v206[0];
v166 = cocos2d::CCLabelBMFont::create((const char *)v165, "chatFont.fnt");
cocos2d::CCPoint::CCPoint(*(float *)&v79, 0.0);
cocos2d::CCPoint::operator+(&v201, &v196);
v166->setPosition_0(v166, (const cocos2d::CCPoint *)&v196);
v163->m_mainLayer->addChild_1(v163->m_mainLayer, v166);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v166->setScale_0)(v166);
v166->setColor(&v166->cocos2d::CCRGBAProtocol, &stru_140529AB8);
LOBYTE(v167) = 75;
v168 = ((float (__fastcall *)(cocos2d::CCRGBAProtocol *, __int64))v166->setOpacity)(
&v166->cocos2d::CCRGBAProtocol,
v167);
cocos2d::CCPoint::CCPoint(v168, 0.0);
v169 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v162 + 200LL))(v162);
v79 = cocos2d::CCPoint::operator+(v169, &v196);
(*(void (__fastcall **)(char *, void ***))(*(_QWORD *)v162 + 184LL))(v162, &v196);
}
}
else
{
v163 = v199;
}
if ( (_QWORD)v203 )
{
v170 = v202;
if ( *((_QWORD *)&v203 + 1) > 0xFu )
v170 = (void **)v202[0];
v171 = cocos2d::CCLabelBMFont::create((const char *)v170, "goldFont.fnt");
cocos2d::CCPoint::CCPoint(*(float *)&v79, 0.0);
v79 = cocos2d::CCPoint::operator+(&v201, &v195);
v171->setPosition_0(v171, (const cocos2d::CCPoint *)&v195);
v163->m_mainLayer->addChild_1(v163->m_mainLayer, v171);
cocos2d::CCLabelBMFont::limitLabelWidth(v171, 180.0, 0.55000001, 0.0);
if ( ItemUnlockState == 4 )
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v171->setScale_0)(v171);
}
v172 = qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v197 = (void **)operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0((__int64)v197);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v172 = qword_1406C2EE8;
}
v173 = *(__int64 **)(v172 + 936);
v174 = (__int64 *)v173[1];
while ( !*((_BYTE *)v174 + 25) )
{
if ( *((_DWORD *)v174 + 7) < a2 || *((_DWORD *)v174 + 7) <= a2 && *((_DWORD *)v174 + 8) < v3 )
{
v174 = (__int64 *)v174[2];
}
else
{
v173 = v174;
v174 = (__int64 *)*v174;
}
}
if ( *((_BYTE *)v173 + 25)
|| a2 < *((_DWORD *)v173 + 7)
|| a2 <= *((_DWORD *)v173 + 7) && v3 < *((_DWORD *)v173 + 8)
|| v173 == *(__int64 **)(v172 + 936) )
{
v175 = 0;
}
else
{
v175 = *((_DWORD *)v173 + 9);
}
v176 = v199;
v199->m_accountID = v175;
if ( v175 )
{
if ( !v172 )
{
v197 = (void **)operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0((__int64)v197);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v172 = qword_1406C2EE8;
}
m_accountID = v176->m_accountID;
v178 = *(__int64 **)(v172 + 952);
v179 = (__int64 *)v178[1];
while ( !*((_BYTE *)v179 + 25) )
{
if ( *((_DWORD *)v179 + 8) >= m_accountID )
{
v178 = v179;
v179 = (__int64 *)*v179;
}
else
{
v179 = (__int64 *)v179[2];
}
}
if ( *((_BYTE *)v178 + 25) || m_accountID < *((_DWORD *)v178 + 8) || v178 == *(__int64 **)(v172 + 952) )
{
LODWORD(v79) = 0;
*(_OWORD *)Block = 0;
v181 = 0;
v210 = 0;
v180 = 15;
v211 = 15;
LOBYTE(Block[0]) = 0;
}
else
{
sub_14003BDB0((__int64)Block, (__int64)(v178 + 5));
v180 = v211;
v181 = v210;
}
if ( v181 )
{
v182 = Block;
if ( v180 > 0xF )
v182 = (void **)Block[0];
v183 = cocos2d::CCString::createWithFormat("By %s", (const char *)v182);
v184 = cocos2d::CCString::getCString(v183);
v185 = cocos2d::CCLabelBMFont::create(v184, "goldFont.fnt");
cocos2d::CCPoint::CCPoint(*(float *)&v79, (float)((float)(v200 * 0.5) + 150.0) - 60.0);
cocos2d::CCLabelBMFont::limitLabelWidth(v185, 100.0, 0.5, 0.0);
v186 = CCMenuItemSpriteExtra::create(v185, nullptr, v176, (cocos2d::SEL_MenuHandler *)ItemInfoPopup::onCredit);
v176->m_buttonMenu->addChild_1(v176->m_buttonMenu, v186);
v187 = v186->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v188 = cocos2d::CCNode::convertToNodeSpace(v176->m_buttonMenu, (const struct cocos2d::CCPoint *)v204);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v187->setPosition_0)(v186, v188);
if ( v176->m_accountID <= 0 )
{
LOWORD(v195) = -166;
BYTE2(v195) = -1;
v185->setColor(&v185->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v195);
v186->setEnabled(v186, 0);
}
v180 = v211;
}
if ( v180 > 0xF )
{
v189 = Block[0];
if ( v180 + 1 >= 0x1000 )
{
v189 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v189 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v189);
}
}
if ( *((_QWORD *)&v203 + 1) > 0xFu )
{
v190 = v202[0];
if ( (unsigned __int64)(*((_QWORD *)&v203 + 1) + 1LL) >= 0x1000 )
{
v190 = *((void **)v202[0] - 1);
if ( (unsigned __int64)((char *)v202[0] - (char *)v190 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v190);
}
*(_QWORD *)&v203 = 0;
*((_QWORD *)&v203 + 1) = 15;
LOBYTE(v202[0]) = 0;
if ( v208 > 0xF )
{
v191 = v206[0];
if ( v208 + 1 >= 0x1000 )
{
v191 = *((void **)v206[0] - 1);
if ( (unsigned __int64)((char *)v206[0] - (char *)v191 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v191);
}
v207 = 0;
v208 = 15;
LOBYTE(v206[0]) = 0;
if ( v216 > 0xF )
{
v192 = v152;
if ( v216 + 1 >= 0x1000 )
{
v152 = *((char **)v152 - 1);
if ( (unsigned __int64)(v192 - v152 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v152);
}
sub_14003A830((__int64)Src);
if ( v219 > 0xF )
{
v193 = v217[0];
if ( v219 + 1 >= 0x1000 )
{
v193 = *((void **)v217[0] - 1);
if ( (unsigned __int64)((char *)v217[0] - (char *)v193 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v193);
}
v218 = 0;
v219 = 15;
LOBYTE(v217[0]) = 0;
sub_14003A830((__int64)v212);
return 1;
}