// // CurrencyRewardLayer::createObjectsFull from 0x604a10 to 0x60541c (2572 bytes) // // 2 xrefs: // > CurrencyRewardLayer::createUnlockObject @ 0x60546e // > CurrencyRewardLayer::createObjects @ 0x6054b6 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:54:43 +0000 // float __fastcall CurrencyRewardLayer::createObjectsFull( float result, int a2, int a3, CurrencySprite *a4, int a5, float a6) { float v8; // r4 _BOOL4 v9; // r3 cocos2d::CCArray *v10; // r0 float v11; // s21 float v12; // s19 cocos2d::CCDirector *v13; // r0 cocos2d::CCDirector *v14; // r0 float v15; // s24 float v16; // s17 cocos2d::CCDirector *v17; // r0 float v18; // r0 float v19; // s15 float v20; // s17 float *v21; // r5 float v22; // r1 float v23; // r2 float v24; // r3 int v25; // r0 int v26; // r1 int v27; // r3 int v28; // r0 int v29; // r1 int v30; // r2 int v31; // r5 int v32; // lr int v33; // r11 float v34; // s21 int v35; // s18 int v36; // r0 cocos2d::CCSprite *v37; // r1 CurrencySprite *v38; // r5 int v39; // r1 float v40; // s29 float v41; // s15 bool v42; // fzf bool v43; // fnf float v44; // s15 void (__fastcall *v45)(CurrencySprite *, _DWORD); // r10 int v46; // r0 int v47; // r0 bool v48; // r2 int v49; // r10 float v50; // r0 float v51; // r0 void (__fastcall *v52)(int, float *); // r2 void (__fastcall *v53)(int, float *); // r2 int v54; // r0 _DWORD *v55; // r5 int (__fastcall *v56)(_DWORD *, _DWORD); // r9 float v57; // r0 cocos2d::CCParticleSystem *v58; // r5 int v59; // r7 int v60; // r6 int v61; // r9 int v62; // r10 void (__fastcall *v63)(cocos2d::CCParticleSystem *, float *); // r11 void (__fastcall *v64)(cocos2d::CCParticleSystem *, float *); // r11 void (__fastcall *v65)(cocos2d::CCParticleSystem *, float *); // r3 void (__fastcall *v66)(cocos2d::CCParticleSystem *, float *); // r3 void (__fastcall *v67)(cocos2d::CCParticleSystem *, _DWORD); // r6 float v68; // r0 void (__fastcall *v69)(cocos2d::CCParticleSystem *, _DWORD); // r6 float v70; // r0 void (__fastcall *v71)(cocos2d::CCParticleSystem *, _DWORD); // r6 float v72; // r0 CCCircleWave *v73; // r0 CCCircleWave *v74; // r5 int v75; // r3 int v77; // [sp+8h] [bp-C4h] int v78; // [sp+Ch] [bp-C0h] int v79; // [sp+10h] [bp-BCh] cocos2d::CCArray *v80; // [sp+18h] [bp-B4h] void (__fastcall *v81)(int, _DWORD); // [sp+24h] [bp-A8h] void (__fastcall *v82)(int, _DWORD); // [sp+24h] [bp-A8h] void (__fastcall *v83)(int, _DWORD); // [sp+24h] [bp-A8h] _BYTE v84[8]; // [sp+2Ch] [bp-A0h] BYREF _BYTE v85[8]; // [sp+34h] [bp-98h] BYREF _BYTE v86[8]; // [sp+3Ch] [bp-90h] BYREF float v87; // [sp+44h] [bp-88h] BYREF float v88; // [sp+48h] [bp-84h] float v89; // [sp+4Ch] [bp-80h] float v90; // [sp+50h] [bp-7Ch] float v91; // [sp+54h] [bp-78h] BYREF float v92; // [sp+58h] [bp-74h] float v93; // [sp+5Ch] [bp-70h] float v94; // [sp+60h] [bp-6Ch] float v95; // [sp+64h] [bp-68h] BYREF float v96; // [sp+68h] [bp-64h] float v97; // [sp+6Ch] [bp-60h] float v98; // [sp+70h] [bp-5Ch] _DWORD v99[12]; // [sp+74h] [bp-58h] BYREF float v100[4]; // [sp+A4h] [bp-28h] BYREF float v101[4]; // [sp+B4h] [bp-18h] BYREF v8 = result; if ( a3 <= 0 ) return result; if ( a3 == 1 ) { v79 = 1; } else { v9 = (unsigned int)(a2 - 1) > 2 && a2 != 15; v79 = v9; } v10 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)LODWORD(result)); v11 = *(float *)(LODWORD(v8) + 412); v12 = v11 * 0.3; v80 = v10; v13 = (cocos2d::CCDirector *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v84); if ( a4 ) { v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v13); v15 = 1.0; v16 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v14)); v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v16)); v18 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v17)); v19 = v16 + 30.0; v20 = 1.2; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, v19, v18 + 30.0); cocos2d::CCPoint::operator=(v84, v101); v87 = 1.0; v91 = 0.39216; v88 = 1.0; v92 = 0.39216; v93 = 0.39216; v89 = 1.0; v90 = 1.0; v94 = 1.0; goto LABEL_41; } if ( a2 == 1 ) { v77 = *(_DWORD *)(LODWORD(v8) + 376); if ( a3 <= 9 ) { v12 = 0.2; v11 = 0.8; LABEL_22: v20 = 1.0; if ( a3 >= 21 ) v20 = 0.95; goto LABEL_27; } if ( a3 > 400 ) { v12 = 0.9; } else { if ( a3 > 300 ) { v12 = 0.8; v20 = 0.8; goto LABEL_27; } if ( a3 <= 200 ) { if ( a3 > 100 ) { v12 = 0.6; } else if ( a3 > 50 ) { v12 = 0.5; } else if ( a3 >= 31 ) { v12 = 0.4; } if ( a3 <= 50 ) goto LABEL_22; v20 = 0.9; LABEL_27: v15 = 0.7; memset(v99, 0, 32); v99[2] = 1.0; v99[1] = 1061734601; v99[3] = 1.0; v87 = *(float *)v99; v88 = 0.78431; v89 = 1.0; v90 = 1.0; v99[6] = 1.0; v99[7] = 1.0; v99[5] = 1044957385; v91 = *(float *)&v99[4]; v92 = 0.19608; v93 = 1.0; v94 = 1.0; cocos2d::CCPoint::operator=(v84, LODWORD(v8) + 416); goto LABEL_41; } v12 = 0.7; } v20 = 0.8; goto LABEL_27; } v77 = *(_DWORD *)(LODWORD(v8) + 372); if ( a2 == 2 ) { cocos2d::CCPoint::operator=(v84, LODWORD(v8) + 424); memset(&v99[8], 0, 0x10u); v99[8] = 1.0; v99[9] = 1.0; v99[11] = 1.0; v87 = 1.0; v88 = 1.0; v89 = *(float *)&v99[10]; v90 = 1.0; v21 = v100; memset(v100, 0, sizeof(v100)); v100[0] = 1.0; v100[1] = 0.58824; v100[3] = 1.0; } else { if ( a2 != 15 ) { if ( a2 == 3 ) { cocos2d::CCPoint::operator=(v84, LODWORD(v8) + 440); v87 = 1.0; v91 = 0.58824; v88 = 1.0; v89 = 1.0; v90 = 1.0; v92 = 1.0; v93 = 1.0; v94 = 1.0; v15 = 1.4; v20 = 0.6; } else { v25 = *(_DWORD *)(LODWORD(v8) + 344); if ( v25 && (*(int (__fastcall **)(int))(*(_DWORD *)v25 + 32))(v25) == a2 ) v26 = LODWORD(v8) + 456; else v26 = LODWORD(v8) + 448; cocos2d::CCPoint::operator=(v84, v26); switch ( a2 ) { case 4: v27 = 0; v30 = 255; v29 = 150; v28 = 0; v31 = 255; goto LABEL_83; case 5: v27 = 255; v29 = 200; v30 = 0; v28 = 255; v31 = 255; v32 = 100; goto LABEL_84; case 6: v27 = 0; v29 = 255; v30 = 0; v28 = 0; v31 = 255; v32 = 200; goto LABEL_84; case 7: v27 = 255; v29 = 0; v30 = 150; v28 = 255; v31 = 0; goto LABEL_79; case 8: v27 = 0; v30 = 255; v29 = 0; v28 = 0; v31 = 150; LABEL_83: v32 = 255; goto LABEL_84; case 9: v27 = 0; v28 = 255; v29 = 0; v30 = 0; v31 = 255; goto LABEL_39; case 16: v27 = 0; v31 = 200; v29 = 0; v30 = 0; v28 = 0; LABEL_39: v20 = 1.0; v32 = 255; break; default: v27 = 255; v29 = 255; v30 = 255; v28 = 255; v31 = 255; LABEL_79: v32 = 255; LABEL_84: v20 = 0.8; break; } v90 = 1.0; v94 = 1.0; v87 = (float)v32 / 255.0; v88 = (float)v31 / 255.0; v89 = (float)v28 / 255.0; v91 = (float)v30 / 255.0; v92 = (float)v29 / 255.0; v15 = 1.0; v93 = (float)v27 / 255.0; } goto LABEL_41; } cocos2d::CCPoint::operator=(v84, LODWORD(v8) + 432); v21 = v101; v88 = 1.0; v87 = 0.39216; v89 = 1.0; v90 = 1.0; memset(v101, 0, sizeof(v101)); v101[1] = 1.0; v101[2] = 1.0; v101[3] = 1.0; } v22 = v21[1]; v23 = v21[2]; v24 = v21[3]; v15 = 1.0; v20 = 0.7; v91 = *v21; v92 = v22; v93 = v23; v94 = v24; LABEL_41: v33 = 0; v78 = 0; v34 = (float)(v11 + (float)(*(float *)(LODWORD(v8) + 412) * 0.1)) + a6; while ( 1 ) { ++v33; v35 = rand(); v36 = rand(); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v95, (float)((float)((float)((float)v35 * 4.6566e-10) + (float)((float)v35 * 4.6566e-10)) - 1.0) * 10.0, (float)((float)((float)((float)v36 * 4.6566e-10) + (float)((float)v36 * 4.6566e-10)) - 1.0) * 10.0); cocos2d::CCPoint::operator+(v85, a5, &v95); if ( a4 ) { v38 = CurrencySprite::createWithSprite(a4, v37); (*(void (__fastcall **)(float, CurrencySprite *, int))(*(_DWORD *)LODWORD(v8) + 232))( COERCE_FLOAT(LODWORD(v8)), v38, 10); } else { v38 = CurrencySprite::create(a2, 0); (*(void (__fastcall **)(int, CurrencySprite *))(*(_DWORD *)v77 + 228))(v77, v38); } v39 = *((_DWORD *)v38 + 139); if ( v39 ) { (*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(LODWORD(v8) + 376) + 232))( *(_DWORD *)(LODWORD(v8) + 376), v39, -10); (*(void (__fastcall **)(_DWORD, _BYTE *))(**((_DWORD **)v38 + 139) + 92))(*((_DWORD *)v38 + 139), v85); CCSpritePlus::addFollower(v38, *((cocos2d::CCNode **)v38 + 139)); *((_BYTE *)v38 + 517) = 0; } (*(void (__fastcall **)(CurrencySprite *, float))(*(_DWORD *)v38 + 80))(v38, COERCE_FLOAT(LODWORD(v20))); (*(void (__fastcall **)(CurrencySprite *, _BYTE *))(*(_DWORD *)v38 + 92))(v38, v85); *((float *)v38 + 131) = (float)((float)((float)((float)rand() * 4.6566e-10) * 3.0) + 0.0) * 4.0; v40 = (float)((float)rand() * 4.6566e-10) * 5.0; v41 = (float)rand() * 4.6566e-10; v42 = v41 == 0.5; v43 = v41 < 0.5; v44 = 1.0; if ( v43 || v42 ) v44 = -1.0; *((float *)v38 + 130) = v40 * v44; *((float *)v38 + 133) = v34 + (float)((float)((float)rand() * 4.6566e-10) * v12); if ( a2 != 1 ) { v45 = *(void (__fastcall **)(CurrencySprite *, _DWORD))(*(_DWORD *)v38 + 180); v46 = rand(); v45(v38, (float)((float)((float)((float)v46 * 4.6566e-10) + (float)((float)v46 * 4.6566e-10)) - 1.0) * 30.0); } v47 = rand(); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v86, (float)((float)((float)((float)v47 * 4.6566e-10) + (float)((float)v47 * 4.6566e-10)) - 1.0) * 10.0, 0.0); cocos2d::CCPoint::operator+(&v95, v84, v86); cocos2d::CCPoint::operator=((char *)v38 + 548, &v95); if ( a4 || v79 ) *((float *)v38 + 131) = (float)((float)((float)((float)rand() * 4.6566e-10) * 0.2) + 2.5) * 4.0; cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(LODWORD(v8) + 320), v38); result = COERCE_FLOAT(cocos2d::CCArray::addObject(v80, v38)); if ( v78 <= 19 ) { ++v78; v49 = cocos2d::CCParticleSystemQuad::create((cocos2d::CCParticleSystemQuad *)"fireballEffect.plist", nullptr, v48); (*(void (__fastcall **)(int, int))(*(_DWORD *)v49 + 752))(v49, 40); v81 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 648); v50 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v49 + 644))(v49)); v81(v49, v50 * v15); v82 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 664); v51 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v49 + 660))(v49)); v82(v49, v51 * 0.1); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 656))(v49, 0); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 672))(v49, 0); (*(void (__fastcall **)(int, float *))(*(_DWORD *)v49 + 680))(v49, &v87); (*(void (__fastcall **)(int, float *))(*(_DWORD *)v49 + 696))(v49, &v91); v52 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v49 + 688); v95 = 0.0; v96 = 0.0; v97 = 0.0; v98 = 0.0; v52(v49, &v95); v53 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v49 + 704); v95 = 0.0; v96 = 0.0; v97 = 0.0; v98 = 0.0; v53(v49, &v95); v83 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 488); v54 = rand(); v83(v49, (float)((float)((float)v54 * 4.6566e-10) * 0.2) + 0.2); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 496))(v49, 0); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 784))(v49, 0); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v49 + 792))(v49, 0); (*(void (__fastcall **)(float, int, int))(*(_DWORD *)LODWORD(v8) + 232))(COERCE_FLOAT(LODWORD(v8)), v49, -1); *((_DWORD *)v38 + 135) = v49; result = COERCE_FLOAT((*(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v49 + 92))(v49, v85)); } if ( v33 == a3 ) break; if ( v33 == 60 ) { if ( a3 > 60 ) { do { ++v33; v55 = (_DWORD *)cocos2d::CCArray::randomObject(v80); ++v55[134]; result = (*(float (__fastcall **)(_DWORD *))(*v55 + 84))(v55); if ( result < 3.0 ) { v56 = *(int (__fastcall **)(_DWORD *, _DWORD))(*v55 + 80); v57 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD *))(*v55 + 84))(v55)); result = COERCE_FLOAT(v56(v55, v57 + 0.1)); } } while ( v33 != a3 ); } break; } } if ( !*(_BYTE *)(LODWORD(v8) + 464) || *(_BYTE *)(LODWORD(v8) + 465) ) { *(_BYTE *)(LODWORD(v8) + 464) = 1; v58 = (cocos2d::CCParticleSystem *)cocos2d::CCParticleSystemQuad::create( (cocos2d::CCParticleSystemQuad *)"explodeEffect.plist", nullptr, v48); (*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v58 + 784))(v58, 2); (*(void (__fastcall **)(float, cocos2d::CCParticleSystem *, int))(*(_DWORD *)LODWORD(v8) + 232))( COERCE_FLOAT(LODWORD(v8)), v58, 99); (*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v58 + 92))(v58, a5); (*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v58 + 792))(v58, 1); if ( a2 != 1 ) { if ( a2 == 2 ) { v59 = 150; v60 = 255; v61 = 0; goto LABEL_70; } if ( a2 != 15 ) { v59 = 255; v60 = 150; v61 = 255; v62 = 255; goto LABEL_72; } } v59 = 150; v60 = 0; v61 = 255; LABEL_70: v62 = v60; LABEL_72: v63 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, float *))(*(_DWORD *)v58 + 680); v98 = 1.0; v96 = 1.0; v95 = (float)v62 / 255.0; v97 = (float)v61 / 255.0; v63(v58, &v95); v64 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, float *))(*(_DWORD *)v58 + 696); v98 = 1.0; v97 = (float)v61 / 255.0; v95 = (float)v60 / 255.0; v96 = (float)v59 / 255.0; v64(v58, &v95); v65 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, float *))(*(_DWORD *)v58 + 688); v95 = 0.0; v96 = 0.0; v97 = 0.0; v98 = 0.0; v65(v58, &v95); v66 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, float *))(*(_DWORD *)v58 + 704); v95 = 0.0; v96 = 0.0; v97 = 0.0; v98 = 0.0; v66(v58, &v95); v67 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD))(*(_DWORD *)v58 + 532); v68 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCParticleSystem *))(*(_DWORD *)v58 + 528))(v58)); v67(v58, v68 * 0.8); v69 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD))(*(_DWORD *)v58 + 648); v70 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCParticleSystem *))(*(_DWORD *)v58 + 644))(v58)); v69(v58, v70 * 0.5); v71 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD))(*(_DWORD *)v58 + 664); v72 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCParticleSystem *))(*(_DWORD *)v58 + 660))(v58)); v71(v58, v72 * 0.1); cocos2d::CCParticleSystem::resetSystem(v58); v73 = CCCircleWave::create( (CCCircleWave *)0x41200000, 1121714176, (cocos2d::CCActionTween *)0x3E99999A, 0.0, (bool)a4); *((_BYTE *)v73 + 281) = -1; v74 = v73; v75 = *(_DWORD *)v73; *((_BYTE *)v73 + 280) = v62; *((_BYTE *)v73 + 282) = v61; (*(void (__fastcall **)(CCCircleWave *, int))(v75 + 92))(v73, a5); return COERCE_FLOAT( (*(int (__fastcall **)(float, CCCircleWave *, int))(*(_DWORD *)LODWORD(v8) + 232))( COERCE_FLOAT(LODWORD(v8)), v74, 9)); } return result; }