// // CurrencyRewardLayer::update from 0x603ccc to 0x6041e6 (1306 bytes) // // 0 xrefs: // // 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 // int (__fastcall ***__fastcall CurrencyRewardLayer::update( CurrencyRewardLayer *this, float a2))(_DWORD, CurrencyRewardLayer *) { unsigned int v3; // r8 float v5; // s16 cocos2d::CCDirector *WinSize; // r0 float v7; // s18 float v8; // s18 float v9; // s19 bool v10; // cf cocos2d::CCArray *v11; // r0 int *v12; // r4 const cocos2d::CCPoint *v13; // r0 float v14; // s15 float v15; // s15 float v16; // s14 int v17; // r3 float v18; // s15 int v19; // r3 float v20; // s15 float v21; // s15 const cocos2d::CCPoint *v22; // r2 float v23; // r0 float v24; // s15 float v25; // s13 float v26; // s14 float v27; // s12 float v28; // s15 void (__fastcall *v29)(int *, int *); // r10 cocos2d::CCParticleSystem *v30; // r0 int v31; // r3 float v32; // r2 int v33; // r0 cocos2d::CCSequence *v34; // r11 cocos2d::CCFiniteTimeAction *v35; // r0 cocos2d::CCAction *v36; // r0 float v37; // r2 cocos2d::CCSequence *v38; // r11 cocos2d::CCFiniteTimeAction *v39; // r0 cocos2d::CCAction *v40; // r0 int v41; // r10 void (__fastcall *v42)(int, int); // r11 int v43; // r0 int (__fastcall ***result)(_DWORD, CurrencyRewardLayer *); // r0 float v45; // r2 cocos2d::CCEaseInOut *v46; // r0 float v47; // r2 cocos2d::CCSequence *v48; // r9 float v49; // r2 cocos2d::CCEaseInOut *v50; // r0 float v51; // r2 cocos2d::CCFiniteTimeAction *v52; // r0 int v53; // s15 cocos2d::CCFiniteTimeAction *v54; // r8 float v55; // s16 const cocos2d::CCPoint *v56; // r2 cocos2d::CCEaseInOut *v57; // r0 float v58; // r2 int v59; // r10 int v60; // r0 cocos2d::CCAction *v61; // r0 float v62; // [sp+Ch] [bp-30h] BYREF float v63; // [sp+10h] [bp-2Ch] float v64; // [sp+14h] [bp-28h] BYREF float v65; // [sp+18h] [bp-24h] int v66; // [sp+1Ch] [bp-20h] int v67; // [sp+20h] [bp-1Ch] int v68; // [sp+24h] [bp-18h] int v69; // [sp+28h] [bp-14h] int v70; // [sp+2Ch] [bp-10h] BYREF int v71; // [sp+30h] [bp-Ch] v3 = 0; *((float *)this + 101) = *((float *)this + 101) + a2; cocos2d::CCDirector::sharedDirector(this); v5 = a2 * 60.0; WinSize = (cocos2d::CCDirector *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v70); v7 = *(float *)&v71; cocos2d::CCDirector::sharedDirector(WinSize); v8 = v7 - 6.0; cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v70); v9 = *(float *)&v70 - 6.0; while ( 1 ) { v10 = v3 >= cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 80)); v11 = *((cocos2d::CCArray **)this + 80); if ( v10 ) break; v12 = (int *)cocos2d::CCArray::objectAtIndex(v11, v3); v13 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int *))(*v12 + 96))(v12); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v62, v13); v14 = *((float *)v12 + 133) - a2; *((float *)v12 + 133) = v14; if ( v14 > 0.0 ) { v15 = *((float *)v12 + 131) - (float)((float)(a2 * 60.0) * 0.4); v16 = v5 * *((float *)v12 + 130); *((float *)v12 + 131) = v15; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v70, v16, v15 * v5); cocos2d::CCPoint::operator+(&v64, &v62, &v70); if ( v65 <= v8 ) { if ( v65 < 6.0 ) { v65 = 6.0; v19 = v12[136]; if ( v19 == 2 || v19 == 15 ) v20 = *((float *)v12 + 131) * -0.9; else v20 = *((float *)v12 + 131) * (float)(-0.6 - (float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 0.3)); *((float *)v12 + 131) = v20; if ( *((float *)v12 + 131) < 4.0 ) { v21 = vcvts_n_f32_s32(rand(), 0x1Fu); v18 = (float)(v21 + v21) + 4.0; goto LABEL_16; } } } else { v65 = v8; v17 = v12[136]; if ( v17 == 2 || v17 == 15 ) v18 = *((float *)v12 + 131) * -0.9; else v18 = *((float *)v12 + 131) * (float)(-0.6 - (float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 0.3)); LABEL_16: *((float *)v12 + 131) = v18; } if ( v64 < 6.0 ) { v64 = 6.0; goto LABEL_21; } if ( v64 > v9 ) { v64 = v9; LABEL_21: *((float *)v12 + 130) = *((float *)v12 + 130) * -0.9; } (*(void (__fastcall **)(int *, float *))(*v12 + 92))(v12, &v64); LABEL_56: v41 = v12[135]; if ( v41 ) { v42 = *(void (__fastcall **)(int, int))(*(_DWORD *)v41 + 92); v43 = (*(int (__fastcall **)(int *))(*v12 + 96))(v12); v42(v41, v43); } goto LABEL_58; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v64, (const cocos2d::CCPoint *)(v12 + 137)); v23 = COERCE_FLOAT(cocos2d::ccpDistance((cocos2d *)&v62, (const cocos2d::CCPoint *)&v64, v22)); if ( v23 <= 5.0 ) { v30 = (cocos2d::CCParticleSystem *)v12[135]; if ( v30 ) { cocos2d::CCParticleSystem::stopSystem(v30); (*(void (__fastcall **)(int))(*(_DWORD *)v12[135] + 268))(v12[135]); v12[135] = 0; } v31 = v12[136]; switch ( v31 ) { case 1: CurrencyRewardLayer::incrementCount(this, v12[134]); break; case 2: CurrencyRewardLayer::incrementStarsCount(this, v12[134]); break; case 15: CurrencyRewardLayer::incrementMoonsCount(this, v12[134]); break; case 3: CurrencyRewardLayer::incrementDiamondsCount(this, v12[134]); break; default: v33 = *((_DWORD *)this + 86); if ( v33 && (*(int (__fastcall **)(int))(*(_DWORD *)v33 + 32))(v33) == v12[136] ) CurrencyRewardLayer::incrementSpecialCount2(this, v12[134]); else CurrencyRewardLayer::incrementSpecialCount1(this, v12[134]); break; } v34 = (cocos2d::CCSequence *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3DCCCCCD, 0.1, v32); v66 = 268; v67 = 1; v35 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v12, 268, 1); v36 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v34, v35, 0); cocos2d::CCNode::runAction((cocos2d::CCNode *)v12, v36); if ( v12[139] ) { v38 = (cocos2d::CCSequence *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3DCCCCCD, 0.1, v37); v68 = 268; v69 = 1; v39 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v12[139], 268, 1); v40 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v38, v39, 0); cocos2d::CCNode::runAction((cocos2d::CCNode *)v12[139], v40); } cocos2d::CCArray::removeObjectAtIndex(*((cocos2d::CCArray **)this + 80), v3, 1); } else { v24 = (float)((float)(v23 / 10.0) + 10.0) / *((float *)v12 + 132); v25 = v64 - v62; v26 = v65 - v63; v27 = (float)((float)(v64 - v62) / v24) * v5; v28 = (float)((float)(v65 - v63) / v24) * v5; if ( (float)(v64 - v62) <= 0.0 || v27 <= v25 ) { if ( v25 >= 0.0 ) { v25 = v27; } else if ( v27 >= v25 ) { v25 = v27; } } if ( v26 <= 0.0 || v28 <= v26 ) { if ( v26 >= 0.0 ) { v26 = v28; } else if ( v28 >= v26 ) { v26 = v28; } } v29 = *(void (__fastcall **)(int *, int *))(*v12 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v70, v62 + v25, v63 + v26); v29(v12, &v70); *((float *)v12 + 132) = *((float *)v12 + 132) + (float)((float)(v5 * 0.1) / *((float *)this + 103)); if ( v12 ) goto LABEL_56; LABEL_58: ++v3; } } result = (int (__fastcall ***)(_DWORD, CurrencyRewardLayer *))cocos2d::CCArray::count(v11); if ( !result ) { cocos2d::CCNode::unscheduleUpdate(this); v46 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3E4CCCCD, 1.2, v45); v48 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v46, (cocos2d::CCActionInterval *)0x40000000, v47); v50 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3E4CCCCD, 1.0, v49); v52 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(v50, (cocos2d::CCActionInterval *)0x40000000, v51); v53 = *((_DWORD *)this + 118) - 1; v54 = v52; v55 = (float)((float)((float)v53 * 0.1) + 0.5) * *((float *)this + 103); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v70, 0.0, (float)(30 * v53 + 50)); v57 = (cocos2d::CCEaseInOut *)cocos2d::CCMoveBy::create((cocos2d::CCMoveBy *)LODWORD(v55), COERCE_FLOAT(&v70), v56); v59 = cocos2d::CCEaseInOut::create(v57, (cocos2d::CCActionInterval *)0x40000000, v58); v70 = 268; v71 = 1; v60 = cocos2d::CCCallFunc::create(this, 268, 1); v61 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v48, v54, v59, v60, 0); cocos2d::CCNode::runAction(*((cocos2d::CCNode **)this + 117), v61); result = *((int (__fastcall ****)(_DWORD, CurrencyRewardLayer *))this + 79); if ( result ) return (int (__fastcall ***)(_DWORD, CurrencyRewardLayer *))(**result)(result, this); } return result; }