//
// CurrencyRewardLayer::init from 0x1007a5c20 to 0x1007a791c (7420 bytes)
//
// 1 xrefs:
// > CurrencyRewardLayer::create @ 0x1007a5bcf
//
// 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
//
// local variable allocation has failed, the output may be wrong!
bool __fastcall CurrencyRewardLayer::init(
CurrencyRewardLayer *a1,
int a2,
int a3,
int a4,
int a5,
CurrencySpriteType a6,
int a7,
CurrencySpriteType a8,
int a9,
cocos2d::CCPoint a10,
double *a11,
float a12,
float a13)
{
__int64 v13; // r15
int v17; // r8d
int v18; // edx
CurrencySpriteType v19; // r13d
cocos2d::CCTextureCache *v20; // rax
cocos2d::CCTexture2D *v21; // rax
cocos2d::CCTexture2D *v22; // r15
cocos2d::CCSpriteBatchNode *v23; // rax
cocos2d::CCSpriteBatchNode *v24; // rax
cocos2d::CCNode *v25; // rax
CurrencySpriteType v26; // r15d
GameStatsManager *v27; // rax
int Stat; // eax
GameStatsManager *v29; // rax
int v30; // eax
GameStatsManager *v31; // rax
int v32; // eax
GameStatsManager *v33; // rax
int v34; // eax
__int16 v35; // ax
GameStatsManager *v36; // rax
const char *v37; // rsi
int v38; // eax
CurrencySpriteType v39; // ebx
__int64 v40; // r13
__int16 v41; // ax
GameStatsManager *v42; // rax
const char *v43; // rsi
int v44; // eax
cocos2d::CCString *v45; // rax
const char *CString; // rax
cocos2d::CCLabelBMFont *v47; // rax
cocos2d::CCLabelBMFont *m_orbsLabel; // r15
cocos2d::CCLabelBMFont *v49; // rdi
cocos2d::CCLabelBMFont *v50; // r15
_QWORD *v51; // rsi
float v52; // xmm0_4
double v53; // xmm0_8
double v54; // xmm0_8
cocos2d::CCSprite *v55; // r12
unsigned __int64 *v56; // r15
cocos2d::CCNode *m_mainNode; // r15
cocos2d::CCTintTo *v58; // r15
cocos2d::CCTintTo *v59; // rax
cocos2d::CCSequence *v60; // rax
cocos2d::CCRepeatForever *v61; // rax
cocos2d::CCParticleSystemQuad *v62; // r13
__int64 v63; // rax
cocos2d::CCString *v64; // rax
const char *v65; // rax
cocos2d::CCLabelBMFont *v66; // rax
cocos2d::CCLabelBMFont *m_starsLabel; // r15
cocos2d::CCLabelBMFont *v68; // rdi
cocos2d::CCLabelBMFont *v69; // r15
_QWORD *v70; // rax
float v71; // xmm0_4
float v72; // xmm0_4
cocos2d::CCSprite *v73; // r12
unsigned __int64 *v74; // r15
cocos2d::CCNode *v75; // r15
cocos2d::CCTintTo *v76; // r15
cocos2d::CCTintTo *v77; // rax
cocos2d::CCSequence *v78; // rax
cocos2d::CCRepeatForever *v79; // rax
cocos2d::CCParticleSystemQuad *v80; // r13
__int64 v81; // rax
cocos2d::CCString *v82; // rax
const char *v83; // rax
cocos2d::CCLabelBMFont *v84; // rax
cocos2d::CCLabelBMFont *m_moonsLabel; // r15
cocos2d::CCLabelBMFont *v86; // rdi
cocos2d::CCLabelBMFont *v87; // r15
_QWORD *v88; // rax
float v89; // xmm0_4
float v90; // xmm0_4
cocos2d::CCSprite *v91; // r12
unsigned __int64 *v92; // r15
cocos2d::CCNode *v93; // r15
cocos2d::CCTintTo *v94; // r15
cocos2d::CCTintTo *v95; // rax
cocos2d::CCSequence *v96; // rax
cocos2d::CCRepeatForever *v97; // rax
cocos2d::CCParticleSystemQuad *v98; // r13
__int64 v99; // rax
cocos2d::CCString *v100; // rax
const char *v101; // rax
cocos2d::CCLabelBMFont *v102; // rax
cocos2d::CCLabelBMFont *m_diamondsLabel; // r15
cocos2d::CCLabelBMFont *v104; // rdi
cocos2d::CCLabelBMFont *v105; // r15
_QWORD *v106; // rax
float v107; // xmm0_4
float v108; // xmm0_4
cocos2d::CCSprite *v109; // r12
unsigned __int64 *v110; // r15
cocos2d::CCNode *v111; // r15
double v112; // xmm0_8
cocos2d::CCParticleSystemQuad *v113; // r13
__int64 v114; // rax
cocos2d::CCString *v115; // rax
const char *v116; // rax
cocos2d::CCLabelBMFont *v117; // rax
cocos2d::CCLabelBMFont *m_keysLabel; // r15
cocos2d::CCLabelBMFont *v119; // rdi
cocos2d::CCLabelBMFont *v120; // r15
_QWORD *v121; // rsi
float v122; // xmm0_4
float v123; // xmm0_4
double v124; // xmm0_8
CurrencySprite *v125; // r13
unsigned __int64 *v126; // r15
__int64 v127; // rax
__int64 v128; // xmm0_8
cocos2d::CCNode *v129; // r15
cocos2d::CCString *v130; // rax
const char *v131; // rax
cocos2d::CCLabelBMFont *v132; // rax
cocos2d::CCLabelBMFont *m_shardsLabel; // r15
cocos2d::CCLabelBMFont *v134; // rdi
cocos2d::CCLabelBMFont *v135; // r15
_QWORD *v136; // rsi
float v137; // xmm0_4
float v138; // xmm0_4
double v139; // xmm0_8
CurrencySprite *v140; // r13
unsigned __int64 *v141; // r15
__int64 v142; // rax
__int64 v143; // xmm0_8
cocos2d::CCNode *v144; // r15
double *v145; // rsi
double v146; // xmm0_8
cocos2d::CCNode *v147; // r12
unsigned __int64 *v148; // r13
float v149; // xmm1_4
cocos2d::CCMoveTo *v150; // rax
int v151; // ebx
cocos2d::CCEaseInOut *v152; // rax
cocos2d::CCArray *v153; // rax
int v154; // r14d
int v155; // r15d
float v156; // xmm2_4
float v157; // xmm0_4
CurrencySpriteType v158; // ebx
CurrencyRewardLayer *v159; // r14
int v160; // xmm0_4
float v162[2]; // [rsp+0h] [rbp-E0h] BYREF
CurrencySpriteType v163; // [rsp+8h] [rbp-D8h]
int v164; // [rsp+Ch] [rbp-D4h]
int v165; // [rsp+10h] [rbp-D0h]
float v166; // [rsp+14h] [rbp-CCh]
int v167; // [rsp+18h] [rbp-C8h]
int v168; // [rsp+1Ch] [rbp-C4h]
__int64 v169; // [rsp+20h] [rbp-C0h]
unsigned __int64 v170; // [rsp+28h] [rbp-B8h] BYREF
_BYTE v171[3]; // [rsp+30h] [rbp-B0h] BYREF
char v172; // [rsp+33h] [rbp-ADh]
void *v173; // [rsp+40h] [rbp-A0h]
_BYTE v174[3]; // [rsp+48h] [rbp-98h] BYREF
char v175; // [rsp+4Bh] [rbp-95h]
void *__p; // [rsp+58h] [rbp-88h]
CurrencyRewardLayer *v177; // [rsp+60h] [rbp-80h]
unsigned __int64 v178; // [rsp+6Ch] [rbp-74h] BYREF
unsigned __int64 v179; // [rsp+74h] [rbp-6Ch] BYREF
int v180; // [rsp+7Ch] [rbp-64h]
bool v181; // [rsp+83h] [rbp-5Dh]
float v182; // [rsp+84h] [rbp-5Ch]
CurrencySpriteType v183; // [rsp+88h] [rbp-58h]
int v184; // [rsp+8Ch] [rbp-54h]
unsigned __int64 v185; // [rsp+90h] [rbp-50h] BYREF
cocos2d::CCPoint v186; // [rsp+98h] [rbp-48h] BYREF
_OWORD v187[4]; // [rsp+A0h] [rbp-40h] BYREF
CurrencyRewardType v188; // [rsp+110h] [rbp+30h]
double v189; // 0:xmm0_8.8
cocos2d::CCPoint v190; // 0:xmm0_8.8
v182 = a12;
*(float *)&v177 = a10.x;
v13 = (unsigned int)a6;
v184 = a5;
v181 = cocos2d::CCLayer::init(a1);
if ( v181 )
{
v17 = a9;
v18 = a9;
if ( (_DWORD)v13 == a8 && (_DWORD)v13 != 0 )
v18 = 0;
v168 = v18;
a1->m_rewardType = v188;
v183 = a8;
v180 = a4;
v19 = a8;
if ( (_DWORD)v13 == a8 && (_DWORD)v13 != 0 )
v19 = Icon;
a1->m_time = v182;
if ( (_DWORD)v13 != a8 || (_DWORD)v13 == 0 )
v17 = 0;
v167 = a7 + v17;
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v189 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v162);
v20 = cocos2d::CCTextureCache::sharedTextureCache();
v21 = cocos2d::CCTextureCache::addImage(v20, "GJ_GameSheet03.png", 0);
v169 = v13;
v22 = v21;
v23 = cocos2d::CCSpriteBatchNode::createWithTexture(v21, 0x1Du);
a1->m_orbBatchNode = v23;
((void (__fastcall *)(cocos2d::CCSpriteBatchNode *, __int64, double, double, double))v23->setBlendFunc)(
v23,
0x100000302LL,
v189,
*(double *)&a12,
*(double *)&a13);
((void (__fastcall *)(CurrencyRewardLayer *, cocos2d::CCSpriteBatchNode *, __int64))a1->addChild_0)(
a1,
a1->m_orbBatchNode,
1);
v24 = cocos2d::CCSpriteBatchNode::createWithTexture(v22, 0x1Du);
a1->m_currencyBatchNode = v24;
((void (__fastcall *)(CurrencyRewardLayer *, cocos2d::CCSpriteBatchNode *, __int64))a1->addChild_0)(a1, v24, 2);
v25 = cocos2d::CCNode::create();
a1->m_mainNode = v25;
((void (__fastcall *)(cocos2d::CCNode *, void *))v25->setContentSize)(v25, &unk_1009A3C78);
((void (__fastcall *)(CurrencyRewardLayer *, cocos2d::CCNode *, __int64))a1->addChild_0)(a1, a1->m_mainNode, 4);
sub_10028CBE0((float *)&v170, v162[0] + -40.0, (float)(v162[1] + -5.0) + *(float *)&v177);
v26 = (int)v169;
((void (__fastcall *)(cocos2d::CCNode *, unsigned __int64 *))a1->m_mainNode->setPosition)(a1->m_mainNode, &v170);
v27 = GameStatsManager::sharedState();
Stat = GameStatsManager::getStat(v27, "14");
v164 = a2;
a1->m_orbs = Stat - a2;
v29 = GameStatsManager::sharedState();
v30 = GameStatsManager::getStat(v29, "6");
v165 = a3;
a1->m_stars = v30 - a3;
v31 = GameStatsManager::sharedState();
v32 = GameStatsManager::getStat(v31, "28");
a1->m_moons = v32 - v180;
v33 = GameStatsManager::sharedState();
v34 = GameStatsManager::getStat(v33, "13");
a1->m_diamonds = v34 - v184;
switch ( v26 )
{
case 4:
v171[0] = 4;
v35 = 14385;
goto LABEL_21;
case 5:
v171[0] = 4;
v35 = 14641;
goto LABEL_21;
case 6:
v171[0] = 4;
v35 = 14129;
goto LABEL_21;
case 7:
v171[0] = 4;
v35 = 13873;
goto LABEL_21;
case 8:
v171[0] = 4;
v35 = 12338;
goto LABEL_21;
case 9:
v171[0] = 4;
v35 = 12594;
goto LABEL_21;
case 10:
v171[0] = 4;
v35 = 13106;
goto LABEL_21;
case 11:
v171[0] = 4;
v35 = 13362;
goto LABEL_21;
case 12:
v171[0] = 4;
v35 = 13618;
goto LABEL_21;
case 13:
v171[0] = 4;
v35 = 13874;
goto LABEL_21;
case 14:
v171[0] = 4;
v35 = 14130;
goto LABEL_21;
case 16:
v171[0] = 4;
v35 = 13108;
LABEL_21:
*(_WORD *)&v171[1] = v35;
v172 = 0;
v36 = GameStatsManager::sharedState();
if ( (v171[0] & 1) != 0 )
v37 = (const char *)v173;
else
v37 = &v171[1];
v38 = GameStatsManager::getStat(v36, v37);
a1->m_keys = v38 - v167;
v39 = v26;
v40 = (unsigned int)(v19 - 4);
goto LABEL_25;
default:
*(_WORD *)v171 = 0;
v39 = Icon;
v40 = (unsigned int)(v19 - 4);
if ( (unsigned int)v40 > 0xC )
{
LABEL_28:
*(_WORD *)v174 = 0;
v183 = Icon;
a1->m_rewardCount = 0;
if ( v164 <= 0 )
goto LABEL_46;
goto LABEL_45;
}
LABEL_25:
switch ( v40 )
{
case 0LL:
v174[0] = 4;
v41 = 14385;
break;
case 1LL:
v174[0] = 4;
v41 = 14641;
break;
case 2LL:
v174[0] = 4;
v41 = 14129;
break;
case 3LL:
v174[0] = 4;
v41 = 13873;
break;
case 4LL:
v174[0] = 4;
v41 = 12338;
break;
case 5LL:
v174[0] = 4;
v41 = 12594;
break;
case 6LL:
v174[0] = 4;
v41 = 13106;
break;
case 7LL:
v174[0] = 4;
v41 = 13362;
break;
case 8LL:
v174[0] = 4;
v41 = 13618;
break;
case 9LL:
v174[0] = 4;
v41 = 13874;
break;
case 10LL:
v174[0] = 4;
v41 = 14130;
break;
case 12LL:
v174[0] = 4;
v41 = 13108;
break;
default:
goto LABEL_28;
}
*(_WORD *)&v174[1] = v41;
v175 = 0;
v42 = GameStatsManager::sharedState();
if ( (v174[0] & 1) != 0 )
v43 = (const char *)__p;
else
v43 = &v174[1];
v44 = GameStatsManager::getStat(v42, v43);
a1->m_shards = v44 - v168;
a1->m_rewardCount = 0;
if ( v164 > 0 )
{
LABEL_45:
v45 = (cocos2d::CCString *)sub_1007AB580("%i", SLOBYTE(v162[0]));
CString = cocos2d::CCString::getCString(v45);
v47 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
a1->m_orbsLabel = v47;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v47,
10);
m_orbsLabel = a1->m_orbsLabel;
sub_10028CBE0((float *)v187, 1.0, 1.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))m_orbsLabel->setAnchorPoint)(m_orbsLabel, v187);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_orbsLabel->setScale)(a1->m_orbsLabel, 0.60000002);
v49 = a1->m_orbsLabel;
BYTE2(v187[0]) = -1;
LOWORD(v187[0]) = -106;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v49->setColor)(v49, v187);
v50 = a1->m_orbsLabel;
sub_10028CBE0((float *)v187, 0.0, (float)(-30 * a1->m_rewardCount));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v50->setPosition)(v50, v187);
v51 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_orbsLabel->getContentSize)(a1->m_orbsLabel);
sub_10028CFC0(&v186, v51);
v52 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_orbsLabel->getScale)(a1->m_orbsLabel);
v186.x = v52 * v186.x;
v53 = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_orbsLabel->getScale)(a1->m_orbsLabel);
v186.y = *(float *)&v53 * v186.y;
sub_10028CBE0((float *)&v185, v186.x * -0.5, v186.y * -0.5);
sub_10028CCE0((double *)v187, &v170, &v185);
v54 = sub_10028CC90(&a1->m_orbsPosition, (double *)v187);
++a1->m_rewardCount;
v55 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png");
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *, __int64, double))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v55,
3,
v54);
v56 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_orbsLabel->getPosition)(a1->m_orbsLabel);
sub_10028CBE0((float *)&v185, 15.0, (float)(v186.y * -0.5) + -0.5);
sub_10028CCE0((double *)v187, v56, &v185);
((void (__fastcall *)(cocos2d::CCSprite *, _OWORD *))v55->setPosition)(v55, v187);
m_mainNode = a1->m_mainNode;
((void (__fastcall *)(cocos2d::CCSprite *))v55->getPosition)(v55);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v187, (const cocos2d::CCPoint *)m_mainNode);
sub_10028CC90(&a1->m_orbsPosition, (double *)v187);
a1->m_orbsSprite = v55;
v58 = cocos2d::CCTintTo::create(0.30000001, 0, 0xFFu, 0xFFu);
v59 = cocos2d::CCTintTo::create(0.30000001, 0x96u, 0xFFu, 0xFFu);
v60 = sub_1003B5760(v58, v59, 0);
v61 = cocos2d::CCRepeatForever::create(v60);
cocos2d::CCNode::runAction(a1->m_orbsLabel, v61);
v62 = cocos2d::CCParticleSystemQuad::create("keyEffect.plist", 0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v62->setTotalParticles)(v62, 8);
v187[0] = xmmword_1008179B0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v62->setStartColor)(v62, v187);
v187[0] = _mm_loadh_ps((const double *)&qword_100819A30);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v62->setEndColor)(v62, v187);
v187[0] = 0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v62->setStartColorVar)(v62, v187);
v187[0] = 0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v62->setEndColorVar)(v62, v187);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v62->setLife)(v62, 1.0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v62->setLifeVar)(v62, 0.2);
sub_10028CBE0((float *)v187, 12.0, 10.0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v62->setPosVar)(v62, v187);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCParticleSystemQuad *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v62,
100);
v63 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v55->getPosition)(v55);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v62->setPosition)(v62, v63);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v62->setPositionType)(v62, 2);
cocos2d::CCParticleSystem::resetSystem(v62);
}
LABEL_46:
if ( v165 > 0 )
{
v64 = (cocos2d::CCString *)sub_1007AB580("%i", SLOBYTE(v162[0]));
v65 = cocos2d::CCString::getCString(v64);
v66 = cocos2d::CCLabelBMFont::create_3(v65, "bigFont.fnt");
a1->m_starsLabel = v66;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v66,
10);
m_starsLabel = a1->m_starsLabel;
sub_10028CBE0((float *)v187, 1.0, 1.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))m_starsLabel->setAnchorPoint)(m_starsLabel, v187);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_starsLabel->setScale)(
a1->m_starsLabel,
0.60000002);
v68 = a1->m_starsLabel;
BYTE2(v187[0]) = 0;
LOWORD(v187[0]) = -14081;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v68->setColor)(v68, v187);
v69 = a1->m_starsLabel;
sub_10028CBE0((float *)v187, 0.0, (float)(-30 * a1->m_rewardCount));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v69->setPosition)(v69, v187);
v70 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_starsLabel->getContentSize)(a1->m_starsLabel);
sub_10028CFC0(&v186, v70);
v71 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_starsLabel->getScale)(a1->m_starsLabel);
v186.x = v71 * v186.x;
v72 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_starsLabel->getScale)(a1->m_starsLabel);
v186.y = v72 * v186.y;
sub_10028CBE0((float *)&v178, 0.0, (float)(-30 * a1->m_rewardCount));
sub_10028CCE0((double *)&v185, &v170, &v178);
sub_10028CBE0((float *)&v179, v186.x * -0.5, v186.y * -0.5);
sub_10028CCE0((double *)v187, &v185, &v179);
sub_10028CC90(&a1->m_starsPosition, (double *)v187);
++a1->m_rewardCount;
v73 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigStar_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v73->setScale)(v73, 0.5);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v73,
3);
v74 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_starsLabel->getPosition)(a1->m_starsLabel);
sub_10028CBE0((float *)&v185, 15.0, (float)(v186.y * -0.5) + -0.5);
sub_10028CCE0((double *)v187, v74, &v185);
((void (__fastcall *)(cocos2d::CCSprite *, _OWORD *))v73->setPosition)(v73, v187);
v75 = a1->m_mainNode;
((void (__fastcall *)(cocos2d::CCSprite *))v73->getPosition)(v73);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v187, (const cocos2d::CCPoint *)v75);
sub_10028CC90(&a1->m_starsPosition, (double *)v187);
a1->m_starsSprite = v73;
v76 = cocos2d::CCTintTo::create(0.30000001, 0xFFu, 0xFFu, 0);
v77 = cocos2d::CCTintTo::create(0.30000001, 0xFFu, 0xC8u, 0);
v78 = sub_1003B5760(v76, v77, 0);
v79 = cocos2d::CCRepeatForever::create(v78);
cocos2d::CCNode::runAction(a1->m_starsLabel, v79);
v80 = cocos2d::CCParticleSystemQuad::create("keyEffect.plist", 0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v80->setTotalParticles)(v80, 8);
v187[0] = xmmword_100816920;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v80->setStartColor)(v80, v187);
v187[0] = _mm_unpacklo_pd((__m128d)0x3F48C8C9u, (__m128d)xmmword_1008150D0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v80->setEndColor)(v80, v187);
v187[0] = 0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v80->setStartColorVar)(v80, v187);
v187[0] = 0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v80->setEndColorVar)(v80, v187);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v80->setLife)(v80, 1.0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v80->setLifeVar)(v80, 0.2);
sub_10028CBE0((float *)v187, 12.0, 10.0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v80->setPosVar)(v80, v187);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCParticleSystemQuad *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v80,
100);
v81 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v73->getPosition)(v73);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v80->setPosition)(v80, v81);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v80->setPositionType)(v80, 2);
cocos2d::CCParticleSystem::resetSystem(v80);
}
if ( v180 > 0 )
{
v82 = (cocos2d::CCString *)sub_1007AB580("%i", SLOBYTE(v162[0]));
v83 = cocos2d::CCString::getCString(v82);
v84 = cocos2d::CCLabelBMFont::create_3(v83, "bigFont.fnt");
a1->m_moonsLabel = v84;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v84,
10);
m_moonsLabel = a1->m_moonsLabel;
sub_10028CBE0((float *)v187, 1.0, 1.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))m_moonsLabel->setAnchorPoint)(m_moonsLabel, v187);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_moonsLabel->setScale)(
a1->m_moonsLabel,
0.60000002);
v86 = a1->m_moonsLabel;
BYTE2(v187[0]) = -1;
LOWORD(v187[0]) = -256;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v86->setColor)(v86, v187);
v87 = a1->m_moonsLabel;
sub_10028CBE0((float *)v187, 0.0, (float)(-30 * a1->m_rewardCount));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v87->setPosition)(v87, v187);
v88 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_moonsLabel->getContentSize)(a1->m_moonsLabel);
sub_10028CFC0(&v186, v88);
v89 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_moonsLabel->getScale)(a1->m_moonsLabel);
v186.x = v89 * v186.x;
v90 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_moonsLabel->getScale)(a1->m_moonsLabel);
v186.y = v90 * v186.y;
sub_10028CBE0((float *)&v178, 0.0, (float)(-30 * a1->m_rewardCount));
sub_10028CCE0((double *)&v185, &v170, &v178);
sub_10028CBE0((float *)&v179, v186.x * -0.5, v186.y * -0.5);
sub_10028CCE0((double *)v187, &v185, &v179);
sub_10028CC90(&a1->m_moonsPosition, (double *)v187);
++a1->m_rewardCount;
v91 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigMoon_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v91->setScale)(v91, 0.5);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v91,
3);
v92 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_moonsLabel->getPosition)(a1->m_moonsLabel);
sub_10028CBE0((float *)&v185, 15.0, (float)(v186.y * -0.5) + -0.5);
sub_10028CCE0((double *)v187, v92, &v185);
((void (__fastcall *)(cocos2d::CCSprite *, _OWORD *))v91->setPosition)(v91, v187);
v93 = a1->m_mainNode;
((void (__fastcall *)(cocos2d::CCSprite *))v91->getPosition)(v91);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v187, (const cocos2d::CCPoint *)v93);
sub_10028CC90(&a1->m_moonsPosition, (double *)v187);
a1->m_moonsSprite = v91;
v94 = cocos2d::CCTintTo::create(0.30000001, 0, 0xFFu, 0xFFu);
v95 = cocos2d::CCTintTo::create(0.30000001, 0, 0xC8u, 0xFFu);
v96 = sub_1003B5760(v94, v95, 0);
v97 = cocos2d::CCRepeatForever::create(v96);
cocos2d::CCNode::runAction(a1->m_moonsLabel, v97);
v98 = cocos2d::CCParticleSystemQuad::create("keyEffect.plist", 0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v98->setTotalParticles)(v98, 8);
v187[0] = xmmword_100815DF0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v98->setStartColor)(v98, v187);
v187[0] = _mm_loadh_ps((const double *)&qword_100823730);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v98->setEndColor)(v98, v187);
v187[0] = 0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v98->setStartColorVar)(v98, v187);
v187[0] = 0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v98->setEndColorVar)(v98, v187);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v98->setLife)(v98, 1.0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v98->setLifeVar)(v98, 0.2);
sub_10028CBE0((float *)v187, 12.0, 10.0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v98->setPosVar)(v98, v187);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCParticleSystemQuad *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v98,
100);
v99 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v91->getPosition)(v91);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v98->setPosition)(v98, v99);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v98->setPositionType)(v98, 2);
cocos2d::CCParticleSystem::resetSystem(v98);
}
if ( v184 > 0 )
{
v100 = (cocos2d::CCString *)sub_1007AB580("%i", SLOBYTE(v162[0]));
v101 = cocos2d::CCString::getCString(v100);
v102 = cocos2d::CCLabelBMFont::create_3(v101, "bigFont.fnt");
a1->m_diamondsLabel = v102;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v102,
10);
m_diamondsLabel = a1->m_diamondsLabel;
sub_10028CBE0((float *)v187, 1.0, 1.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))m_diamondsLabel->setAnchorPoint)(
m_diamondsLabel,
v187);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_diamondsLabel->setScale)(
a1->m_diamondsLabel,
0.60000002);
v104 = a1->m_diamondsLabel;
BYTE2(v187[0]) = -1;
LOWORD(v187[0]) = -1;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v104->setColor)(v104, v187);
v105 = a1->m_diamondsLabel;
sub_10028CBE0((float *)v187, 0.0, (float)(-30 * a1->m_rewardCount));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v105->setPosition)(v105, v187);
v106 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_diamondsLabel->getContentSize)(a1->m_diamondsLabel);
sub_10028CFC0(&v186, v106);
v107 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_diamondsLabel->getScale)(a1->m_diamondsLabel);
v186.x = v107 * v186.x;
v108 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_diamondsLabel->getScale)(a1->m_diamondsLabel);
v186.y = v108 * v186.y;
sub_10028CBE0((float *)&v178, 0.0, (float)(-30 * a1->m_rewardCount));
sub_10028CCE0((double *)&v185, &v170, &v178);
sub_10028CBE0((float *)&v179, v186.x * -0.5, v186.y * -0.5);
sub_10028CCE0((double *)v187, &v185, &v179);
sub_10028CC90(&a1->m_diamondsPosition, (double *)v187);
++a1->m_rewardCount;
v109 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigDiamond_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v109->setScale)(v109, 0.5);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v109,
3);
v110 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_diamondsLabel->getPosition)(a1->m_diamondsLabel);
sub_10028CBE0((float *)&v185, 15.0, (float)(v186.y * -0.5) + -0.5);
sub_10028CCE0((double *)v187, v110, &v185);
((void (__fastcall *)(cocos2d::CCSprite *, _OWORD *))v109->setPosition)(v109, v187);
v111 = a1->m_mainNode;
((void (__fastcall *)(cocos2d::CCSprite *))v109->getPosition)(v109);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v187, (const cocos2d::CCPoint *)v111);
v112 = sub_10028CC90(&a1->m_diamondsPosition, (double *)v187);
a1->m_diamondsSprite = v109;
v113 = cocos2d::CCParticleSystemQuad::create("keyEffect.plist", 0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64, double))v113->setTotalParticles)(
v113,
8,
v112);
v187[0] = xmmword_100815C00;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v113->setStartColor)(v113, v187);
v187[0] = xmmword_100817930;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v113->setEndColor)(v113, v187);
v187[0] = 0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v113->setStartColorVar)(v113, v187);
v187[0] = 0;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v113->setEndColorVar)(v113, v187);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v113->setLife)(v113, 1.0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float))v113->setLifeVar)(v113, 0.2);
sub_10028CBE0((float *)v187, 12.0, 10.0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _OWORD *))v113->setPosVar)(v113, v187);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCParticleSystemQuad *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v113,
100);
v114 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v109->getPosition)(v109);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v113->setPosition)(v113, v114);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v113->setPositionType)(v113, 2);
cocos2d::CCParticleSystem::resetSystem(v113);
}
if ( v39 )
{
v115 = (cocos2d::CCString *)sub_1007AB580("%i", SLOBYTE(v162[0]));
v116 = cocos2d::CCString::getCString(v115);
v117 = cocos2d::CCLabelBMFont::create_3(v116, "bigFont.fnt");
a1->m_keysLabel = v117;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v117,
10);
m_keysLabel = a1->m_keysLabel;
sub_10028CBE0((float *)v187, 1.0, 1.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))m_keysLabel->setAnchorPoint)(m_keysLabel, v187);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_keysLabel->setScale)(a1->m_keysLabel, 0.60000002);
v119 = a1->m_keysLabel;
BYTE2(v187[0]) = -1;
LOWORD(v187[0]) = -1;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v119->setColor)(v119, v187);
v120 = a1->m_keysLabel;
sub_10028CBE0((float *)v187, 0.0, (float)(-30 * a1->m_rewardCount));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v120->setPosition)(v120, v187);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_keysLabel->setTag)(
a1->m_keysLabel,
(unsigned int)v39);
v121 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_keysLabel->getContentSize)(a1->m_keysLabel);
sub_10028CFC0(v187, v121);
v122 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_keysLabel->getScale)(a1->m_keysLabel);
*(float *)v187 = v122 * *(float *)v187;
v123 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_keysLabel->getScale)(a1->m_keysLabel);
*((float *)v187 + 1) = v123 * *((float *)v187 + 1);
sub_10028CBE0((float *)&v178, 0.0, (float)(-30 * a1->m_rewardCount));
sub_10028CCE0((double *)&v185, &v170, &v178);
sub_10028CBE0((float *)&v179, *(float *)v187 * -0.5, *((float *)v187 + 1) * -0.5);
sub_10028CCE0((double *)&v186, &v185, &v179);
v124 = sub_10028CC90(&a1->m_keysPosition, (double *)&v186);
++a1->m_rewardCount;
v125 = CurrencySprite::create(v39, 1);
((void (__fastcall *)(cocos2d::CCNode *, CurrencySprite *, __int64, double))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v125,
3,
v124);
v126 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_keysLabel->getPosition)(a1->m_keysLabel);
sub_10028CBE0((float *)&v185, 15.0, (float)(*((float *)v187 + 1) * -0.5) + -0.5);
sub_10028CCE0((double *)&v186, v126, &v185);
((void (__fastcall *)(CurrencySprite *, cocos2d::CCPoint *))v125->setPosition)(v125, &v186);
v127 = 0;
if ( v39 == DemonKey )
{
v128 = 1059481190;
}
else
{
LOBYTE(v127) = v39 == 16;
v128 = *((unsigned int *)&unk_100823738 + v127);
}
((void (__fastcall *)(CurrencySprite *, double))v125->setScale)(v125, *(double *)&v128);
a1->m_keysSprite = v125;
v129 = a1->m_mainNode;
((void (__fastcall *)(CurrencySprite *))v125->getPosition)(v125);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v186, (const cocos2d::CCPoint *)v129);
sub_10028CC90(&a1->m_keysPosition, (double *)&v186);
}
if ( v183 )
{
v130 = (cocos2d::CCString *)sub_1007AB580("%i", SLOBYTE(v162[0]));
v131 = cocos2d::CCString::getCString(v130);
v132 = cocos2d::CCLabelBMFont::create_3(v131, "bigFont.fnt");
a1->m_shardsLabel = v132;
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v132,
10);
m_shardsLabel = a1->m_shardsLabel;
sub_10028CBE0((float *)v187, 1.0, 1.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))m_shardsLabel->setAnchorPoint)(m_shardsLabel, v187);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_shardsLabel->setScale)(
a1->m_shardsLabel,
0.60000002);
v134 = a1->m_shardsLabel;
BYTE2(v187[0]) = -1;
LOWORD(v187[0]) = -1;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v134->setColor)(v134, v187);
v135 = a1->m_shardsLabel;
sub_10028CBE0((float *)v187, 0.0, (float)(-30 * a1->m_rewardCount));
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _OWORD *))v135->setPosition)(v135, v187);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_shardsLabel->setTag)(
a1->m_shardsLabel,
(unsigned int)v183);
v136 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_shardsLabel->getContentSize)(a1->m_shardsLabel);
sub_10028CFC0(v187, v136);
v137 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_shardsLabel->getScale)(a1->m_shardsLabel);
*(float *)v187 = v137 * *(float *)v187;
v138 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_shardsLabel->getScale)(a1->m_shardsLabel);
*((float *)v187 + 1) = v138 * *((float *)v187 + 1);
sub_10028CBE0((float *)&v178, 0.0, (float)(-30 * a1->m_rewardCount));
sub_10028CCE0((double *)&v185, &v170, &v178);
sub_10028CBE0((float *)&v179, *(float *)v187 * -0.5, *((float *)v187 + 1) * -0.5);
sub_10028CCE0((double *)&v186, &v185, &v179);
v139 = sub_10028CC90(&a1->m_shardsPosition, (double *)&v186);
++a1->m_rewardCount;
v140 = CurrencySprite::create(v183, 1);
((void (__fastcall *)(cocos2d::CCNode *, CurrencySprite *, __int64, double))a1->m_mainNode->addChild_0)(
a1->m_mainNode,
v140,
3,
v139);
v141 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_shardsLabel->getPosition)(a1->m_shardsLabel);
sub_10028CBE0((float *)&v185, 15.0, (float)(*((float *)v187 + 1) * -0.5) + -0.5);
sub_10028CCE0((double *)&v186, v141, &v185);
((void (__fastcall *)(CurrencySprite *, cocos2d::CCPoint *))v140->setPosition)(v140, &v186);
v142 = 0;
if ( v183 == DemonKey )
{
v143 = 1059481190;
}
else
{
LOBYTE(v142) = v183 == 16;
v143 = *((unsigned int *)&unk_100823738 + v142);
}
((void (__fastcall *)(CurrencySprite *, double))v140->setScale)(v140, *(double *)&v143);
a1->m_shardsSprite = v140;
v144 = a1->m_mainNode;
((void (__fastcall *)(CurrencySprite *))v140->getPosition)(v140);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v186, (const cocos2d::CCPoint *)v144);
sub_10028CC90(&a1->m_shardsPosition, (double *)&v186);
}
v145 = (double *)((__int64 (__fastcall *)(cocos2d::CCNode *))a1->m_mainNode->getPosition)(a1->m_mainNode);
v146 = sub_10028CC60(&v186, v145);
v147 = a1->m_mainNode;
v148 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCNode *, double))v147->getPosition)(v147, v146);
v163 = v39;
v149 = (float)(30 * a1->m_rewardCount + 10);
sub_10028CBE0((float *)&v185, 0.0, v149);
sub_10028CCE0((double *)v187, v148, &v185);
((void (__fastcall *)(cocos2d::CCNode *, _OWORD *))v147->setPosition)(v147, v187);
v150 = cocos2d::CCMoveTo::create(0.5 * v182, &v186);
v151 = v164;
v152 = cocos2d::CCEaseInOut::create(v150, 2.0);
cocos2d::CCNode::runAction(a1->m_mainNode, v152);
v153 = (cocos2d::CCArray *)sub_10071F9E0();
a1->m_objects = v153;
cocos2d::CCObject::retain(v153);
v177 = a1;
sub_10028CC60(&v185, a11);
v154 = v165;
sub_10028CC60(v187, (double *)&v185);
CurrencyRewardLayer::createObjectsFull(v177, Orb, v151, nullptr, 0, v149);
sub_10028CC60(&v185, a11);
v166 = 0.2 * v182;
*(float *)&v169 = 0.2 * v182;
if ( v151 <= 0 )
LODWORD(v169) = 0;
sub_10028CC60(v187, (double *)&v185);
CurrencyRewardLayer::createObjectsFull(v177, Star, v154, nullptr, (cocos2d::CCPoint)(unsigned int)v169, v149);
sub_10028CC60(&v185, a11);
sub_10028CC60(v187, (double *)&v185);
CurrencyRewardLayer::createObjectsFull(v177, Moon, v180, nullptr, (cocos2d::CCPoint)(unsigned int)v169, v149);
sub_10028CC60(&v185, a11);
LOBYTE(v180) = v180 > 0;
sub_10028CC60(v187, (double *)&v185);
v155 = (v151 > 0) + (v154 > 0) + (unsigned __int8)v180;
v190.y = 0.0;
v190.x = (float)v155 * v166;
CurrencyRewardLayer::createObjectsFull(v177, Star|Orb, v184, nullptr, v190, v149);
v156 = (float)((float)(v166 * (float)((v184 > 0) + v155)) + 0.1) * v182;
v157 = v156 + 0.2;
*(float *)&v184 = v156 + 0.2;
v158 = v163;
if ( v163 != 16 )
v157 = v156;
v182 = *(float *)&v184;
v159 = v177;
if ( v163 == DemonKey )
{
v160 = v184;
if ( v183 == 16 )
goto LABEL_73;
}
else
{
v182 = v157;
v160 = v184;
if ( v183 == 16 )
goto LABEL_73;
}
*(float *)&v160 = v156;
if ( v183 == DemonKey )
{
if ( v163 == Icon )
goto LABEL_75;
goto LABEL_74;
}
LABEL_73:
v184 = v160;
if ( v163 == Icon )
goto LABEL_75;
LABEL_74:
sub_10028CC60(&v185, a11);
sub_10028CC60(v187, (double *)&v185);
CurrencyRewardLayer::createObjectsFull(v159, v158, v167, nullptr, (cocos2d::CCPoint)LODWORD(v182), v156);
LABEL_75:
if ( v183 )
{
sub_10028CC60(&v185, a11);
sub_10028CC60(v187, (double *)&v185);
CurrencyRewardLayer::createObjectsFull(v159, v183, v168, nullptr, (cocos2d::CCPoint)(unsigned int)v184, v156);
}
v159->m_objectsAdded = 1;
cocos2d::CCNode::scheduleUpdate(v159);
if ( (v174[0] & 1) != 0 )
operator delete(__p);
if ( (v171[0] & 1) != 0 )
operator delete(v173);
break;
}
}
return v181;
}