//
// ItemInfoPopup::init from 0x50d98c to 0x50e75c (3536 bytes)
//
// 1 xrefs:
// > ItemInfoPopup::create @ 0x50e8b0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:51:30 +0000
//
GameManager *__fastcall ItemInfoPopup::init(int a1, int a2, int a3)
{
cocos2d::CCDirector *v6; // r0
int v7; // r8
void (__fastcall *v8)(int, _DWORD *); // r9
int v9; // r11
void (__fastcall *v10)(int, _DWORD *); // r10
cocos2d::CCString *v11; // r0
const char *CString; // r8
size_t v13; // r0
const char *v14; // r2
cocos2d::CCLabelBMFont *v15; // r0
int v16; // r8
void (__fastcall *v17)(int, _DWORD *); // r10
AchievementManager *v18; // r0
int v19; // r0
int *v20; // r0
int v21; // r3
AchievementManager *v22; // r11
int v23; // r2
int v24; // r3
int v25; // r11
const char *v26; // r1
char *v27; // r1
cocos2d::CCSprite *v28; // r0
int v29; // r8
void (__fastcall *v30)(int, _DWORD *); // r10
void (__fastcall *v31)(int, _DWORD *); // r11
int *BrowserItem; // r8
int (__fastcall *v33)(int *, _DWORD *); // r11
cocos2d::CCMenu *v34; // r0
int v35; // r0
const char *v36; // r1
ButtonSprite *v37; // r0
int v38; // r0
int v39; // r8
int (__fastcall *v40)(int, _DWORD *); // r9
GameStatsManager *v41; // r0
int v42; // r0
GameManager *ItemUnlockState; // r6
GameManager *v44; // r8
GameManager *v45; // r0
unsigned int v46; // r0
int isIconUnlocked; // r11
GameStatsManager *v48; // r0
char *v49; // r1
char *v50; // r0
cocos2d::CCString *v51; // r0
char *v52; // r1
int *v53; // r0
char *v54; // r1
cocos2d::CCString *v55; // r0
char *v56; // r0
unsigned int v57; // s15
char *v58; // r1
cocos2d::CCString *v59; // r0
char *v60; // r0
unsigned int v61; // s15
bool v62; // zf
int v63; // r3
int v64; // r0
unsigned int v65; // r3
unsigned int v66; // r0
cocos2d::CCLabelBMFont *v67; // r9
int v68; // r8
char *v69; // r0
int v70; // r2
const char *v71; // r1
char *v72; // r2
cocos2d::CCString *v73; // r0
char *v74; // r0
int *isUnlockedByDefault; // r0
int v76; // r0
const char *v77; // r2
const char *v78; // r1
char *v79; // r2
cocos2d::CCString *v80; // r0
char *v81; // r0
char *v82; // r1
char *v83; // r0
cocos2d::CCString *v84; // r0
char *v85; // r0
int v86; // r3
int v87; // r3
int v88; // r8
void (__fastcall *v89)(int, _DWORD *); // r11
cocos2d::CCLabelBMFont *v90; // r0
int v91; // r10
void (__fastcall *v92)(int, _DWORD *); // r11
int v93; // r11
int v94; // r0
GameStatsManager *v95; // r0
cocos2d::CCLabelBMFont *v96; // r0
cocos2d::CCLabelBMFont *v97; // r8
void (__fastcall *v98)(cocos2d::CCLabelBMFont *, _DWORD *); // r11
int v99; // r0
int v100; // r2
cocos2d::CCString *v101; // r0
cocos2d::CCLabelBMFont *v102; // r0
const char *v103; // r2
cocos2d::CCLabelBMFont *v104; // r6
int v105; // r5
void (__fastcall *v106)(int, _BYTE *); // r10
void (__fastcall *v107)(cocos2d::CCLabelBMFont *, _BYTE *); // r2
char *v109; // r1
GameManager *v110; // [sp+10h] [bp-C4h]
int (__fastcall *v111)(int, _DWORD *); // [sp+18h] [bp-BCh]
float v112; // [sp+20h] [bp-B4h] BYREF
float v113; // [sp+24h] [bp-B0h]
float v114[2]; // [sp+28h] [bp-ACh] BYREF
_BYTE v115[8]; // [sp+30h] [bp-A4h] BYREF
_BYTE v116[8]; // [sp+38h] [bp-9Ch] BYREF
_BYTE v117[8]; // [sp+40h] [bp-94h] BYREF
_DWORD v118[2]; // [sp+48h] [bp-8Ch] BYREF
int v119[2]; // [sp+50h] [bp-84h] BYREF
char *v120; // [sp+58h] [bp-7Ch]
int v121[2]; // [sp+5Ch] [bp-78h] BYREF
cocos2d::CCLabelBMFont *v122; // [sp+64h] [bp-70h]
int v123[3]; // [sp+68h] [bp-6Ch] BYREF
int v124[3]; // [sp+74h] [bp-60h] BYREF
int v125; // [sp+80h] [bp-54h] BYREF
int v126; // [sp+84h] [bp-50h]
int v127; // [sp+88h] [bp-4Ch]
int v128; // [sp+8Ch] [bp-48h] BYREF
int v129; // [sp+90h] [bp-44h]
cocos2d::CCLabelBMFont *v130; // [sp+94h] [bp-40h]
int v131; // [sp+98h] [bp-3Ch] BYREF
unsigned int v132; // [sp+9Ch] [bp-38h]
cocos2d::CCLabelBMFont *v133; // [sp+A0h] [bp-34h]
int v134; // [sp+A4h] [bp-30h] BYREF
unsigned int v135; // [sp+A8h] [bp-2Ch]
cocos2d::CCLabelBMFont *v136; // [sp+ACh] [bp-28h]
char v137[4]; // [sp+B0h] [bp-24h] BYREF
int v138; // [sp+B4h] [bp-20h]
cocos2d::CCSprite *v139; // [sp+B8h] [bp-1Ch]
_DWORD v140[4]; // [sp+BCh] [bp-18h] BYREF
v110 = FLAlertLayer::init((FLAlertLayer *)a1, 150);
if ( v110 )
{
(*(void (__fastcall **)(int, int))(*(_DWORD *)a1 + 536))(a1, 1);
v6 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int, int))(*(_DWORD *)a1 + 500))(a1, 1);
*(_DWORD *)(a1 + 520) = a2;
*(_DWORD *)(a1 + 524) = a3;
cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v112);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v140, 0.0, 0.0, 80.0, 80.0);
v7 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v140);
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v140, 300.0, 230.0);
v8(v7, v140);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v7, -2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v114, v112 * 0.5, v113 * 0.5);
(*(void (__fastcall **)(int, float *))(*(_DWORD *)v7 + 92))(v7, v114);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, 0.0, -22.0);
cocos2d::CCPoint::operator+(v115, v114, v140);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v140, 0.0, 0.0, 80.0, 80.0);
v9 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v140);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v9 + 480))(v9, &unk_BECB73);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 456))(v9, 60);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v140, 260.0, 90.0);
v10(v9, v140);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v9, -1);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v9 + 92))(v9, v115);
ItemInfoPopup::nameForUnlockType(v119, a2, a3);
if ( (v119[0] & 1) != 0 )
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s %i", v120, a2);
else
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s %i",
(const char *)v119 + 1,
a2);
CString = (const char *)cocos2d::CCString::getCString(v11);
v121[0] = 0;
v121[1] = 0;
v122 = nullptr;
v13 = strlen(CString);
std::string::__init(v121, CString, v13);
if ( (v121[0] & 1) != 0 )
v15 = v122;
else
v15 = (cocos2d::CCLabelBMFont *)((char *)v121 + 1);
v16 = cocos2d::CCLabelBMFont::create(v15, "goldFont.fnt", v14);
v17 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, v114[0], (float)(v114[1] + 115.0) - 16.0);
v17(v16, v140);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 460) + 228))(*(_DWORD *)(a1 + 460), v16);
v18 = (AchievementManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v16 + 80))(v16, 1061997773);
v19 = AchievementManager::sharedState(v18);
v20 = AchievementManager::achievementForUnlock(v123, v19, a2, a3);
if ( (v123[0] & 1) != 0 )
v21 = v123[1];
else
v21 = (int)LOBYTE(v123[0]) >> 1;
if ( v21 )
{
v22 = (AchievementManager *)AchievementManager::sharedState((AchievementManager *)v20);
std::string::basic_string(v124, (int)v123);
v25 = AchievementManager::limitForAchievement(v22, (int)v124, v23, v24);
std::string::~string((int)v124);
}
else
{
v25 = 0;
}
if ( (unsigned int)(v25 - 2) > 2 )
{
LABEL_24:
BrowserItem = GJItemIcon::createBrowserItem(a3, a2);
(*(void (__fastcall **)(int *, int))(*BrowserItem + 80))(BrowserItem, 1067450368);
(*(void (__fastcall **)(_DWORD, int *, int))(**(_DWORD **)(a1 + 460) + 232))(
*(_DWORD *)(a1 + 460),
BrowserItem,
12);
v33 = *(int (__fastcall **)(int *, _DWORD *))(*BrowserItem + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, 0.0, 56.0);
cocos2d::CCPoint::operator+(v140, v114, v118);
v34 = (cocos2d::CCMenu *)v33(BrowserItem, v140);
v35 = cocos2d::CCMenu::create(v34);
*(_DWORD *)(a1 + 444) = v35;
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v35, 10);
v37 = ButtonSprite::create((ButtonSprite *)"OK", v36);
v118[1] = 0;
v118[0] = ItemInfoPopup::onClose;
v38 = CCMenuItemSpriteExtra::create((int)v37, 0, a1, (int)ItemInfoPopup::onClose, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v38);
v39 = *(_DWORD *)(a1 + 444);
v40 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v39 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, v112 * 0.5, (float)((float)(v113 * 0.5) - 115.0) + 25.0);
v41 = (GameStatsManager *)v40(v39, v140);
v42 = GameStatsManager::sharedState(v41);
ItemUnlockState = (GameManager *)GameStatsManager::getItemUnlockState(v42, a2);
v44 = (GameManager *)GameManager::sharedState(ItemUnlockState);
v45 = (GameManager *)GameManager::sharedState(v44);
v46 = GameManager::unlockTypeToIconType(v45, a3);
isIconUnlocked = GameManager::isIconUnlocked((int)v44, a2, v46);
v125 = 0;
v126 = 0;
v127 = 0;
std::string::__init(&v125, &unk_B6B226, 0);
v128 = 0;
v129 = 0;
v130 = nullptr;
std::string::__init(&v128, &unk_B6B226, 0);
v131 = 0;
v132 = 0;
v133 = nullptr;
v48 = (GameStatsManager *)std::string::__init(&v131, &unk_B6B226, 0);
if ( ItemUnlockState == (GameManager *)&byte_5 )
{
std::string::assign(&v131, "Secret Shop");
if ( (v119[0] & 1) != 0 )
v49 = v120;
else
v49 = (char *)v119 + 1;
v50 = "There may or may not exist a shop where you can buy this %s.";
LABEL_52:
v51 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)v50, v49);
v52 = (char *)cocos2d::CCString::getCString(v51);
v53 = &v125;
LABEL_85:
v48 = (GameStatsManager *)std::string::assign(v53, v52);
LABEL_114:
v76 = GameStatsManager::sharedState(v48);
GameStatsManager::getSpecialUnlockDescription(v137, v76, a2, a3, isIconUnlocked);
if ( (v137[0] & 1) != 0 )
{
if ( !v138 )
goto LABEL_116;
v78 = (const char *)v139;
}
else
{
if ( !((unsigned __int8)v137[0] >> 1) )
goto LABEL_116;
v78 = &v137[1];
}
if ( (v119[0] & 1) != 0 )
v79 = v120;
else
v79 = (char *)v119 + 1;
v80 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s to unlock this %s!",
v78,
v79);
v81 = (char *)cocos2d::CCString::getCString(v80);
std::string::assign(&v125, v81);
std::string::assign(&v128, (char *)&unk_B6B226);
LABEL_116:
isUnlockedByDefault = (int *)std::string::~string((int)v137);
if ( isIconUnlocked )
{
if ( !ItemUnlockState )
{
isUnlockedByDefault = (int *)ItemInfoPopup::isUnlockedByDefault(a1, a2, a3);
if ( isUnlockedByDefault )
{
std::string::assign(&v131, "Default");
if ( (v119[0] & 1) == 0 )
v82 = (char *)v119 + 1;
v83 = "This %s is unlocked by default.";
if ( (v119[0] & 1) != 0 )
v82 = v120;
LABEL_131:
v84 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)v83, v82);
v85 = (char *)cocos2d::CCString::getCString(v84);
isUnlockedByDefault = std::string::assign(&v125, v85);
}
}
}
else if ( !ItemUnlockState )
{
v86 = (unsigned __int8)v125;
isUnlockedByDefault = (int *)((unsigned __int8)v125 << 31);
if ( (v125 & 1) != 0 )
{
if ( v126 )
goto LABEL_133;
}
else
{
v77 = (const char *)((unsigned __int8)v125 >> 1);
if ( v77 )
goto LABEL_137;
}
rand();
switch ( lroundf() )
{
case 0:
v109 = "Soon...";
break;
case 1:
v109 = "Not yet";
break;
case 2:
v109 = "Huh?";
break;
case 3:
v109 = "Stay tuned!";
break;
case 4:
v109 = "Coming soon!";
break;
case 5:
v109 = "In the oven";
break;
case 6:
v109 = "It's cooking";
break;
case 7:
v109 = "Wait for it";
break;
case 8:
v109 = "Not now";
break;
case 9:
v109 = "Unavailable";
break;
case 10:
v109 = "Almost there";
break;
default:
v109 = "Soon...";
break;
}
std::string::assign(&v131, v109);
if ( (v119[0] & 1) != 0 )
v82 = v120;
else
v82 = (char *)v119 + 1;
v83 = "This %s can be unlocked in update 2.21.";
goto LABEL_131;
}
LABEL_132:
v86 = (unsigned __int8)v125;
v77 = (const char *)((unsigned __int8)v125 << 31);
if ( (v125 & 1) == 0 )
{
LABEL_137:
v87 = v86 >> 1;
LABEL_138:
if ( !v87 )
goto LABEL_145;
std::string::basic_string((int *)v137, (int)&v125);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, 0.5, 1.0);
v88 = TextArea::create(
(int)v137,
"bigFont.fnt",
1065353216,
1142292480,
(const cocos2d::CCPoint *)v140,
1109917696,
0,
0);
std::string::~string((int)v137);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v88, 10);
v89 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v88 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, 0.0, -2.0);
cocos2d::CCPoint::operator+(v140, v115, v117);
v89(v88, v140);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v88 + 80))(v88, 1053609165);
isUnlockedByDefault = (int *)((unsigned __int8)v128 << 31);
if ( (v128 & 1) != 0 )
{
if ( !v129 )
goto LABEL_145;
v90 = v130;
}
else
{
if ( !((unsigned __int8)v128 >> 1) )
goto LABEL_145;
v90 = (cocos2d::CCLabelBMFont *)((char *)&v128 + 1);
}
v91 = cocos2d::CCLabelBMFont::create(v90, "chatFont.fnt", v77);
v92 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v91 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, 0.0, -35.0);
cocos2d::CCPoint::operator+(v140, v115, v117);
v92(v91, v140);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 460) + 228))(*(_DWORD *)(a1 + 460), v91);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v91 + 80))(v91, 1058642330);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v91 + 536))(v91, &unk_BECB73);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v91 + 512))(v91, 75);
v111 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v88 + 92);
v93 = (*(int (__fastcall **)(int))(*(_DWORD *)v88 + 96))(v88);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, 0.0, 5.0);
cocos2d::CCPoint::operator+(v140, v93, v117);
isUnlockedByDefault = (int *)v111(v88, v140);
LABEL_145:
if ( (v131 & 1) != 0 )
{
if ( !v132 )
goto LABEL_147;
v96 = v133;
}
else
{
if ( !((unsigned __int8)v131 >> 1) )
goto LABEL_147;
v96 = (cocos2d::CCLabelBMFont *)((char *)&v131 + 1);
}
v97 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v96, "goldFont.fnt", v77);
v98 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v97 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, 0.0, 30.0);
cocos2d::CCPoint::operator+(v140, v115, v117);
v98(v97, v140);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *))(**(_DWORD **)(a1 + 460) + 228))(
*(_DWORD *)(a1 + 460),
v97);
isUnlockedByDefault = (int *)cocos2d::CCLabelBMFont::limitLabelWidth(v97, 180.0, 0.55, 0.0);
if ( ItemUnlockState == (GameManager *)&byte_4 )
isUnlockedByDefault = (int *)(*(int (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v97 + 80))(
v97,
1058642330);
LABEL_147:
v94 = GameStatsManager::sharedState((GameStatsManager *)isUnlockedByDefault);
v95 = (GameStatsManager *)GameStatsManager::accountIDForIcon(v94, a2, a3);
*(_DWORD *)(a1 + 528) = v95;
if ( !v95 )
goto LABEL_162;
v99 = GameStatsManager::sharedState(v95);
GameStatsManager::usernameForAccountID((GameStatsManager *)v137, v99);
v100 = (unsigned __int8)v137[0] << 31;
if ( (v137[0] & 1) != 0 )
{
if ( v138 )
{
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"By %s",
(const char *)v139,
v100);
goto LABEL_159;
}
}
else if ( (unsigned __int8)v137[0] >> 1 )
{
v101 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"By %s",
&v137[1],
v100);
LABEL_159:
v102 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v101);
v104 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v102, "goldFont.fnt", v103);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v116,
(float)((float)(v112 * 0.5) + 150.0) - 60.0,
(float)((float)(v113 * 0.5) - 115.0) + 21.0);
cocos2d::CCLabelBMFont::limitLabelWidth(v104, 100.0, 0.5, 0.0);
v140[0] = ItemInfoPopup::onCredit;
v140[1] = 0;
v105 = CCMenuItemSpriteExtra::create((int)v104, 0, a1, (int)ItemInfoPopup::onCredit, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v105);
v106 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v105 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v117, *(const cocos2d::CCPoint **)(a1 + 444));
v106(v105, v117);
if ( *(int *)(a1 + 528) <= 0 )
{
v107 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v104 + 536);
v117[0] = 90;
v117[1] = -1;
v117[2] = -1;
v107(v104, v117);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v105 + 528))(v105, 0);
}
}
std::string::~string((int)v137);
LABEL_162:
std::string::~string((int)&v131);
std::string::~string((int)&v128);
std::string::~string((int)&v125);
std::string::~string((int)v123);
std::string::~string((int)v121);
std::string::~string((int)v119);
return v110;
}
LABEL_133:
v87 = v126;
goto LABEL_138;
}
if ( ItemUnlockState == (GameManager *)&byte_6 )
{
std::string::assign(&v131, "Community Shop");
v49 = (char *)(LOBYTE(v119[0]) << 31);
if ( (v119[0] & 1) == 0 )
v49 = (char *)v119 + 1;
v50 = "You can buy this %s in the community shop!";
if ( (v119[0] & 1) != 0 )
v49 = v120;
goto LABEL_52;
}
if ( ItemUnlockState == (GameManager *)&byte_7 )
{
std::string::assign(&v131, "Mechanic Shop");
if ( (v119[0] & 1) == 0 )
v49 = (char *)v119 + 1;
v50 = "You can buy this %s at the Mechanic!";
if ( (v119[0] & 1) != 0 )
v49 = v120;
goto LABEL_52;
}
if ( ItemUnlockState == (GameManager *)byte_8 )
{
std::string::assign(&v131, "Diamond Shop");
if ( (v119[0] & 1) == 0 )
v49 = (char *)v119 + 1;
v50 = "You can buy this %s in the diamond shop!";
if ( (v119[0] & 1) != 0 )
v49 = v120;
goto LABEL_52;
}
if ( ItemUnlockState == (GameManager *)&byte_4 )
{
std::string::assign(&v131, "Shop");
if ( (v119[0] & 1) != 0 )
v49 = v120;
else
v49 = (char *)v119 + 1;
v50 = "You can buy this %s in the shop!";
goto LABEL_52;
}
if ( ItemUnlockState == (GameManager *)((char *)&dword_0 + 2) )
{
std::string::assign(&v131, "Secret Chest");
if ( (v119[0] & 1) != 0 )
v54 = v120;
else
v54 = (char *)v119 + 1;
v55 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You can find this %s in a secret chest!",
v54);
v56 = (char *)cocos2d::CCString::getCString(v55);
std::string::assign(&v125, v56);
std::string::assign(&v128, (char *)&unk_B6B226);
v57 = rand();
v53 = &v128;
switch ( (int)(float)(vcvts_n_f32_s32(v57, 0x1Fu) * 10.0) )
{
case 1:
v52 = "Nothing happened.";
break;
case 2:
v52 = "Without a key, it cannot be.";
break;
case 3:
v52 = "Why you click?";
break;
case 4:
v52 = "You are not yet ready.";
break;
case 5:
v52 = "A key, you must have.";
break;
case 6:
v52 = "The lock wont budge.";
break;
case 7:
v52 = "A demon guards it. Find him.";
break;
case 8:
v52 = "You have no power here.";
break;
case 9:
v52 = "Forget about this one.";
break;
default:
v52 = "A key... My kingdom for a key...";
break;
}
goto LABEL_85;
}
if ( ItemUnlockState == (GameManager *)((char *)&dword_0 + 3) )
{
std::string::assign(&v131, "Special Chest");
if ( (v119[0] & 1) != 0 )
v58 = v120;
else
v58 = (char *)v119 + 1;
v59 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You can find this %s in a special chest!",
v58,
LOBYTE(v119[0]) << 31);
v60 = (char *)cocos2d::CCString::getCString(v59);
std::string::assign(&v125, v60);
std::string::assign(&v128, (char *)&unk_B6B226);
v61 = rand();
v53 = &v128;
switch ( (int)(float)(vcvts_n_f32_s32(v61, 0x1Fu) * 10.0) )
{
case 1:
v52 = "That wont work.";
break;
case 2:
v52 = "You must do something.";
break;
case 3:
v52 = "It cannot be done.";
break;
case 4:
v52 = "Prove that you are worthy.";
break;
case 5:
v52 = "Need. More. Power.";
break;
case 6:
v52 = "Player used tap.\nIt's not very effective.";
break;
case 7:
v52 = "A wild lock appeared!";
break;
case 8:
v52 = "You are not ready.";
break;
case 9:
v52 = "ehehehehehe...";
break;
default:
v52 = "IMPOSSIBRU!";
break;
}
goto LABEL_85;
}
if ( ItemUnlockState != (GameManager *)((char *)&dword_0 + 1) )
goto LABEL_114;
GJGarageLayer::titleForUnlock((AchievementManager *)&v134, a2, a3);
v63 = v131 & 1;
v62 = v63 == 0;
if ( (v131 & 1) != 0 )
{
v63 = 0;
*(_BYTE *)v133 = 0;
}
else
{
LOBYTE(v131) = v63;
BYTE1(v131) = v63;
}
if ( !v62 )
v132 = v63;
if ( (v131 & 1) != 0 )
{
v64 = v132;
v65 = (v131 & 0xFFFFFFFE) - 1;
if ( v132 <= 0xA )
{
if ( (v131 & 0xFFFFFFFE) != 0xB )
goto LABEL_98;
goto LABEL_107;
}
}
else
{
v64 = (int)(unsigned __int8)v131 >> 1;
if ( v64 <= 10 )
goto LABEL_107;
v65 = 10;
}
v66 = (v64 + 16) & 0xFFFFFFF0;
if ( v66 - 1 != v65 )
{
if ( v66 != 11 )
{
v69 = (char *)operator new(v66);
v68 = v131 & 1;
if ( (v131 & 1) != 0 )
v67 = v133;
else
v67 = (cocos2d::CCLabelBMFont *)((char *)&v131 + 1);
goto LABEL_102;
}
LABEL_98:
v67 = v133;
v68 = 1;
v69 = (char *)&v131 + 1;
LABEL_102:
if ( (v131 & 1) != 0 )
v70 = v132;
else
v70 = (int)(unsigned __int8)v131 >> 1;
std::char_traits::copy(v69, v67, v70 + 1);
if ( v68 )
operator delete(v67);
}
LABEL_107:
v131 = v134;
v132 = v135;
v133 = v136;
v134 = 0;
v135 = 0;
v136 = nullptr;
std::string::~string((int)&v134);
GJGarageLayer::descriptionForUnlock((AchievementManager *)v137, a2, a3);
if ( (v137[0] & 1) != 0 )
v71 = (const char *)v139;
else
v71 = &v137[1];
if ( (v119[0] & 1) != 0 )
v72 = v120;
else
v72 = (char *)v119 + 1;
v73 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s to unlock this %s!",
v71,
v72,
LOBYTE(v119[0]));
v74 = (char *)cocos2d::CCString::getCString(v73);
std::string::assign(&v125, v74);
isUnlockedByDefault = (int *)std::string::~string((int)v137);
goto LABEL_132;
}
*(_DWORD *)v137 = 0;
v138 = 0;
v139 = nullptr;
std::string::__init((int *)v137, "gj_subzeroLogo_001.png", 0x16u);
if ( v25 == 2 )
{
v27 = "gj_worldLogo_001.png";
}
else
{
if ( v25 != 4 )
goto LABEL_18;
v27 = "GJ_md_001.png";
}
std::string::assign((int *)v137, v27);
LABEL_18:
if ( (v137[0] & 1) != 0 )
v28 = v139;
else
v28 = (cocos2d::CCSprite *)&v137[1];
v29 = cocos2d::CCSprite::createWithSpriteFrameName(v28, v26);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 460) + 228))(*(_DWORD *)(a1 + 460), v29);
v30 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v29 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, 0.0, 1.0);
v30(v29, v140);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v29 + 80))(v29, 1053609165);
v31 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v29 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, -140.0, 105.0);
cocos2d::CCPoint::operator+(v140, v114, v118);
v31(v29, v140);
std::string::~string((int)v137);
goto LABEL_24;
}
return v110;
}