//
// RewardUnlockLayer::playRewardEffect from 0xa87b94 to 0xa88d30 (4508 bytes)
//
// 3 xrefs:
// > RewardUnlockLayer::showCollectReward @ 0xa88e48
// > RewardUnlockLayer::step3 @ 0xa88f8c
// > ??> @ 0xf1528
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:00:36 +0000
//
__int64 __fastcall RewardUnlockLayer::playRewardEffect(RewardUnlockLayer *this)
{
FMODAudioEngine *v2; // x0
__int64 v3; // x0
cocos2d::CCArray *v4; // x19
_BOOL4 v5; // w23
unsigned int v6; // w22
int v7; // w28
unsigned int v8; // w21
GJRewardObject *v9; // x20
unsigned int v10; // w24
FMODAudioEngine *v11; // x0
unsigned int v12; // w22
FMODAudioEngine *v13; // x0
FMODAudioEngine *v14; // x0
__int64 v15; // x26
__int64 v16; // x26
unsigned int v17; // w20
const cocos2d::CCPoint *v18; // x0
__int64 v19; // x22
_DWORD *v20; // x0
cocos2d::CCDirector *v21; // x0
unsigned __int64 v22; // x0
_BOOL4 v23; // w22
_BOOL4 v24; // w24
cocos2d::CCArray *v25; // x21
unsigned int v26; // w20
cocos2d::CCObject *v27; // x1
cocos2d::CCObject *v28; // x19
cocos2d::CCObject *v29; // x19
cocos2d::CCObject *v30; // x19
int v31; // w20
__n128 v32; // q0
signed int v33; // w26
unsigned int v34; // w24
float v35; // s11
int v36; // w28
CurrencySprite *v37; // x21
const cocos2d::CCPoint *v38; // x0
cocos2d::CCObject *v39; // x23
unsigned int v40; // w1
RewardUnlockLayer *v41; // x0
cocos2d::CCDelayTime *v42; // x0
cocos2d::CCSequence *v43; // x19
cocos2d::CCFiniteTimeAction *v44; // x0
cocos2d::CCAction *v45; // x0
cocos2d::CCObject *v47; // x19
__int64 v48; // x0
float v49; // s0
const cocos2d::CCPoint *v50; // x0
cocos2d::CCArray *v51; // x0
int v52; // w23
float v53; // s8
const cocos2d::CCPoint *v54; // x1
cocos2d::CCArray *v55; // x21
int v56; // w20
int v57; // w0
const cocos2d::CCPoint *v58; // x1
cocos2d::CCObject *v59; // x0
cocos2d::CCDelayTime *v60; // x0
cocos2d::CCObject *v61; // x0
cocos2d::CCObject *v62; // x0
cocos2d::CCArray *v63; // x1
cocos2d::CCAction *v64; // x0
float v65; // s10
int v66; // w0
long double v67; // q0
cocos2d::CCLightning *v68; // x19
void (__fastcall *v69)(cocos2d::CCLightning *, __int64 *); // x3
__int64 v70; // x26
FMODAudioEngine *v71; // x0
__int64 v72; // x26
const cocos2d::CCPoint *v73; // x0
__int64 v74; // x26
FMODAudioEngine *v75; // x0
__int64 v76; // x26
__int64 v77; // x26
FMODAudioEngine *v78; // x0
__int64 v79; // x26
__int64 v80; // x20
__int64 v81; // x20
__int64 v82; // x26
FMODAudioEngine *v83; // x0
__int64 v84; // x26
MusicDownloadManager *v85; // x20
MusicDownloadManager *v86; // x0
int v87; // w0
unsigned int v88; // [xsp+D8h] [xbp+98h]
unsigned int v89; // [xsp+DCh] [xbp+9Ch]
cocos2d::CCNode *v90; // [xsp+F0h] [xbp+B0h]
unsigned int v91; // [xsp+110h] [xbp+D0h]
cocos2d::CCArray *v92; // [xsp+110h] [xbp+D0h]
unsigned int v93; // [xsp+118h] [xbp+D8h]
unsigned int v94; // [xsp+120h] [xbp+E0h]
int v95; // [xsp+124h] [xbp+E4h]
unsigned int v96; // [xsp+128h] [xbp+E8h]
int RewardCount; // [xsp+12Ch] [xbp+ECh]
int v98; // [xsp+130h] [xbp+F0h]
float v99; // [xsp+130h] [xbp+F0h]
__int64 v100; // [xsp+140h] [xbp+100h]
__int64 v101; // [xsp+148h] [xbp+108h]
__int64 v102; // [xsp+150h] [xbp+110h] BYREF
_BYTE v103[8]; // [xsp+158h] [xbp+118h] BYREF
_BYTE v104[8]; // [xsp+160h] [xbp+120h] BYREF
_BYTE v105[8]; // [xsp+168h] [xbp+128h] BYREF
_BYTE v106[8]; // [xsp+170h] [xbp+130h] BYREF
_BYTE v107[8]; // [xsp+178h] [xbp+138h] BYREF
_BYTE v108[8]; // [xsp+180h] [xbp+140h] BYREF
float v109; // [xsp+188h] [xbp+148h] BYREF
float v110; // [xsp+18Ch] [xbp+14Ch]
_BYTE v111[8]; // [xsp+190h] [xbp+150h] BYREF
_BYTE v112[8]; // [xsp+198h] [xbp+158h] BYREF
_BYTE v113[8]; // [xsp+1A0h] [xbp+160h] BYREF
__int64 v114; // [xsp+1A8h] [xbp+168h] BYREF
_BYTE v115[8]; // [xsp+1B0h] [xbp+170h] BYREF
__int64 v116; // [xsp+1B8h] [xbp+178h] BYREF
FMODAudioEngine *v117; // [xsp+1C0h] [xbp+180h] BYREF
__int64 v118; // [xsp+1C8h] [xbp+188h]
void *v119; // [xsp+1D0h] [xbp+190h]
v2 = (FMODAudioEngine *)*(unsigned int *)(*((_QWORD *)this + 88) + 64LL);
switch ( (_DWORD)v2 )
{
case 7:
v80 = FMODAudioEngine::sharedEngine(v2);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "chest07.ogg", 0xBu);
FMODAudioEngine::playEffect(v80, (char *)&v117);
break;
case 8:
v81 = FMODAudioEngine::sharedEngine(v2);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "chest08.ogg", 0xBu);
FMODAudioEngine::playEffect(v81, (char *)&v117);
break;
case 9:
v85 = (MusicDownloadManager *)FMODAudioEngine::sharedEngine(v2);
v86 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v85);
MusicDownloadManager::pathForSFX((__int64 *)&v117, v86, 0x24FEu);
v87 = rand();
FMODAudioEngine::playEffectAdvanced(
(__int64)v85,
(__int64)&v117,
0,
0,
120,
0,
0,
0,
(float)((float)((float)v87 * 4.6566e-10) * 0.2) + 0.9,
0.0,
0.7,
0.0,
0.0,
0,
0,
0,
0,
0,
0,
0);
break;
default:
goto LABEL_4;
}
if ( ((unsigned __int8)v117 & 1) != 0 )
operator delete(v119);
LABEL_4:
GJChestSprite::switchToState(*((unsigned int **)this + 86), 4u, 0);
v3 = *((_QWORD *)this + 88);
v4 = *(cocos2d::CCArray **)(v3 + 72);
RewardCount = GJRewardItem::getRewardCount(v3, 7);
v95 = GJRewardItem::getRewardCount(*((_QWORD *)this + 88), 8);
v5 = (int)GJRewardItem::getRewardCount(*((_QWORD *)this + 88), 9) > 0;
if ( v4 )
{
v6 = 0;
v7 = 0;
v8 = 0;
if ( !(unsigned int)cocos2d::CCArray::count(v4) )
{
LABEL_10:
v10 = v8;
v98 = 0;
v89 = 0;
v93 = 0;
goto LABEL_11;
}
while ( 1 )
{
v9 = (GJRewardObject *)cocos2d::CCArray::objectAtIndex(v4, v6);
if ( (unsigned __int8)GJRewardObject::isSpecialType(v9) )
{
if ( v8 )
{
v10 = v8;
v93 = *((_DWORD *)v9 + 14);
v89 = *((_DWORD *)v9 + 17);
v98 = v93;
goto LABEL_11;
}
v8 = *((_DWORD *)v9 + 14);
v7 = *((_DWORD *)v9 + 17);
}
if ( ++v6 >= (unsigned int)cocos2d::CCArray::count(v4) )
goto LABEL_10;
}
}
v98 = 0;
v10 = 0;
v89 = 0;
v7 = 0;
v93 = 0;
v8 = 0;
LABEL_11:
v96 = CurrencySprite::rewardToSpriteType((CurrencySprite *)v10);
v94 = CurrencySprite::rewardToSpriteType((CurrencySprite *)(unsigned int)v98);
v11 = (FMODAudioEngine *)*(unsigned int *)(*((_QWORD *)this + 88) + 64LL);
v12 = (_DWORD)v11 == 3;
if ( !v5 )
{
v13 = (FMODAudioEngine *)v94;
if ( v94 == 16 || (v13 = (FMODAudioEngine *)v96, v96 == 16) )
{
v70 = FMODAudioEngine::sharedEngine(v13);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "gold01.ogg", 0xAu);
FMODAudioEngine::playEffect(v70, (char *)&v117);
v71 = (FMODAudioEngine *)(unsigned __int8)v117;
if ( ((unsigned __int8)v117 & 1) != 0 )
operator delete(v119);
v72 = FMODAudioEngine::sharedEngine(v71);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "goldKey.ogg", 0xBu);
FMODAudioEngine::playEffect(v72, (char *)&v117);
}
else
{
v14 = (FMODAudioEngine *)v94;
if ( v94 == 9 || (v14 = (FMODAudioEngine *)v96, v96 == 9) )
{
v74 = FMODAudioEngine::sharedEngine(v14);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "gold01.ogg", 0xAu);
FMODAudioEngine::playEffect(v74, (char *)&v117);
v75 = (FMODAudioEngine *)(unsigned __int8)v117;
if ( ((unsigned __int8)v117 & 1) != 0 )
operator delete(v119);
v76 = FMODAudioEngine::sharedEngine(v75);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "secretKey.ogg", 0xDu);
FMODAudioEngine::playEffect(v76, (char *)&v117);
if ( ((unsigned __int8)v117 & 1) == 0 )
goto LABEL_84;
goto LABEL_88;
}
if ( v96 )
{
v82 = FMODAudioEngine::sharedEngine((FMODAudioEngine *)v96);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "magicExplosion.ogg", 0x12u);
FMODAudioEngine::playEffect(v82, (char *)&v117);
v83 = (FMODAudioEngine *)(unsigned __int8)v117;
if ( ((unsigned __int8)v117 & 1) != 0 )
operator delete(v119);
v84 = FMODAudioEngine::sharedEngine(v83);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "crystal01.ogg", 0xDu);
FMODAudioEngine::playEffect(v84, (char *)&v117);
}
else if ( v95 <= 0 )
{
if ( RewardCount <= 0 )
goto LABEL_84;
v77 = FMODAudioEngine::sharedEngine((FMODAudioEngine *)(unsigned int)RewardCount);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "gold01.ogg", 0xAu);
FMODAudioEngine::playEffect(v77, (char *)&v117);
v78 = (FMODAudioEngine *)(unsigned __int8)v117;
if ( ((unsigned __int8)v117 & 1) != 0 )
operator delete(v119);
v79 = FMODAudioEngine::sharedEngine(v78);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "magicExplosion.ogg", 0x12u);
FMODAudioEngine::playEffect(v79, (char *)&v117);
}
else
{
v15 = FMODAudioEngine::sharedEngine((FMODAudioEngine *)(unsigned int)v95);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "gold02.ogg", 0xAu);
FMODAudioEngine::playEffect(v15, (char *)&v117);
}
}
if ( ((unsigned __int8)v117 & 1) == 0 )
{
LABEL_84:
v73 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 86) + 192LL))(*((_QWORD *)this + 86));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, v73);
v19 = CurrencyRewardLayer::create(
RewardCount,
0,
0,
v95,
v96,
v7,
v94,
v89,
*((float *)this + 184),
1.0,
(const cocos2d::CCPoint *)&v116,
v12);
goto LABEL_26;
}
LABEL_88:
operator delete(v119);
goto LABEL_84;
}
v16 = FMODAudioEngine::sharedEngine(v11);
v117 = nullptr;
v118 = 0;
v119 = nullptr;
std::string::__init((__int64 *)&v117, "reward01.ogg", 0xCu);
FMODAudioEngine::playEffect(v16, (char *)&v117);
if ( ((unsigned __int8)v117 & 1) != 0 )
operator delete(v119);
v17 = 0;
v18 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 86) + 192LL))(*((_QWORD *)this + 86));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, v18);
v19 = CurrencyRewardLayer::create(
RewardCount,
0,
0,
v95,
v96,
v7,
v94,
v89,
*((float *)this + 184),
1.0,
(const cocos2d::CCPoint *)&v116,
v12);
v91 = v8;
if ( (unsigned int)cocos2d::CCArray::count(v4) )
{
do
{
v20 = (_DWORD *)cocos2d::CCArray::objectAtIndex(v4, v17);
if ( v20[14] == 9 )
{
LOWORD(v100) = -20561;
BYTE2(v100) = -81;
++v17;
v37 = (CurrencySprite *)GJItemIcon::create(v20[15], v20[16], v100, 0xFFFFFF, 0, 0, 1u);
v38 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 86) + 192LL))(*((_QWORD *)this + 86));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, v38);
CurrencyRewardLayer::createUnlockObject(v19, v37, (const cocos2d::CCPoint *)&v116, 0.4);
}
else
{
++v17;
}
}
while ( v17 < (unsigned int)cocos2d::CCArray::count(v4) );
}
v8 = v91;
LABEL_26:
(*(void (__fastcall **)(RewardUnlockLayer *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v19, 100);
*(_QWORD *)(v19 + 408) = (char *)this + 664;
v21 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((RewardUnlockLayer *)((char *)this + 664));
cocos2d::CCDirector::getWinSize(&v102, v21);
v22 = (unsigned int)v98;
v23 = (int)v10 > 0;
v24 = v98 > 0;
if ( v98 > 0 && v23 )
{
v22 = v93;
v24 = 1;
if ( v8 == v93 )
{
v22 = v89;
v24 = 0;
v7 += v89;
}
}
v25 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)v22);
v92 = (cocos2d::CCArray *)cocos2d::CCArray::create(v25);
if ( v5 )
{
v26 = 0;
while ( v26 < (unsigned int)cocos2d::CCArray::count(v4) )
{
v27 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v4, v26);
if ( *((_DWORD *)v27 + 14) == 9 )
{
cocos2d::CCArray::addObject(v92, v27);
v39 = (cocos2d::CCObject *)operator new(0x40u);
cocos2d::CCObject::CCObject(v39);
*((_DWORD *)v39 + 14) = 0;
++v26;
*(_QWORD *)v39 = &off_1428350;
cocos2d::CCObject::autorelease(v39);
cocos2d::CCArray::addObject(v25, v39);
}
else
{
++v26;
}
}
}
if ( RewardCount > 0 )
{
v28 = (cocos2d::CCObject *)operator new(0x40u);
cocos2d::CCObject::CCObject(v28);
*((_DWORD *)v28 + 14) = 1;
*(_QWORD *)v28 = &off_1428350;
cocos2d::CCObject::autorelease(v28);
cocos2d::CCArray::addObject(v25, v28);
}
if ( v95 > 0 )
{
v29 = (cocos2d::CCObject *)operator new(0x40u);
cocos2d::CCObject::CCObject(v29);
*((_DWORD *)v29 + 14) = 3;
*(_QWORD *)v29 = &off_1428350;
cocos2d::CCObject::autorelease(v29);
cocos2d::CCArray::addObject(v25, v29);
}
if ( v23 )
{
v47 = (cocos2d::CCObject *)operator new(0x40u);
cocos2d::CCObject::CCObject(v47);
*((_DWORD *)v47 + 14) = 9998;
*(_QWORD *)v47 = &off_1428350;
cocos2d::CCObject::autorelease(v47);
cocos2d::CCArray::addObject(v25, v47);
}
if ( v24 )
{
v30 = (cocos2d::CCObject *)operator new(0x40u);
cocos2d::CCObject::CCObject(v30);
*((_DWORD *)v30 + 14) = 9999;
*(_QWORD *)v30 = &off_1428350;
cocos2d::CCObject::autorelease(v30);
cocos2d::CCArray::addObject(v25, v30);
}
v31 = cocos2d::CCArray::count(v25);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v103);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v104);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v105);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v106);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v107);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v108);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v109,
*(float *)&v102 * 0.5,
(float)(*((float *)&v102 + 1) * 0.5) + 68.0);
switch ( v31 )
{
case 1:
cocos2d::CCPoint::operator=(v103, &v109);
goto LABEL_47;
case 2:
v109 = v109 - 45.0;
cocos2d::CCPoint::operator=(v103, &v109);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 90.0, 0.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v104, &v116);
goto LABEL_47;
case 3:
v109 = v109 - 75.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 0.0, -10.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v103, &v116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 75.0, 10.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v104, &v116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 150.0, -10.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v105, &v116);
goto LABEL_47;
}
v110 = v110 - 5.0;
v109 = v109 - 109.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 0.0, -15.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v103, &v116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 73.0, 15.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v104, &v116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 146.0, 15.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v105, &v116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 219.0, -15.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v106, &v116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 219.0, -70.0);
cocos2d::CCPoint::operator+(&v116, &v109);
cocos2d::CCPoint::operator=(v107, &v116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 0.0, -70.0);
cocos2d::CCPoint::operator+(&v116, &v109);
v32 = cocos2d::CCPoint::operator=(v108, &v116);
if ( v31 > 0 )
{
LABEL_47:
v33 = 0;
v88 = v7;
v34 = 0;
while ( 1 )
{
v36 = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(v25, v33) + 56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115);
switch ( v33 )
{
case 0:
v32 = cocos2d::CCPoint::operator=(v115, v103);
goto LABEL_49;
case 1:
v32 = cocos2d::CCPoint::operator=(v115, v104);
goto LABEL_49;
case 2:
v32 = cocos2d::CCPoint::operator=(v115, v105);
goto LABEL_49;
case 3:
v32 = cocos2d::CCPoint::operator=(v115, v106);
v32.n128_f32[0] = (float)v33;
v35 = (float)((float)v33 * 0.2) + 0.5;
if ( v36 == 1 )
goto LABEL_59;
goto LABEL_50;
case 4:
v32 = cocos2d::CCPoint::operator=(v115, v107);
goto LABEL_49;
default:
v32 = cocos2d::CCPoint::operator=(v115, v108);
LABEL_49:
v32.n128_f32[0] = (float)v33;
v35 = (float)((float)v33 * 0.2) + 0.5;
if ( v36 == 1 )
{
LABEL_59:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, (const cocos2d::CCPoint *)v115);
v40 = RewardCount;
v41 = this;
LABEL_60:
++v33;
RewardUnlockLayer::playLabelEffect((__int64)v41, v40, v36, nullptr, (__int64)&v116, v35);
if ( v31 <= v33 )
goto LABEL_61;
}
else
{
LABEL_50:
switch ( v36 )
{
case 3:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, (const cocos2d::CCPoint *)v115);
v41 = this;
v40 = v95;
goto LABEL_60;
case 9998:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, (const cocos2d::CCPoint *)v115);
RewardUnlockLayer::playLabelEffect((__int64)this, v88, v96, nullptr, (__int64)&v116, v35);
break;
case 9999:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, (const cocos2d::CCPoint *)v115);
RewardUnlockLayer::playLabelEffect((__int64)this, v89, v94, nullptr, (__int64)&v116, v35);
break;
case 0:
v48 = cocos2d::CCArray::objectAtIndex(v92, v34);
LOWORD(v101) = -20561;
BYTE2(v101) = -81;
v90 = (cocos2d::CCNode *)GJItemIcon::create(
*(_DWORD *)(v48 + 60),
*(_DWORD *)(v48 + 64),
v101,
0xFFFFFF,
0,
0,
1u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, (const cocos2d::CCPoint *)v115);
v49 = v35;
if ( v31 <= 1 )
v49 = 2.2;
++v34;
RewardUnlockLayer::playLabelEffect((__int64)this, 1u, 0, v90, (__int64)&v116, v49);
break;
}
if ( v31 <= ++v33 )
goto LABEL_61;
}
break;
}
}
}
LABEL_61:
v42 = (cocos2d::CCDelayTime *)*(unsigned int *)(*((_QWORD *)this + 88) + 64LL);
if ( (int)v42 > 5 )
{
v50 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD, long double))(**((_QWORD **)this + 73) + 192LL))(
*((_QWORD *)this + 73),
*(long double *)&v32);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v111, v50);
v51 = *((cocos2d::CCArray **)this + 88);
v52 = *((_DWORD *)v51 + 16);
v53 = (float)((float)v52 * 0.1) + 3.0;
v55 = (cocos2d::CCArray *)cocos2d::CCArray::create(v51);
if ( v52 > 0 )
{
v56 = 0;
do
{
++v56;
v99 = (float)((float)((float)((float)rand() * 4.6566e-10) * 2.0) + -1.0) * v53;
v57 = rand();
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v115,
v99,
(float)((float)((float)((float)v57 * 4.6566e-10) * 2.0) + -1.0) * v53);
cocos2d::CCPoint::operator+(&v116, v111);
v59 = (cocos2d::CCObject *)cocos2d::CCMoveTo::create((cocos2d::CCMoveTo *)&v116, 0.0, v58);
v60 = (cocos2d::CCDelayTime *)cocos2d::CCArray::addObject(v55, v59);
v61 = (cocos2d::CCObject *)cocos2d::CCDelayTime::create(v60, 0.03);
cocos2d::CCArray::addObject(v55, v61);
}
while ( v52 != v56 );
}
v62 = (cocos2d::CCObject *)cocos2d::CCMoveTo::create((cocos2d::CCMoveTo *)v111, 0.0, v54);
cocos2d::CCArray::addObject(v55, v62);
v64 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v55, v63);
cocos2d::CCNode::runAction(*((cocos2d::CCNode **)this + 73), v64);
v42 = (cocos2d::CCDelayTime *)*(unsigned int *)(*((_QWORD *)this + 88) + 64LL);
if ( (_DWORD)v42 == 8 )
{
v65 = *(float *)&v102;
v66 = rand();
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v112,
(float)((float)((float)((float)((float)v66 * 4.6566e-10) * 2.0) + -1.0) * 50.0) + (float)(v65 * 0.5),
*((float *)&v102 + 1) + 5.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v113, *(float *)&v102 * 0.5, *((float *)&v102 + 1) * 0.5);
cocos2d::CCPoint::operator-(&v114, v113, v112, v67);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, (const cocos2d::CCPoint *)&v114);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, (const cocos2d::CCPoint *)&unk_155D918);
v68 = cocos2d::CCLightning::lightningWithStrikePoint(
(const cocos2d::CCPoint *)v115,
(const cocos2d::CCPoint *)&v116,
0.5);
(*(void (__fastcall **)(cocos2d::CCLightning *, _BYTE *))(*(_QWORD *)v68 + 184LL))(v68, v112);
v69 = *(void (__fastcall **)(cocos2d::CCLightning *, __int64 *))(*(_QWORD *)v68 + 976LL);
LOBYTE(v116) = -1;
*(_WORD *)((char *)&v116 + 1) = -256;
v69(v68, &v116);
*((_BYTE *)v68 + 372) = 1;
*((_BYTE *)v68 + 373) = 1;
*((float *)v68 + 92) = 5.0;
v42 = (cocos2d::CCDelayTime *)(*(__int64 (__fastcall **)(_QWORD, cocos2d::CCLightning *, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v68,
3);
}
}
v43 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(v42, 1.5);
v44 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, RewardUnlockLayer::showCloseButton, 0);
v45 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v43, v44, 0);
cocos2d::CCNode::runAction(this, v45);
return _stack_chk_guard;
}