//
// GauntletLayer::setupGauntlet from 0x100393150 to 0x1003940a3 (3923 bytes)
//
// 2 xrefs:
// > GauntletLayer::init @ 0x100392ff0
// > GauntletLayer::loadLevelsFinished @ 0x1003942fe
//
// 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 __fastcall GauntletLayer::setupGauntlet(GauntletLayer *a1, cocos2d::CCArray *a2)
{
GauntletLayer *v2; // r14
cocos2d::CCMenu *v3; // rsi
GauntletLayer_vtbl *v4; // rax
double v5; // xmm0_8
const char *v6; // r14
size_t v7; // rax
std::string::size_type v8; // r15
char *data; // r12
size_t v10; // rbx
std::string::pointer v11; // rbx
std::string::size_type size; // r13
unsigned __int8 v13; // r12
std::string::size_type v14; // rax
std::string::size_type v15; // rdx
char *v16; // r13
char *v17; // rax
char *v18; // rax
std::string::size_type v19; // rax
const std::string::value_type *v20; // rcx
std::string::size_type v21; // r8
std::string::size_type v22; // rbx
__int64 v23; // rax
std::string::size_type v24; // rcx
unsigned int v25; // r13d
unsigned int v26; // eax
__int64 v27; // rbx
GameStatsManager *v28; // rax
unsigned int v29; // eax
int v30; // xmm0_4
__int64 v31; // rbx
cocos2d::CCObject *v32; // rbx
GauntletSprite *v33; // r14
CCMenuItemSpriteExtra *v34; // r12
int v35; // eax
cocos2d::CCNode *v36; // r13
cocos2d::CCNode *v37; // r15
const char *v38; // rdi
cocos2d::CCSprite *v39; // r14
const char *v40; // rdi
cocos2d::CCLabelBMFont *v41; // rax
int v42; // edx
cocos2d::CCLabelBMFont *v43; // rbx
cocos2d::CCString *v44; // rax
const char *CString; // rax
void *v46; // r14
cocos2d::CCSprite *v47; // r15
GameStatsManager *v48; // rdi
GJGameLevel *v49; // rsi
cocos2d::CCSprite *v50; // r14
cocos2d::CCSprite *v51; // r14
cocos2d::CCObject *v52; // rax
unsigned int j; // r14d
__int64 v54; // rax
unsigned int v55; // ebx
unsigned int v56; // eax
int v57; // ecx
int v58; // r8d
int v59; // r9d
cocos2d::CCAction *v60; // rax
char v61; // bl
double *v62; // rsi
int v63; // r12d
float *v64; // rsi
double v65; // xmm0_8
cocos2d::CCSprite *v66; // r14
int v67; // eax
double v68; // xmm0_8
cocos2d::CCSprite_vtbl *v69; // rax
cocos2d::CCScaleTo *v70; // rax
unsigned int v71; // r13d
unsigned __int8 v72; // bl
unsigned __int8 v73; // r15
__int64 v74; // rax
unsigned int v75; // ebx
int v76; // r8d
int v77; // r9d
int v78; // r15d
int v79; // eax
unsigned int v80; // eax
int v81; // ecx
int v82; // r8d
int v83; // r9d
cocos2d::CCAction *v84; // rax
char v85; // [rsp+0h] [rbp-150h]
unsigned __int64 v86; // [rsp+8h] [rbp-148h] BYREF
float v87; // [rsp+10h] [rbp-140h] BYREF
float v88; // [rsp+18h] [rbp-138h] BYREF
float v89; // [rsp+20h] [rbp-130h] BYREF
float v90; // [rsp+28h] [rbp-128h] BYREF
float v91; // [rsp+30h] [rbp-120h] BYREF
float v92; // [rsp+38h] [rbp-118h] BYREF
float v93; // [rsp+40h] [rbp-110h] BYREF
double v94; // [rsp+48h] [rbp-108h] BYREF
float v95[2]; // [rsp+50h] [rbp-100h] BYREF
const cocos2d::CCPoint *v96; // [rsp+58h] [rbp-F8h]
char v97; // [rsp+60h] [rbp-F0h] BYREF
char __s[15]; // [rsp+61h] [rbp-EFh] BYREF
void *v99; // [rsp+70h] [rbp-E0h]
unsigned __int64 v100; // [rsp+78h] [rbp-D8h] BYREF
cocos2d::CCLabelBMFont *v101; // [rsp+80h] [rbp-D0h]
unsigned __int64 v102; // [rsp+88h] [rbp-C8h] BYREF
unsigned __int8 v103; // [rsp+90h] [rbp-C0h] BYREF
char v104[15]; // [rsp+91h] [rbp-BFh] BYREF
void *__p; // [rsp+A0h] [rbp-B0h]
float v106; // [rsp+ACh] [rbp-A4h]
std::string __dst; // [rsp+B0h] [rbp-A0h] BYREF
double v108; // [rsp+CCh] [rbp-84h] BYREF
unsigned __int64 v109; // [rsp+D4h] [rbp-7Ch] BYREF
__int16 v110; // [rsp+DCh] [rbp-74h] BYREF
char v111; // [rsp+DEh] [rbp-72h]
GJGameLevel *v112; // [rsp+E0h] [rbp-70h]
_BOOL4 v113; // [rsp+ECh] [rbp-64h]
__int128 v114; // [rsp+F0h] [rbp-60h] BYREF
void *longStorage; // [rsp+100h] [rbp-50h]
__int64 v116; // [rsp+108h] [rbp-48h]
void *v117; // [rsp+110h] [rbp-40h]
unsigned int i; // [rsp+11Ch] [rbp-34h]
GauntletLayer *v119; // [rsp+120h] [rbp-30h]
double v120; // 0:xmm0_8.8
double v121; // 0:xmm0_8.8
v119 = a1;
if ( !a2 || (unsigned int)sub_100720070(a2) != 5 || v119->m_levels )
return;
v2 = v119;
v119->m_levels = a2;
cocos2d::CCObject::retain(a2);
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v120 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v95);
v3 = cocos2d::CCMenu::create();
v4 = v2->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v96 = (const cocos2d::CCPoint *)v3;
((void (__fastcall *)(GauntletLayer *, cocos2d::CCMenu *, __int64, double))v4->addChild_0)(v2, v3, 2, v120);
*(_QWORD *)&v5 = LODWORD(v95[0]);
*(float *)&v5 = v95[0] * 0.5;
sub_10028CBE0((float *)&v86, v95[0] * 0.5, (float)(v95[1] * 0.5) + -12.0);
GauntletNode::frameForType(&v97, (unsigned int)v2->m_gauntletType);
v6 = __s;
if ( (v97 & 1) != 0 )
v6 = (const char *)v99;
v7 = strlen(v6);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v5);
v8 = v7;
if ( v7 >= 0x17 )
{
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
data = (char *)operator new(v10);
__dst.__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst.__r_.__value_.__r.__words[0] = v10 | 1;
__dst.__r_.__value_.__l.__size_ = v8;
goto LABEL_13;
}
__dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v7);
data = __dst.__r_.__value_.__s.__data_;
if ( v7 )
LABEL_13:
memcpy(data, v6, v8);
v11 = __dst.__r_.__value_.__s.__data_;
data[v8] = 0;
*(_DWORD *)((char *)&v114 + 1) = 825241695;
v103 = 22;
strcpy(v104, "_locked_001");
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
{
v11 = __dst.__r_.__value_.__l.__data_;
size = __dst.__r_.__value_.__l.__size_;
}
else
{
size = *(_BYTE *)&__dst.__r_.__value_.__l.0 >> 1;
}
v13 = 22;
v14 = 0;
while ( 2 )
{
v15 = size - v14;
if ( (__int64)(size - v14) >= 4 )
{
v16 = &v11[size];
v17 = &v11[v14];
while ( 1 )
{
v18 = (char *)memchr(v17, 95, v15 - 3);
if ( !v18 )
goto LABEL_35;
if ( *(_DWORD *)v18 == *(_DWORD *)((char *)&v114 + 1) )
break;
v17 = v18 + 1;
v15 = v16 - v17;
if ( v16 - v17 < 4 )
goto LABEL_35;
}
if ( v18 == v16 )
break;
v19 = v18 - v11;
if ( v19 == -1 )
break;
if ( (v13 & 1) != 0 )
{
v20 = (const std::string::value_type *)__p;
v21 = *(_QWORD *)&v104[7];
}
else
{
v21 = v13 >> 1;
v20 = v104;
}
v22 = v19;
std::string::replace(&__dst, v19, 4u, v20, v21);
v13 = v103;
if ( (v103 & 1) != 0 )
{
v23 = *(_QWORD *)&v104[7];
v24 = v22;
v25 = (unsigned int)__dst.__r_.__value_.__l.0;
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_31;
}
else
{
v23 = v103 >> 1;
v24 = v22;
v25 = (unsigned int)__dst.__r_.__value_.__l.0;
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_31:
size = v25 >> 1;
v11 = __dst.__r_.__value_.__s.__data_;
v14 = v24 + v23;
if ( size >= v14 )
continue;
break;
}
}
v11 = __dst.__r_.__value_.__l.__data_;
size = __dst.__r_.__value_.__l.__size_;
v14 = v24 + v23;
if ( __dst.__r_.__value_.__l.__size_ >= v14 )
continue;
}
break;
}
LABEL_35:
if ( (v13 & 1) != 0 )
operator delete(__p);
for ( i = 0; ; ++i )
{
v26 = sub_100720070(v119->m_levels);
if ( i >= v26 )
break;
v27 = sub_1007200C0(v119->m_levels, i);
v28 = GameStatsManager::sharedState();
if ( !GameStatsManager::hasCompletedGauntletLevel(v28, *(_DWORD *)(v27 + 328) - *(_DWORD *)(v27 + 332)) )
break;
}
sub_10028CC60(&v103, &dbl_1009A0E80);
v29 = v119->m_gauntletType - 16;
if ( v29 > 0x2C )
v30 = 1109393408;
else
v30 = dword_10081A410[v29];
v106 = *(float *)&v30;
v31 = 0;
do
{
v112 = (GJGameLevel *)sub_1007200C0(v119->m_levels, (unsigned int)v31);
v116 = v31;
v113 = i == (_DWORD)v31 && (_DWORD)v31 != 0 && !v112->m_gauntletLevel2;
sub_10028CBE0((float *)&v114, (float)(v116 - 2) * 90.0, flt_10081A220[(v116 & 1) == 0]);
sub_10028CCE0((double *)&v100, &v86, (unsigned __int64 *)&v114);
v32 = v119;
v33 = GauntletSprite::create(v119->m_gauntletType, v113 || (unsigned int)v116 > i);
v34 = CCMenuItemSpriteExtra::create(
v33,
nullptr,
v32,
(cocos2d::SEL_MenuHandler)(unsigned __int64)GauntletLayer::onLevel);
v34->m_scaleMultiplier = 1.2;
CCMenuItemSpriteExtra::setSizeMult(v34, 1.2);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v34->setTag)(v34, v116);
(*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v96 + 440LL))(v96, v34);
v35 = 0;
if ( (v116 & 1) == 0 )
v35 = -6;
sub_10028CBE0((float *)&v109, 0.0, (float)v35);
sub_10028CCE0(&v108, &v100, &v109);
*(cocos2d::CCPoint *)&v121 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v114, v96);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int128 *, double))v34->setPosition)(v34, &v114, v121);
v36 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, void *))v36->setContentSize)(v36, &unk_1009A0E88);
((void (__fastcall *)(GauntletSprite *, cocos2d::CCNode *, __int64))v33->addChild_0)(v33, v36, 1);
((void (__fastcall *)(double *, GauntletSprite *))v33->getScaledContentSize)(&v108, v33);
LODWORD(v117) = LODWORD(v108);
((void (__fastcall *)(unsigned __int64 *, GauntletSprite *))v33->getScaledContentSize)(&v109, v33);
sub_10028CBE0((float *)&v114, *(float *)&v117 * 0.5, *((float *)&v109 + 1) * 0.5);
((void (__fastcall *)(cocos2d::CCNode *, __int128 *))v36->setPosition)(v36, &v114);
v37 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCNode *, void *))v37->setContentSize)(v37, &unk_1009A0E88);
((void (__fastcall *)(GauntletSprite *, cocos2d::CCNode *, __int64))v33->addChild_0)(v33, v37, 0xFFFFFFFFLL);
((void (__fastcall *)(double *, GauntletSprite *))v33->getScaledContentSize)(&v108, v33);
LODWORD(v117) = LODWORD(v108);
((void (__fastcall *)(unsigned __int64 *, GauntletSprite *))v33->getScaledContentSize)(&v109, v33);
sub_10028CBE0((float *)&v114, *(float *)&v117 * 0.5, *((float *)&v109 + 1) * 0.5);
((void (__fastcall *)(cocos2d::CCNode *, __int128 *))v37->setPosition)(v37, &v114);
v38 = __s;
if ( (v97 & 1) != 0 )
v38 = (const char *)v99;
v39 = cocos2d::CCSprite::createWithSpriteFrameName(v38);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *, __int64))v37->addChild_0)(v37, v39, 0xFFFFFFFFLL);
sub_10028CBE0((float *)&v114, 0.0, -10.0);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v39->setPosition)(v39, &v114);
((void (__fastcall *)(cocos2d::CCSprite *, float))v39->setScaleY)(v39, 1.2);
((void (__fastcall *)(cocos2d::CCSprite *, void *))v39->setColor)(v39, &unk_10081A240);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))v39->setOpacity)(v39, 75);
if ( (unsigned int)v116 > i )
{
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v34->setEnabled)(v34, 0);
goto LABEL_96;
}
if ( (v112->m_levelName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&v114,
v112->m_levelName.m_data.m_long.longStorage,
v112->m_levelName.m_data.m_long.size,
COERCE_DOUBLE(1067030938));
}
else
{
longStorage = v112->m_levelName.m_data.m_long.longStorage;
v114 = *(_OWORD *)&v112->m_levelName.m_data.m_short.sizex2;
}
v40 = (char *)&v114 + 1;
if ( (v114 & 1) != 0 )
v40 = (const char *)longStorage;
v41 = cocos2d::CCLabelBMFont::create_3(v40, "bigFont.fnt");
v101 = v41;
if ( (v114 & 1) != 0 )
{
operator delete(longStorage);
v41 = v101;
}
v42 = 120;
if ( (v116 & 1) == 0 )
v42 = 80;
v43 = v41;
cocos2d::CCLabelBMFont::limitLabelWidth(v41, (float)v42, 0.5, 0.0);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *, __int64))v36->addChild_0)(v36, v43, 3);
sub_10028CBE0((float *)&v114, 0.0, v106);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v101->setPosition)(v101, &v114);
v44 = (cocos2d::CCString *)sub_1007AB580("%i", v85);
CString = cocos2d::CCString::getCString(v44);
v117 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
sub_10028CBE0((float *)&v114, 1.0, 0.5);
v46 = v117;
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v117 + 280LL))(v117, &v114);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v46 + 160LL))(v46, 0.40000001);
((void (__fastcall *)(cocos2d::CCNode *, void *, __int64))v36->addChild_0)(v36, v117, 2);
sub_10028CBE0((float *)&v114, -4.0, -38.0);
(*(void (__fastcall **)(void *, __int128 *))(*(_QWORD *)v117 + 184LL))(v117, &v114);
v47 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigStar_001.png");
sub_10028CBE0((float *)&v114, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v47->setAnchorPoint)(v47, &v114);
((void (__fastcall *)(cocos2d::CCSprite *, float))v47->setScale)(v47, 0.40000001);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *, __int64))v36->addChild_0)(v36, v47, 2);
sub_10028CBE0((float *)&v114, -4.0, -38.0);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v47->setPosition)(v47, &v114);
v48 = GameStatsManager::sharedState();
v49 = v112;
if ( GameStatsManager::hasCompletedLevel(v48, v112) )
{
v50 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png");
sub_10028CBE0((float *)&v114, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v50->setAnchorPoint)(v50, &v114);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *, __int64))v36->addChild_0)(v36, v50, 5);
((void (__fastcall *)(cocos2d::CCSprite *, float))v50->setScale)(v50, 0.80000001);
sub_10028CBE0((float *)&v114, 8.0, -5.0);
v48 = (GameStatsManager *)v50;
v49 = (GJGameLevel *)&v114;
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v50->setPosition)(v50, &v114);
}
if ( (_DWORD)v116 == 4 )
{
v51 = cocos2d::CCSprite::createWithSpriteFrameName("miniSkull_001.png");
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *, __int64))v36->addChild_0)(v36, v51, 4);
((void (__fastcall *)(cocos2d::CCSprite *, float))v51->setScale)(v51, 1.2);
sub_10028CBE0((float *)&v114, 0.0, 5.0);
v48 = (GameStatsManager *)v51;
v49 = (GJGameLevel *)&v114;
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v51->setPosition)(v51, &v114);
if ( v113 )
goto LABEL_69;
}
else
{
v51 = nullptr;
if ( v113 )
{
LABEL_69:
v52 = (cocos2d::CCObject *)sub_10071F9E0(v48, v49);
v119->m_activeObjects = (cocos2d::CCArray *)v52;
cocos2d::CCObject::retain(v52);
sub_10071FCD0(v119->m_activeObjects, v101);
sub_10071FCD0(v119->m_activeObjects, v117);
sub_10071FCD0(v119->m_activeObjects, v47);
if ( v51 )
sub_10071FCD0(v119->m_activeObjects, v51);
for ( j = 0; j < (unsigned int)sub_100720070(v119->m_activeObjects); ++j )
{
v54 = sub_1007200C0(v119->m_activeObjects, j);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v54 + 328LL))(v54, 0);
}
v119->m_activeItemButton = v34;
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v34->setEnabled)(v34, 0);
v55 = (unsigned int)cocos2d::CCDelayTime::create(2.0);
v56 = (unsigned int)cocos2d::CCCallFunc::create(
v119,
(cocos2d::SEL_CallFunc)(unsigned __int64)GauntletLayer::unlockActiveItem);
v60 = (cocos2d::CCAction *)sub_1003B5760(v55, v56, 0, v57, v58, v59);
cocos2d::CCNode::runAction(v119, v60);
}
}
if ( (_DWORD)v116 )
{
v61 = v116;
v62 = (double *)&v103;
if ( (v116 & 1) == 0 )
v62 = (double *)&v100;
sub_10028CC60(&v114, v62);
_mm_storel_ps(
(double *)&v114,
_mm_add_ps(
_mm_blend_ps((__m128)*((unsigned int *)&unk_10081A228 + ((v61 & 1) == 0)), (__m128)xmmword_10081A230, 14),
(__m128)(unsigned __int64)v114));
sub_10028CBE0((float *)&v108, -2.0, -1.0);
sub_10028CBE0((float *)&v109, 10.0, 2.5);
sub_10028CBE0(&v87, 21.0, 11.5);
sub_10028CBE0(&v88, 25.0, 26.0);
sub_10028CBE0(&v89, 20.5, 41.0);
sub_10028CBE0(&v90, 15.0, 56.0);
sub_10028CBE0(&v91, 10.5, 71.0);
sub_10028CBE0(&v92, 14.5, 85.5);
sub_10028CBE0(&v93, 25.0, 96.0);
v63 = 1;
LODWORD(v112) = 8;
do
{
sub_10028CC30(&v102);
v64 = (float *)&v109;
switch ( v63 )
{
case 1:
break;
case 2:
v64 = &v87;
break;
case 3:
v64 = &v88;
break;
case 4:
v64 = &v89;
break;
case 5:
v64 = &v90;
break;
case 6:
v64 = &v91;
break;
case 7:
v64 = &v92;
break;
case 8:
v64 = &v93;
break;
}
v65 = sub_10028CC90(&v102, (double *)v64);
if ( (v116 & 1) == 0 )
{
*(_QWORD *)&v65 = (unsigned int)v102 ^ 0x8000000080000000LL;
LODWORD(v102) = v102 ^ 0x80000000;
}
sub_10028CCE0(&v94, (unsigned __int64 *)&v114, &v102);
v66 = cocos2d::CCSprite::createWithSpriteFrameName("uiDot_001.png");
((void (__fastcall *)(GauntletLayer *, cocos2d::CCSprite *, __int64, double))v119->addChild_0)(
v119,
v66,
1,
v65);
v67 = -6710887;
if ( (v63 & 1) == 0 )
v67 = -5066062;
v110 = v67;
v111 = BYTE2(v67);
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v66->setColor)(v66, &v110);
((void (__fastcall *)(cocos2d::CCSprite *, double *))v66->setPosition)(v66, &v94);
if ( v113 )
{
((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))v66->setOpacity)(v66, 0);
v68 = ((double (__fastcall *)(cocos2d::CCSprite *))v66->getScale)(v66);
v69 = v66->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
LODWORD(v117) = LODWORD(v68);
((void (__fastcall *)(cocos2d::CCSprite *, float))v69->setScale)(v66, *(float *)&v68 * 2.5);
v70 = cocos2d::CCScaleTo::create_1(0.30000001, *(float *)&v117);
v117 = cocos2d::CCEaseBounceOut::create(v70);
v71 = (unsigned int)cocos2d::CCFadeIn::create(0.1);
v72 = *(_BYTE *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v66->getColor)(v66);
v73 = *(_BYTE *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))v66->getColor)(v66) + 1);
v74 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v66->getColor)(v66);
v75 = (unsigned int)cocos2d::CCTintTo::create(0.5, v72, v73, *(_BYTE *)(v74 + 2));
((void (__fastcall *)(cocos2d::CCSprite *, void *))v66->setColor)(v66, &unk_10081A243);
v78 = sub_1003B6B60((_DWORD)v117, v71, v75, 0, v76, v77);
v79 = v63;
if ( (v116 & 1) == 0 )
v79 = (int)v112;
v80 = (unsigned int)cocos2d::CCDelayTime::create((float)((float)v79 * 0.15000001) + 0.64999998);
v84 = (cocos2d::CCAction *)sub_1003B5760(v80, v78, 0, v81, v82, v83);
cocos2d::CCNode::runAction(v66, v84);
}
++v63;
LODWORD(v112) = (_DWORD)v112 - 1;
}
while ( v63 != 9 );
}
LABEL_96:
sub_10028CC90(&v103, (double *)&v100);
v31 = (unsigned int)(v116 + 1);
}
while ( (_DWORD)v116 != 4 );
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
if ( (v97 & 1) != 0 )
operator delete(v99);
}