//
// CurrencyRewardLayer::createObjectsFull from 0x14013bc80 to 0x14013c9d8 (3416 bytes)
//
// 10 xrefs:
// > ChallengesPage::claimItem @ 0x14009f2c3
// > CurrencyRewardLayer::init @ 0x14013ba25
// > CurrencyRewardLayer::init @ 0x14013ba6c
// > CurrencyRewardLayer::init @ 0x14013bab0
// > CurrencyRewardLayer::init @ 0x14013bb1e
// > CurrencyRewardLayer::init @ 0x14013bbb3
// > CurrencyRewardLayer::init @ 0x14013bbf0
// > GJGarageLayer::dialogClosed @ 0x140381207
// > RewardUnlockLayer::playRewardEffect @ 0x1405652a0
// > ??> @ 0x14091727c
//
// This function is hookable on this platform (idp: pc, 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 11:27:07 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall CurrencyRewardLayer::createObjectsFull(
__int64 a1,
unsigned int a2,
int a3,
__int64 a4,
__int64 a5,
float a6)
{
__int64 v6; // rbx
__int64 v10; // rsi
float v11; // xmm8_4
float v12; // xmm10_4
__int64 v13; // rcx
cocos2d::CCDirector *v14; // rax
float v15; // xmm6_4
__int64 v16; // rcx
cocos2d::CCDirector *v17; // rax
float ScreenRight; // xmm0_4
__int64 v19; // rax
__int64 v20; // rcx
int v21; // eax
__int64 v22; // rdx
int v23; // r8d
int v24; // r9d
int v25; // r10d
int v26; // r11d
int v27; // edx
int v28; // ebx
__m128 v29; // xmm3
__m128 v30; // xmm3
__m128 v31; // xmm3
__m128 v32; // xmm3
__m128 v33; // xmm3
__m128 v34; // xmm3
int v35; // edi
float v36; // xmm7_4
int v37; // r14d
float v38; // xmm6_4
int v39; // eax
__int64 v40; // rax
void *v41; // rax
__int64 v42; // rax
__int64 v43; // rsi
__int64 v44; // rax
__int64 v45; // rdx
__int64 v46; // rcx
struct cocos2d::CCObject *v47; // rbx
cocos2d::CCObject *v48; // rax
float v49; // xmm6_4
__int64 v50; // rbx
int v51; // eax
__int64 v52; // rax
struct cocos2d::CCParticleSystemQuad *v53; // rdi
__int64 v54; // rbx
__int64 v55; // rbx
__int64 v56; // rbx
int v57; // r14d
__int64 v58; // rsi
cocos2d::CCArray *v59; // r14
struct cocos2d::CCObject *v60; // rdi
__int64 v61; // rbx
cocos2d::CCParticleSystem *v62; // rdi
__int64 v63; // rdx
char v64; // r12
int v65; // ecx
int v66; // eax
int v67; // ebx
int v68; // esi
__m128 v69; // xmm2
__m128 v70; // xmm2
__m128 v71; // xmm3
__m128 v72; // xmm3
__m128 v73; // xmm3
__int64 v74; // rbx
__int64 v75; // rbx
__int64 v76; // rbx
__int64 v77; // rdx
__int64 v78; // rcx
__int64 v79; // r8
cocos2d::CCObject *v80; // rbx
int v81; // [rsp+30h] [rbp-D0h]
__int16 v82; // [rsp+30h] [rbp-D0h]
bool v83; // [rsp+34h] [rbp-CCh]
_BYTE v84[8]; // [rsp+40h] [rbp-C0h] BYREF
int v85; // [rsp+48h] [rbp-B8h]
__m128 v86; // [rsp+50h] [rbp-B0h] BYREF
__int64 v87; // [rsp+60h] [rbp-A0h]
_BYTE v88[8]; // [rsp+68h] [rbp-98h] BYREF
__int64 v89; // [rsp+70h] [rbp-90h]
__int64 v90; // [rsp+78h] [rbp-88h]
cocos2d::CCArray *v91; // [rsp+80h] [rbp-80h]
_BYTE v92[8]; // [rsp+88h] [rbp-78h] BYREF
_BYTE v93[8]; // [rsp+90h] [rbp-70h] BYREF
void *v94; // [rsp+98h] [rbp-68h]
void *v95; // [rsp+A0h] [rbp-60h]
__m128 v96; // [rsp+A8h] [rbp-58h] BYREF
__m128 v97; // [rsp+B8h] [rbp-48h] BYREF
__m128i si128; // [rsp+C8h] [rbp-38h] BYREF
v6 = a4;
v87 = a4;
v10 = a5;
v89 = a5;
if ( a3 > 0 )
{
v83 = a3 == 1 || a2 - 1 > 2 && a2 != 15;
v91 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v11 = *(float *)(a1 + 568);
v12 = v11 * 0.30000001;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v84);
if ( v6 )
{
v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v13);
v15 = cocos2d::CCDirector::getScreenTop(v14) + 30.0;
v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v16);
ScreenRight = cocos2d::CCDirector::getScreenRight(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, ScreenRight + 30.0, v15);
cocos2d::CCPoint::operator=(v84, v19);
si128 = _mm_load_si128((const __m128i *)&xmmword_140836C20);
v96 = (__m128)_mm_load_si128((const __m128i *)&xmmword_140836AA0);
}
else if ( a2 == 1 )
{
v90 = *(_QWORD *)(a1 + 528);
if ( a3 >= 10 )
{
if ( a3 <= 400 )
{
if ( a3 <= 300 )
{
if ( a3 <= 200 )
{
if ( a3 <= 100 )
{
if ( a3 <= 50 )
{
if ( a3 > 30 )
v12 = 0.40000001;
}
else
{
v12 = 0.5;
}
}
else
{
v12 = 0.60000002;
}
}
else
{
v12 = 0.69999999;
}
}
else
{
v12 = 0.80000001;
}
}
else
{
v12 = 0.89999998;
}
}
else
{
v12 = 0.2;
v11 = 0.80000001;
}
si128 = _mm_load_si128((const __m128i *)&xmmword_140836BC0);
v96 = (__m128)_mm_load_si128((const __m128i *)&xmmword_140836B60);
cocos2d::CCPoint::operator=(v84, a1 + 572);
}
else
{
v90 = *(_QWORD *)(a1 + 520);
switch ( a2 )
{
case 2u:
cocos2d::CCPoint::operator=(v84, a1 + 580);
si128 = _mm_load_si128((const __m128i *)&xmmword_140836A20);
v96 = (__m128)_mm_load_si128((const __m128i *)&xmmword_1408369E0);
break;
case 0xFu:
cocos2d::CCPoint::operator=(v84, a1 + 588);
si128 = _mm_load_si128((const __m128i *)&xmmword_140836BF0);
v96 = (__m128)_mm_load_si128((const __m128i *)&xmmword_140836BD0);
break;
case 3u:
cocos2d::CCPoint::operator=(v84, a1 + 596);
si128 = _mm_load_si128((const __m128i *)&xmmword_140836C20);
v96 = (__m128)_mm_load_si128((const __m128i *)&xmmword_140836C00);
break;
default:
v20 = *(_QWORD *)(a1 + 464);
if ( !v20
|| (v21 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 56LL))(v20), v22 = a1 + 612, v21 != a2) )
{
v22 = a1 + 604;
}
cocos2d::CCPoint::operator=(v84, v22);
v23 = 255;
v24 = 255;
v25 = 255;
v26 = 255;
v27 = 255;
v28 = 255;
switch ( a2 )
{
case 4u:
v27 = 150;
goto LABEL_43;
case 5u:
v23 = 100;
v26 = 0;
v27 = 200;
break;
case 6u:
v23 = 200;
v26 = 0;
goto LABEL_43;
case 7u:
v24 = 0;
v27 = 0;
v26 = 150;
break;
case 8u:
v24 = 150;
goto LABEL_42;
case 9u:
v26 = 0;
v27 = 0;
goto LABEL_44;
case 0x10u:
v24 = 200;
v26 = 0;
LABEL_42:
v27 = 0;
LABEL_43:
v25 = 0;
LABEL_44:
v28 = 0;
break;
default:
break;
}
v96.m128_i32[3] = 1065353216;
v29 = v96;
v29.m128_f32[0] = (float)v23 / 255.0;
v30 = _mm_shuffle_ps(v29, v29, 225);
v30.m128_f32[0] = (float)v24 / 255.0;
v31 = _mm_shuffle_ps(v30, v30, 198);
v31.m128_f32[0] = (float)v25 / 255.0;
v96 = _mm_shuffle_ps(v31, v31, 201);
si128 = (__m128i)v96;
v96.m128_i32[3] = 1065353216;
v32 = v96;
v32.m128_f32[0] = (float)v26 / 255.0;
v33 = _mm_shuffle_ps(v32, v32, 225);
v33.m128_f32[0] = (float)v27 / 255.0;
v34 = _mm_shuffle_ps(v33, v33, 198);
v34.m128_f32[0] = (float)v28 / 255.0;
v96 = _mm_shuffle_ps(v34, v34, 201);
v6 = v87;
break;
}
}
v35 = 0;
v81 = 0;
v36 = (float)((float)(*(float *)(a1 + 568) * 0.1) + v11) + a6;
v37 = 0;
do
{
if ( v35 >= 60 )
break;
v85 = ++v35;
v38 = (float)rand();
v39 = rand();
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v93,
(float)((float)((float)((float)v39 / 32767.0) + (float)((float)v39 / 32767.0)) - 1.0) * 10.0,
(float)((float)((float)(v38 / 32767.0) + (float)(v38 / 32767.0)) - 1.0) * 10.0);
cocos2d::CCPoint::operator+(v10, v88, v40);
v41 = operator new(0x2A8u);
if ( v6 )
{
v94 = v41;
v42 = CurrencySprite::CurrencySprite((__int64)v41);
v43 = v42;
if ( v42 )
{
if ( (unsigned __int8)CurrencySprite::createWithSprite(v42, v6) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v43);
}
else
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v43 + 8LL))(v43, 1);
v43 = 0;
}
}
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v43, 10);
}
else
{
v95 = v41;
v44 = CurrencySprite::CurrencySprite((__int64)v41);
v43 = v44;
if ( v44 )
{
if ( (unsigned __int8)CurrencySprite::init(v44, a2, 0) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v43);
}
else
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v43 + 8LL))(v43, 1);
v43 = 0;
}
}
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v90 + 464LL))(v90, v43);
}
v45 = *(_QWORD *)(v43 + 672);
if ( v45 )
{
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 528) + 456LL))(
*(_QWORD *)(a1 + 528),
v45,
4294967286LL);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(v43 + 672) + 184LL))(*(_QWORD *)(v43 + 672), v88);
v47 = *(struct cocos2d::CCObject **)(v43 + 672);
*(_BYTE *)(v43 + 616) = 1;
if ( !*(_QWORD *)(v43 + 600) )
{
v48 = (cocos2d::CCObject *)cocos2d::CCArray::create(v46);
*(_QWORD *)(v43 + 600) = v48;
cocos2d::CCObject::retain(v48);
}
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v43 + 600), v47);
*(_BYTE *)(v43 + 617) = 0;
v6 = v87;
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v43 + 160LL))(v43);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v43 + 184LL))(v43, v88);
*(float *)(v43 + 628) = (float)((float)((float)((float)rand() / 32767.0) * 3.0) + 0.0) * 4.0;
if ( (float)((float)rand() / 32767.0) <= 0.5 )
v49 = -1.0;
else
v49 = 1.0;
*(float *)(v43 + 624) = (float)((float)((float)rand() / 32767.0) * 5.0) * v49;
*(float *)(v43 + 636) = (float)((float)((float)rand() / 32767.0) * v12) + v36;
if ( a2 != 1 )
{
v50 = *(_QWORD *)v43;
rand();
(*(void (__fastcall **)(__int64))(v50 + 352))(v43);
v6 = v87;
}
v51 = rand();
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v86,
(float)((float)((float)((float)v51 / 32767.0) + (float)((float)v51 / 32767.0)) - 1.0) * 10.0,
0.0);
cocos2d::CCPoint::operator+(v84, v92, v52);
cocos2d::CCPoint::operator=(v43 + 660, v92);
if ( v6 || v83 )
*(float *)(v43 + 628) = (float)((float)((float)((float)rand() / 32767.0) * 0.2) + 2.5) * 4.0;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 416), (struct cocos2d::CCObject *)v43);
cocos2d::CCArray::addObject(v91, (struct cocos2d::CCObject *)v43);
if ( v37 < 20 )
{
++v37;
v53 = cocos2d::CCParticleSystemQuad::create("fireballEffect.plist", 0);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)v53 + 1496LL))(v53, 40);
v54 = *(_QWORD *)v53;
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v53 + 1280LL))(v53);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(v54 + 1288))(v53);
v55 = *(_QWORD *)v53;
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v53 + 1312LL))(v53);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(v55 + 1320))(v53);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v53 + 1304LL))(v53);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v53 + 1336LL))(v53);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __m128i *))(*(_QWORD *)v53 + 1352LL))(
v53,
&si128);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __m128 *))(*(_QWORD *)v53 + 1384LL))(v53, &v96);
v97 = 0;
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __m128 *))(*(_QWORD *)v53 + 1368LL))(v53, &v97);
v97 = 0;
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __m128 *))(*(_QWORD *)v53 + 1400LL))(v53, &v97);
v56 = *(_QWORD *)v53;
rand();
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(v56 + 968))(v53);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v53 + 984LL))(v53);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, _QWORD))(*(_QWORD *)v53 + 1528LL))(v53, 0);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, _QWORD))(*(_QWORD *)v53 + 1544LL))(v53, 0);
(*(void (__fastcall **)(__int64, struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)a1 + 456LL))(
a1,
v53,
0xFFFFFFFFLL);
*(_QWORD *)(v43 + 648) = v53;
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, _BYTE *))(*(_QWORD *)v53 + 184LL))(v53, v88);
v35 = v85;
v6 = v87;
}
++v81;
v10 = v89;
}
while ( v81 < a3 );
v57 = 255;
if ( v35 < a3 )
{
v58 = (unsigned int)(a3 - v35);
v59 = v91;
do
{
v60 = cocos2d::CCArray::randomObject(v59);
++*((_DWORD *)v60 + 160);
if ( (*(float (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v60 + 168LL))(v60) < 3.0 )
{
v61 = *(_QWORD *)v60;
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v60 + 168LL))(v60);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(v61 + 160))(v60);
}
--v58;
}
while ( v58 );
v57 = 255;
}
if ( !*(_BYTE *)(a1 + 620) || *(_BYTE *)(a1 + 621) )
{
*(_BYTE *)(a1 + 620) = 1;
v62 = cocos2d::CCParticleSystemQuad::create("explodeEffect.plist", 0);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v62 + 1528LL))(v62, 2);
(*(void (__fastcall **)(__int64, cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v62, 99);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v62 + 184LL))(v62, v89);
LOBYTE(v63) = 1;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)v62 + 1544LL))(v62, v63);
v82 = -1;
v64 = -1;
if ( a2 == 1 )
{
v65 = 255;
}
else
{
v66 = 255;
if ( a2 == 2 )
{
LOBYTE(v82) = -1;
v64 = 0;
v65 = 0;
v67 = 255;
v57 = 0;
LABEL_88:
v68 = 150;
goto LABEL_89;
}
v65 = 255;
v67 = 150;
v68 = 255;
if ( a2 != 15 )
{
LABEL_89:
v86.m128_i32[1] = 1065353216;
v86.m128_i32[3] = 1065353216;
v69 = v86;
v69.m128_f32[0] = (float)v66 / 255.0;
v70 = _mm_shuffle_ps(v69, v69, 210);
v70.m128_f32[0] = (float)v65 / 255.0;
v86 = _mm_shuffle_ps(v70, v70, 201);
v97 = v86;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __m128 *))(*(_QWORD *)v62 + 1352LL))(v62, &v97);
v86.m128_i32[3] = 1065353216;
v71 = v86;
v71.m128_f32[0] = (float)v67 / 255.0;
v72 = _mm_shuffle_ps(v71, v71, 225);
v72.m128_f32[0] = (float)v68 / 255.0;
v73 = _mm_shuffle_ps(v72, v72, 198);
v73.m128_f32[0] = (float)v57 / 255.0;
v97 = _mm_shuffle_ps(v73, v73, 201);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __m128 *))(*(_QWORD *)v62 + 1384LL))(v62, &v97);
v97 = 0;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __m128 *))(*(_QWORD *)v62 + 1368LL))(v62, &v97);
v97 = 0;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, __m128 *))(*(_QWORD *)v62 + 1400LL))(v62, &v97);
v74 = *(_QWORD *)v62;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *))(*(_QWORD *)v62 + 1048LL))(v62);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *))(v74 + 1056))(v62);
v75 = *(_QWORD *)v62;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *))(*(_QWORD *)v62 + 1280LL))(v62);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *))(v75 + 1288))(v62);
v76 = *(_QWORD *)v62;
(*(void (__fastcall **)(cocos2d::CCParticleSystem *))(*(_QWORD *)v62 + 1312LL))(v62);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *))(v76 + 1320))(v62);
cocos2d::CCParticleSystem::resetSystem(v62);
v80 = CCCircleWave::create(v78, v77, v79, 0, 1);
*((_WORD *)v80 + 170) = v82;
*((_BYTE *)v80 + 342) = v64;
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v80 + 184LL))(v80, v89);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v80, 9);
return;
}
}
v66 = 0;
v67 = 0;
LOBYTE(v82) = 0;
goto LABEL_88;
}
}
}