//
// GauntletNode::generateNode from 0x91a1e0 to 0x91be64 (7300 bytes)
//
// 3 xrefs:
// > GauntletNode::init @ 0x91bf00
// > GauntletNode::onUnlock @ 0x91d2e0
// > ??> @ 0x47958
//
// 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
//
void GauntletNode::generateNode(GauntletNode *a1)
{
GJMapPack *m_gauntlet; // x0
cocos2d::CCNode *v3; // x0
cocos2d::CCNode_vtbl *v4; // x2
cocos2d::CCNode *v5; // x0
cocos2d::CCNode_vtbl *v6; // x2
float v7; // s9
float v8; // s8
GLubyte v9; // w2
cocos2d::CCNode *v10; // x25
void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x21
cocos2d::CCLabelBMFont *v12; // x21
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22
cocos2d::CCLabelBMFont *v14; // x22
void (__fastcall *v15)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27
__int64 v16; // x24
cocos2d::CCLabelBMFont *v17; // x24
void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // x23
void (__fastcall *v19)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23
__int64 v20; // x0
cocos2d::CCLabelBMFont *v21; // x23
void (__fastcall *v22)(cocos2d::CCLabelBMFont *__hidden, float); // x28
void (__fastcall *v23)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28
__int64 v24; // x0
cocos2d::CCSprite *v25; // x22
void (__fastcall *v26)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21
cocos2d::CCSprite *v27; // x21
void (__fastcall *v28)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24
__int64 v29; // x23
unsigned int v30; // w0
cocos2d::CCString *v31; // x0
char *CString; // x0
cocos2d::CCLabelBMFont *v33; // x21
void (__fastcall *v34)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23
__int64 v35; // x22
cocos2d::CCLabelBMFont *v36; // x22
void (__fastcall *v37)(cocos2d::CCLabelBMFont *__hidden, float); // x23
cocos2d::CCLabelBMFont *v38; // x0
const cocos2d::CCPoint *(__fastcall *v39)(cocos2d::CCNode *__hidden); // x1
void (__fastcall *v40)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21
__int64 v41; // x0
cocos2d::CCLabelBMFont *v42; // x21
void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCLabelBMFont *v44; // x22
void (__fastcall *v45)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23
__int64 v46; // x0
GJChestSprite *v47; // x22
cocos2d::CCLabelBMFont *v48; // x0
const cocos2d::CCPoint *(__fastcall *v49)(cocos2d::CCNode *__hidden); // x1
void (__fastcall *v50)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21
__int64 v51; // x0
GJChestSprite *v52; // x21
void (__fastcall *v53)(cocos2d::CCSprite *__hidden, float); // x19
void (__fastcall *v54)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x19
__int64 v55; // x0
cocos2d::CCArray *v56; // x0
__int64 v57; // x0
cocos2d::CCArray *v58; // x0
__int64 v59; // x0
cocos2d::CCArray **p_m_pTargetArray; // x0
char *p_m_fBrVertexMod; // x0
cocos2d::CCArray **v62; // x26
unsigned int *v63; // x19
int v64; // w0
char v65; // w0
char v66; // w0
char v67; // w0
char v68; // w1
char v69; // w1
int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x3
cocos2d::CCSprite *v71; // x21
void (__fastcall *v72)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22
cocos2d::CCSprite *v73; // x21
void (__fastcall *v74)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22
cocos2d::CCSprite *v75; // x22
cocos2d::CCSprite *v76; // x0
const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1
void (__fastcall *v78)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21
__int64 v79; // x23
cocos2d::CCLabelBMFont *v80; // x21
void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3
void (__fastcall *v82)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19
__int64 v83; // x22
cocos2d::CCSprite *v84; // x22
void (__fastcall *v85)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCSprite *v86; // x21
cocos2d::CCSprite *v87; // x0
const cocos2d::CCPoint *(__fastcall *v88)(cocos2d::CCNode *__hidden); // x1
void (__fastcall *v89)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22
__int64 v90; // x0
GameStatsManager *v91; // x0
GameStatsManager *v92; // x22
int isSpecialChestUnlocked; // w22
void *v94; // x0
void *v95; // x0
unsigned int *v96; // x1
int v97; // w2
unsigned int *v98; // x1
int v99; // w2
unsigned int *p_m_fTextureTop; // x1
int m_fTextureTop_low; // w2
cocos2d::CCLabelBMFont *v102; // x23
void (__fastcall *v103)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24
cocos2d::CCLabelBMFont *v104; // x22
void (__fastcall *v105)(cocos2d::CCLabelBMFont *__hidden, float); // x24
void (__fastcall *v106)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24
__int64 v107; // x0
GJChestSprite *v108; // x24
void (__fastcall *v109)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22
__int64 v110; // x0
GJChestSprite *v111; // x22
void (__fastcall *v112)(cocos2d::CCSprite *__hidden, float); // x19
void (__fastcall *v113)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x19
__int64 v114; // x0
cocos2d::CCArray *v115; // x0
__int64 v116; // x0
cocos2d::CCArray *v117; // x0
__int64 v118; // x0
unsigned int *p_m_nExtraKerning; // x1
int m_nExtraKerning; // w2
int m_packID; // [xsp+8Ch] [xbp+8Ch]
_WORD v122[4]; // [xsp+A0h] [xbp+A0h] BYREF
_WORD v123[4]; // [xsp+A8h] [xbp+A8h] BYREF
cocos2d::CCLabelBMFont *v124; // [xsp+B0h] [xbp+B0h] BYREF
cocos2d::CCSprite *v125; // [xsp+B8h] [xbp+B8h] BYREF
cocos2d::CCPoint v126; // [xsp+C0h] [xbp+C0h] BYREF
cocos2d::CCLabelBMFont *v127; // [xsp+C8h] [xbp+C8h] BYREF
cocos2d::CCPoint v128; // [xsp+D0h] [xbp+D0h] BYREF
cocos2d::CCRect v129; // [xsp+D8h] [xbp+D8h] BYREF
cocos2d::CCRect v130; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
a1->removeAllChildrenWithCleanup(a1, 0);
m_gauntlet = a1->m_gauntlet;
if ( m_gauntlet )
{
m_packID = m_gauntlet->m_packID;
GauntletNode::nameForType(m_packID, (__int64)&v124);
GauntletNode::frameForType(m_packID, (__int64)&v125);
v122[0] = -1;
LOBYTE(v122[1]) = -1;
memset(v123, 255, 3);
v3 = cocos2d::CCNode::create();
v4 = v3->__vftable;
a1->m_gauntletInfoNode = v3;
v4->setContentSize(v3, &stru_1243338);
a1->addChild_0(a1, a1->m_gauntletInfoNode, 1);
v5 = cocos2d::CCNode::create();
v6 = v5->__vftable;
a1->m_rewardNode = v5;
v6->setContentSize(v5, &stru_1243338);
a1->addChild_0(a1, a1->m_rewardNode, 2);
a1->m_rewardNode->setVisible(a1->m_rewardNode, 0);
switch ( m_packID )
{
case 1:
v122[0] = 25855;
LOBYTE(v122[1]) = 0;
goto LABEL_29;
case 2:
v67 = -1;
v68 = -106;
v122[0] = 32000;
LOBYTE(v122[1]) = -1;
goto LABEL_31;
case 3:
v123[0] = -156;
v122[0] = -20736;
LOBYTE(v122[1]) = 0;
LOBYTE(v123[1]) = 50;
v7 = 0.0;
v8 = 0.62;
break;
case 4:
strcpy((char *)v122, "d");
LOBYTE(v122[1]) = -56;
v123[0] = 13020;
v7 = 0.0;
LOBYTE(v123[1]) = -1;
v8 = 0.62;
break;
case 5:
v122[0] = 200;
v123[0] = 23295;
LOBYTE(v122[1]) = 0;
LOBYTE(v123[1]) = 0;
v7 = 0.0;
v8 = 0.7;
break;
case 6:
v122[0] = 25675;
v7 = 0.0;
v8 = 0.7;
LOBYTE(v122[1]) = -1;
break;
case 7:
v65 = 100;
goto LABEL_18;
case 8:
case 15:
v65 = 50;
LABEL_18:
LOBYTE(v122[0]) = v65;
HIBYTE(v122[0]) = v65;
LOBYTE(v122[1]) = v65;
v123[0] = 6655;
LOBYTE(v123[1]) = 25;
v7 = 0.0;
v8 = 0.7;
break;
case 9:
v122[0] = 25600;
LOBYTE(v122[1]) = -1;
goto LABEL_35;
case 10:
LOBYTE(v122[1]) = -106;
v122[0] = 13055;
v123[0] = -14081;
LOBYTE(v123[1]) = -1;
v7 = 0.0;
v8 = 0.6;
break;
case 11:
v68 = 50;
v67 = -1;
v122[0] = 12800;
LOBYTE(v122[1]) = 125;
goto LABEL_31;
case 12:
v122[0] = 25750;
v123[0] = -14081;
LOBYTE(v122[1]) = 0;
v7 = 0.0;
LOBYTE(v123[1]) = 50;
v8 = 0.7;
break;
case 13:
v122[0] = 19200;
v123[0] = -206;
LOBYTE(v122[1]) = 0;
LOBYTE(v123[1]) = 0;
v7 = 0.0;
v8 = 0.55;
break;
case 14:
qmemcpy(v122, "dK2", 3);
v67 = 25;
v68 = -1;
goto LABEL_31;
case 16:
v122[0] = 25600;
v123[0] = -206;
LOBYTE(v122[1]) = 0;
LOBYTE(v123[1]) = 0;
v7 = 2.0;
v8 = 0.7;
break;
case 17:
v122[0] = 25750;
v123[0] = -14081;
LOBYTE(v122[1]) = 0;
v7 = 1.0;
LOBYTE(v123[1]) = 50;
v8 = 0.7;
break;
case 18:
strcpy((char *)v122, "_");
LOBYTE(v122[1]) = -71;
v123[0] = 32255;
LOBYTE(v123[1]) = -1;
v7 = 0.0;
v8 = 0.7;
break;
case 19:
v122[0] = 19200;
LOBYTE(v122[1]) = 75;
v123[0] = -14336;
LOBYTE(v123[1]) = -56;
v7 = -2.0;
v8 = 0.7;
break;
case 20:
strcpy((char *)v122, "n");
v123[0] = 19455;
LOBYTE(v122[1]) = 0;
LOBYTE(v123[1]) = 0;
v7 = 3.0;
v8 = 0.7;
break;
case 21:
v122[0] = 32050;
LOBYTE(v122[1]) = -1;
v123[0] = -156;
LOBYTE(v123[1]) = -1;
v7 = 3.0;
v8 = 0.7;
break;
case 22:
qmemcpy(v122, "$,0", 3);
v123[0] = -1;
LOBYTE(v123[1]) = 110;
v7 = 0.0;
v8 = 0.55;
break;
case 23:
qmemcpy(v122, "ZZP", 3);
v123[0] = -96;
v7 = 0.0;
v8 = 0.7;
LOBYTE(v123[1]) = 13;
break;
case 24:
qmemcpy(v122, "#>=", 3);
LOBYTE(v123[0]) = -113;
v66 = -12;
goto LABEL_21;
case 25:
qmemcpy(v122, "=,(", 3);
v123[0] = -6401;
v7 = 2.0;
v8 = 0.7;
LOBYTE(v123[1]) = -86;
break;
case 26:
qmemcpy(v122, "Z#<", 3);
v123[0] = -26881;
LOBYTE(v123[1]) = -1;
v7 = 0.0;
v8 = 0.7;
break;
case 27:
qmemcpy(v122, "5(h", 3);
v123[0] = -19201;
v7 = 0.0;
v8 = 0.7;
LOBYTE(v123[1]) = 114;
break;
case 28:
v122[0] = 6483;
LOBYTE(v123[0]) = 0;
LOBYTE(v122[1]) = 96;
goto LABEL_26;
case 29:
v122[0] = 7751;
LOBYTE(v122[1]) = 0;
LOBYTE(v123[0]) = -1;
*(_WORD *)((char *)v123 + 1) = 130;
v7 = 3.0;
v8 = 0.48;
break;
case 30:
qmemcpy(v122, "-7-", 3);
LOBYTE(v123[0]) = -1;
*(_WORD *)((char *)v123 + 1) = 220;
v7 = 3.0;
v8 = 0.55;
break;
case 31:
v69 = 80;
v122[0] = 12800;
goto LABEL_61;
case 32:
qmemcpy(v122, "2%?", 3);
LOBYTE(v123[0]) = -86;
v66 = 96;
goto LABEL_21;
case 33:
LOBYTE(v122[1]) = 125;
v123[0] = -6631;
v122[0] = 17920;
v7 = 2.0;
LOBYTE(v123[1]) = -1;
v8 = 0.7;
break;
case 34:
strcpy((char *)v122, "L");
LOBYTE(v122[1]) = 76;
LOBYTE(v123[0]) = -1;
*(_WORD *)((char *)v123 + 1) = 140;
v7 = 6.0;
v8 = 0.6;
break;
case 35:
v122[0] = 7218;
v123[0] = -256;
LOBYTE(v122[1]) = 105;
LOBYTE(v123[1]) = -1;
v7 = 5.0;
v8 = 0.7;
break;
case 36:
strcpy((char *)v122, "^");
LOBYTE(v122[1]) = -106;
LOBYTE(v123[0]) = 124;
*(_WORD *)((char *)v123 + 1) = 255;
v7 = -4.0;
v8 = 0.55;
break;
case 37:
strcpy((char *)v122, "m_labelColor.r = v123[0];
a1->m_labelColor.b = v9;
*(_WORD *)&a1->m_backgroundColor.r = v122[0];
a1->m_backgroundColor.b = v122[1];
cocos2d::CCRect::CCRect(&v129, 0.0, 0.0, 86.0, 86.0);
v10 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"GJ_squareB_01.png",
(const char *)&v129,
v130);
((void (__fastcall *)(cocos2d::CCNode *, __int64))v10->__vftable[1].~CCNode_0)(v10, 0xFFFFFFFFLL);
setContentSize = v10->setContentSize;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v129, 110.0, 234.0);
setContentSize(v10, (const cocos2d::CCSize *)&v129);
a1->addChild_0(a1, v10, -1);
((void (__fastcall *)(cocos2d::CCNode *, _WORD *))v10->__vftable[1].getTag)(v10, v122);
v12 = cocos2d::CCLabelBMFont::create();
a1->addChild_0(a1, v12, 2);
cocos2d::CCLabelBMFont::limitLabelWidth(v12, 75.0, v8, 0.0);
setPosition = v12->setPosition;
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, 94.0);
setPosition(v12, &v129.origin);
v12->setColor(v12, (const cocos2d::ccColor3B *)v123);
v14 = cocos2d::CCLabelBMFont::create();
a1->addChild_0(a1, v14, 2);
v14->setScale(v14, 0.45);
v15 = v14->setPosition;
v16 = (__int64)v12->getPosition(v12);
cocos2d::CCPoint::CCPoint(&v128, 0.0, -19.0);
cocos2d::CCPoint::operator+(&v129, v16, &v128);
v15(v14, &v129.origin);
v14->setColor(v14, (const cocos2d::ccColor3B *)v123);
cocos2d::CCPoint::CCPoint(&v126, 2.0, -3.0);
v17 = cocos2d::CCLabelBMFont::create();
a1->addChild_0(a1, v17, 1);
setScale = v17->setScale;
v12->getScale(v12);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))setScale)(v17);
v19 = v17->setPosition;
v20 = (__int64)v12->getPosition(v12);
cocos2d::CCPoint::operator+(&v129, v20, &v126);
v19(v17, &v129.origin);
v21 = cocos2d::CCLabelBMFont::create();
a1->addChild_0(a1, v21, 1);
v22 = v21->setScale;
v14->getScale(v14);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v22)(v21);
v23 = v21->setPosition;
v24 = (__int64)v14->getPosition(v14);
cocos2d::CCPoint::operator+(&v129, v24, &v126);
v23(v21, &v129.origin);
v17->setColor(v17, (const cocos2d::ccColor3B *)&unk_EF3D40);
v21->setColor(v21, (const cocos2d::ccColor3B *)&unk_EF3D40);
v17->setOpacity(v17, 60);
v21->setOpacity(v21, 60);
if ( a1->m_locked )
{
getTag = v10->__vftable[1].getTag;
memset(&v129, 80, 3);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v10, &v129);
LOWORD(v127) = -20561;
BYTE2(v127) = -81;
v12->setColor(v12, (const cocos2d::ccColor3B *)&v127);
v14->setColor(v14, (const cocos2d::ccColor3B *)&v127);
v71 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lockGray_001.png");
v71->setScale(v71, 1.75);
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v71, 2);
v72 = v71->setPosition;
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, v7 + 16.0);
v72(v71, &v129.origin);
v73 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_unlockBtn_001.png");
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v73, 2);
v74 = v73->setPosition;
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, -41.0);
v74(v73, &v129.origin);
v75 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_adVideoBtn_001.png");
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v75, 2);
v76 = v73;
getPosition = v73->getPosition;
v78 = v75->setPosition;
v79 = (__int64)getPosition(v76);
cocos2d::CCPoint::CCPoint(&v128, 0.0, -31.0);
cocos2d::CCPoint::operator+(&v129, v79, &v128);
v78(v75, &v129.origin);
v80 = cocos2d::CCLabelBMFont::create();
v80->setScale(v80, 0.3);
setColor = v80->setColor;
LOWORD(v129.origin.x) = -30841;
BYTE2(v129.origin.x) = -121;
setColor(v80, (const cocos2d::ccColor3B *)&v129);
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v80, 2);
v82 = v80->setPosition;
v83 = (__int64)v75->getPosition(v75);
cocos2d::CCPoint::CCPoint(&v128, 0.0, -25.0);
cocos2d::CCPoint::operator+(&v129, v83, &v128);
v82(v80, &v129.origin);
}
else
{
v25 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v125);
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v25, 2);
v26 = v25->setPosition;
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, v7 + 16.0);
v26(v25, &v129.origin);
v27 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v125);
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v27, 1);
v28 = v27->setPosition;
v29 = (__int64)v25->getPosition(v25);
cocos2d::CCPoint::CCPoint(&v128, 0.0, -10.0);
cocos2d::CCPoint::operator+(&v129, v29, &v128);
v28(v27, &v129.origin);
v27->setScaleY(v27, 1.2);
v27->setColor(v27, (const cocos2d::ccColor3B *)&unk_EF3D40);
v27->setOpacity(v27, 50);
v30 = GJMapPack::completedMaps(a1->m_gauntlet);
v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i/5", (const char *)v30);
CString = (char *)cocos2d::CCString::getCString(v31);
sub_D153B8((int)&v127, CString);
v33 = cocos2d::CCLabelBMFont::create();
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v33, 2);
v33->setScale(v33, 0.4);
v34 = v33->setPosition;
v35 = (__int64)v25->getPosition(v25);
cocos2d::CCPoint::CCPoint(&v128, 0.0, -40.0 - v7);
cocos2d::CCPoint::operator+(&v129, v35, &v128);
v34(v33, &v129.origin);
v36 = cocos2d::CCLabelBMFont::create();
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v36, 1);
v37 = v36->setScale;
v33->getScale(v33);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v37)(v36);
v36->setColor(v36, (const cocos2d::ccColor3B *)&unk_EF3D40);
v36->setOpacity(v36, 60);
v38 = v33;
v39 = v33->getPosition;
v40 = v36->setPosition;
v41 = (__int64)v39(v38);
cocos2d::CCPoint::operator+(&v129, v41, &v126);
v40(v36, &v129.origin);
if ( GJMapPack::hasCompletedMapPack(a1->m_gauntlet) )
{
v84 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png");
a1->addChild_0(a1, v84, 5);
v84->setScale(v84, 1.1);
v85 = v84->setPosition;
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, -72.0);
v85(v84, &v129.origin);
v86 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png");
a1->addChild_0(a1, v86, 1);
v86->setScale(v86, 1.1);
v87 = v84;
v88 = v84->getPosition;
v89 = v86->setPosition;
v90 = (__int64)v88(v87);
cocos2d::CCPoint::operator+(&v129, v90, &v126);
v89(v86, &v129.origin);
v86->setColor(v86, (const cocos2d::ccColor3B *)&unk_EF3D40);
v86->setOpacity(v86, 60);
v91 = GameStatsManager::sharedState();
GameStatsManager::getGauntletRewardKey(v91, m_packID, (__int64)&v128);
v92 = GameStatsManager::sharedState();
sub_D18D28(&v129);
isSpecialChestUnlocked = (unsigned __int8)GameStatsManager::isSpecialChestUnlocked((__int64)v92, (char **)&v129);
v94 = (void *)(*(_QWORD *)&v129.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v129.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v98 = (unsigned int *)(*(_QWORD *)&v129.origin - 8LL);
do
v99 = __ldaxr(v98);
while ( __stlxr(v99 - 1, v98) );
}
else
{
v99 = *(_DWORD *)(*(_QWORD *)&v129.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v129.origin - 8LL) = v99 - 1;
}
if ( v99 <= 0 )
operator delete(v94);
}
if ( !isSpecialChestUnlocked )
{
a1->m_gauntletInfoNode->setVisible(a1->m_gauntletInfoNode, 0);
a1->m_rewardNode->setVisible(a1->m_rewardNode, 1);
v102 = cocos2d::CCLabelBMFont::create();
v102->setScale(v102, 0.65);
a1->m_rewardNode->addChild_0(a1->m_rewardNode, v102, 2);
v103 = v102->setPosition;
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, 43.0);
v103(v102, &v129.origin);
v104 = cocos2d::CCLabelBMFont::create();
v105 = v104->setScale;
v102->getScale(v102);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v105)(v104);
a1->m_rewardNode->addChild_0(a1->m_rewardNode, v104, 1);
v106 = v104->setPosition;
v107 = (__int64)v102->getPosition(v102);
cocos2d::CCPoint::operator+(&v129, v107, &v126);
v106(v104, &v129.origin);
v104->setColor(v104, (const cocos2d::ccColor3B *)&unk_EF3D40);
v104->setOpacity(v104, 60);
v108 = GJChestSprite::create((int)&dword_0 + 2);
a1->m_rewardNode->addChild_0(a1->m_rewardNode, v108, 2);
v108->setScale(v108, 0.6);
v109 = v108->setPosition;
v110 = (__int64)v102->getPosition(v102);
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, *(float *)(v110 + 4) - 46.0);
v109(v108, &v129.origin);
v111 = GJChestSprite::create((int)&dword_0 + 2);
a1->m_rewardNode->addChild_0(a1->m_rewardNode, v111, 1);
v112 = v111->setScale;
v108->getScale(v108);
((void (__fastcall *)(GJChestSprite *))v112)(v111);
v113 = v111->setPosition;
v114 = (__int64)v108->getPosition(v108);
cocos2d::CCPoint::operator+(&v129, v114, &v126);
v113(v111, &v129.origin);
v115 = v111->getChildren(v111);
v116 = cocos2d::CCArray::objectAtIndex(v115, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v116 + 944LL))(v116, &unk_EF3D40);
v117 = v111->getChildren(v111);
v118 = cocos2d::CCArray::objectAtIndex(v117, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v118 + 896LL))(v118, 60);
}
v95 = (void *)(*(_QWORD *)&v128 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v128 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v96 = (unsigned int *)(*(_QWORD *)&v128 - 8LL);
do
v97 = __ldaxr(v96);
while ( __stlxr(v97 - 1, v96) );
}
else
{
v97 = *(_DWORD *)(*(_QWORD *)&v128 - 8LL);
*(_DWORD *)(*(_QWORD *)&v128 - 8LL) = v97 - 1;
}
if ( v97 <= 0 )
operator delete(v95);
}
}
else
{
v42 = cocos2d::CCLabelBMFont::create();
v42->setScale(v42, 0.45);
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v42, 2);
v43 = v42->setPosition;
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, -47.0);
v43(v42, &v129.origin);
v44 = cocos2d::CCLabelBMFont::create();
v44->setScale(v44, 0.45);
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v44, 1);
v45 = v44->setPosition;
v46 = (__int64)v42->getPosition(v42);
cocos2d::CCPoint::operator+(&v129, v46, &v126);
v45(v44, &v129.origin);
v44->setColor(v44, (const cocos2d::ccColor3B *)&unk_EF3D40);
v44->setOpacity(v44, 60);
v47 = GJChestSprite::create((int)&dword_0 + 2);
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v47, 2);
v47->setScale(v47, 0.4);
v48 = v42;
v49 = v42->getPosition;
v50 = v47->setPosition;
v51 = (__int64)v49(v48);
cocos2d::CCPoint::CCPoint(&v129.origin, 0.0, *(float *)(v51 + 4) - 31.5);
v50(v47, &v129.origin);
v52 = GJChestSprite::create((int)&dword_0 + 2);
a1->m_gauntletInfoNode->addChild_0(a1->m_gauntletInfoNode, v52, 1);
v53 = v52->setScale;
v47->getScale(v47);
((void (__fastcall *)(GJChestSprite *))v53)(v52);
v54 = v52->setPosition;
v55 = (__int64)v47->getPosition(v47);
cocos2d::CCPoint::operator+(&v129, v55, &v126);
v54(v52, &v129.origin);
v56 = v52->getChildren(v52);
v57 = cocos2d::CCArray::objectAtIndex(v56, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v57 + 944LL))(v57, &unk_EF3D40);
v58 = v52->getChildren(v52);
v59 = cocos2d::CCArray::objectAtIndex(v58, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v59 + 896LL))(v59, 60);
}
p_m_pTargetArray = &v127[-1].m_pTargetArray;
if ( &v127[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 )
{
if ( &pthread_create )
{
p_m_nExtraKerning = (unsigned int *)&v127[-1].m_nExtraKerning;
do
m_nExtraKerning = __ldaxr(p_m_nExtraKerning);
while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) );
}
else
{
m_nExtraKerning = v127[-1].m_nExtraKerning;
v127[-1].m_nExtraKerning = m_nExtraKerning - 1;
}
if ( m_nExtraKerning <= 0 )
operator delete(p_m_pTargetArray);
}
}
p_m_fBrVertexMod = (char *)&v125[-1].m_fBrVertexMod;
if ( (__int64 *)&v125[-1].m_fBrVertexMod != &qword_124B6B0 )
{
if ( &pthread_create )
{
p_m_fTextureTop = (unsigned int *)&v125[-1].m_fTextureTop;
do
m_fTextureTop_low = __ldaxr(p_m_fTextureTop);
while ( __stlxr(m_fTextureTop_low - 1, p_m_fTextureTop) );
}
else
{
m_fTextureTop_low = LODWORD(v125[-1].m_fTextureTop);
LODWORD(v125[-1].m_fTextureTop) = m_fTextureTop_low - 1;
}
if ( m_fTextureTop_low <= 0 )
operator delete(p_m_fBrVertexMod);
}
v62 = &v124[-1].m_pTargetArray;
if ( &v124[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 )
{
if ( &pthread_create )
{
v63 = (unsigned int *)&v124[-1].m_nExtraKerning;
do
v64 = __ldaxr(v63);
while ( __stlxr(v64 - 1, v63) );
}
else
{
v64 = v124[-1].m_nExtraKerning;
v124[-1].m_nExtraKerning = v64 - 1;
}
if ( v64 <= 0 )
operator delete(v62);
}
}
}