// // PlayLayer::loadDefaultColors from 0x7054cc to 0x705a50 (1412 bytes) // // 4 xrefs: // > PlayLayer::setupHasCompleted @ 0x708068 // > PlayLayer::setupHasCompleted @ 0x7083e4 // > PlayLayer::resetLevel @ 0x71143c // > @ 0x6a6a8 // // 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 12:52:05 +0000 // __int64 __fastcall PlayLayer::loadDefaultColors(PlayLayer *this) { GJEffectManager *v2; // x0 cocos2d::CCArray *AllColorActions; // x25 unsigned int v4; // w23 __int64 v5; // x0 int v6; // w21 unsigned __int64 v7; // x19 unsigned __int64 v8; // x20 __int64 *v9; // x0 unsigned __int64 v10; // x1 unsigned __int64 v11; // x1 __int64 v12; // x0 void *v13; // x24 float v14; // s0 _BOOL8 v15; // x0 __int64 v16; // x2 unsigned __int64 v17; // x2 unsigned __int64 v18; // x1 _QWORD *v19; // x0 unsigned __int64 v20; // x1 unsigned __int64 v21; // x0 cocos2d::CCArray *v22; // x20 unsigned int i; // w19 __int64 v24; // x0 cocos2d::CCArray *v25; // x26 unsigned int v26; // w23 __int64 v27; // x19 int v28; // w20 int v29; // w21 unsigned __int64 v30; // x19 unsigned __int64 v31; // x20 __int64 *v32; // x0 unsigned __int64 v33; // x1 unsigned __int64 v34; // x1 __int64 v35; // x0 __int64 v36; // x24 float v37; // s2 float v38; // s0 _BOOL8 v39; // x0 __int64 v40; // x2 unsigned __int64 v41; // x2 unsigned __int64 v42; // x1 __int64 *v43; // x0 unsigned __int64 v44; // x1 unsigned __int64 v45; // x0 _QWORD *v46; // x0 _QWORD *v47; // x19 void *v48; // x0 __int64 *v50; // [xsp+70h] [xbp+60h] int v51; // [xsp+8Ch] [xbp+7Ch] BYREF void *v52; // [xsp+90h] [xbp+80h] BYREF unsigned __int64 v53; // [xsp+98h] [xbp+88h] void *v54; // [xsp+A0h] [xbp+90h] BYREF __int64 v55; // [xsp+A8h] [xbp+98h] float v56; // [xsp+B0h] [xbp+A0h] v52 = nullptr; v2 = *((GJEffectManager **)this + 269); v53 = 0; v54 = nullptr; v55 = 0; v56 = 1.0; AllColorActions = (cocos2d::CCArray *)GJEffectManager::getAllColorActions(v2); v4 = 0; LABEL_2: while ( v4 < (unsigned int)cocos2d::CCArray::count(AllColorActions) ) { v5 = cocos2d::CCArray::objectAtIndex(AllColorActions, v4); if ( !*(_BYTE *)(v5 + 84) ) goto LABEL_22; v6 = *(_DWORD *)(v5 + 92); v7 = v53; if ( v53 ) { v8 = v6 & (v53 - 1); if ( ((v53 - 1) & v53) != 0 ) v8 = v6 % v53; v9 = *((__int64 **)v52 + v8); if ( v9 ) { while ( 1 ) { v9 = (__int64 *)*v9; if ( !v9 ) break; v10 = v9[1]; v11 = ((v53 - 1) & v53) != 0 ? v10 % v53 : (v53 - 1) & v10; if ( v8 != v11 ) break; if ( v6 == *((_DWORD *)v9 + 4) ) { ++v4; goto LABEL_2; } } } } else { v8 = 0; } v12 = operator new(0x18u); *(_DWORD *)(v12 + 16) = v6; v13 = (void *)v12; *(_QWORD *)(v12 + 8) = v6; *(_QWORD *)v12 = 0; v14 = (float)(unsigned __int64)(v55 + 1); if ( v14 > (float)((float)v7 * v56) ) { v15 = 1; v16 = 2 * v7; if ( v7 > 2 ) v15 = ((v7 - 1) & v7) != 0; } else { if ( v7 ) goto LABEL_19; v15 = 1; v16 = 0; } v17 = v16 + v15; v18 = vcvtps_u32_f32(v14 / v56); if ( v18 < v17 ) v18 = v17; std::__hash_table,std::equal_to,std::allocator>::rehash((unsigned __int64)&v52, v18); v7 = v53; if ( ((v7 - 1) & v7) == 0 ) { v8 = v6 & (v53 - 1); LABEL_19: v19 = *((_QWORD **)v52 + v8); if ( !v19 ) goto LABEL_30; goto LABEL_20; } v8 = v6 % v53; v19 = *((_QWORD **)v52 + v8); if ( !v19 ) { LABEL_30: *(_QWORD *)v13 = v54; v54 = v13; *((_QWORD *)v52 + v8) = &v54; if ( *(_QWORD *)v13 ) { v20 = *(_QWORD *)(*(_QWORD *)v13 + 8LL); if ( ((v7 - 1) & v7) != 0 ) v21 = v20 % v7; else v21 = (v7 - 1) & v20; *((_QWORD *)v52 + v21) = v13; } goto LABEL_21; } LABEL_20: *(_QWORD *)v13 = *v19; *v19 = v13; LABEL_21: ++v55; LABEL_22: ++v4; } GJEffectManager::reset(*((GJEffectManager **)this + 269)); v22 = (cocos2d::CCArray *)GJEffectManager::getAllColorActions(*(GJEffectManager **)(*((_QWORD *)this + 409) + 320LL)); for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v22); ++i ) { v24 = cocos2d::CCArray::objectAtIndex(v22, i); (*(void (__fastcall **)(PlayLayer *, __int64, _QWORD, _QWORD, __int64, _QWORD, _QWORD, _QWORD, float, float, _DWORD, _DWORD))(*(_QWORD *)this + 1232LL))( this, v24 + 72, *(unsigned int *)(v24 + 92), *(unsigned __int8 *)(v24 + 84), v24 + 104, *(unsigned int *)(v24 + 120), *(unsigned __int8 *)(v24 + 125), 0, 0.0, *(float *)(v24 + 96), *(_DWORD *)(v24 + 128), *(_DWORD *)(v24 + 132)); } v25 = (cocos2d::CCArray *)GJEffectManager::getAllColorActions(*((GJEffectManager **)this + 269)); v26 = 0; v50 = (__int64 *)((char *)this + 14600); LABEL_39: while ( 2 ) { if ( v26 < (unsigned int)cocos2d::CCArray::count(v25) ) { v27 = cocos2d::CCArray::objectAtIndex(v25, v26); v28 = *(unsigned __int8 *)(v27 + 84); v51 = *(_DWORD *)(v27 + 92); if ( v28 != (std::__hash_table,std::equal_to,std::allocator>::find(&v52, &v51) != nullptr) ) { v29 = *(_DWORD *)(v27 + 92); v30 = *((_QWORD *)this + 1824); if ( v30 ) { v31 = v29 & (v30 - 1); if ( ((v30 - 1) & v30) != 0 ) v31 = v29 % v30; v32 = *(__int64 **)(*((_QWORD *)this + 1823) + 8 * v31); if ( v32 ) { while ( 1 ) { v32 = (__int64 *)*v32; if ( !v32 ) break; v33 = v32[1]; v34 = ((v30 - 1) & v30) != 0 ? v33 % v30 : (v30 - 1) & v33; if ( v31 != v34 ) break; if ( v29 == *((_DWORD *)v32 + 4) ) { ++v26; goto LABEL_39; } } } } else { v31 = 0; } v35 = operator new(0x18u); *(_DWORD *)(v35 + 16) = v29; v36 = v35; *(_QWORD *)(v35 + 8) = v29; *(_QWORD *)v35 = 0; v37 = *((float *)this + 3654); v38 = (float)(unsigned __int64)(*((_QWORD *)this + 1826) + 1LL); if ( v38 > (float)((float)v30 * v37) ) { v39 = 1; v40 = 2 * v30; if ( v30 > 2 ) v39 = ((v30 - 1) & v30) != 0; LABEL_52: v41 = v40 + v39; v42 = vcvtps_u32_f32(v38 / v37); if ( v42 < v41 ) v42 = v41; std::__hash_table,std::equal_to,std::allocator>::rehash( (unsigned __int64)this + 14584, v42); v30 = *((_QWORD *)this + 1824); if ( ((v30 - 1) & v30) == 0 ) { v31 = v29 & (v30 - 1); goto LABEL_56; } v31 = v29 % v30; v43 = *(__int64 **)(*((_QWORD *)this + 1823) + 8 * v31); if ( !v43 ) goto LABEL_67; LABEL_57: *(_QWORD *)v36 = *v43; *v43 = v36; } else { if ( !v30 ) { v39 = 1; v40 = 0; goto LABEL_52; } LABEL_56: v43 = *(__int64 **)(*((_QWORD *)this + 1823) + 8 * v31); if ( v43 ) goto LABEL_57; LABEL_67: *(_QWORD *)v36 = *v50; *v50 = v36; *(_QWORD *)(*((_QWORD *)this + 1823) + 8 * v31) = v50; if ( *(_QWORD *)v36 ) { v44 = *(_QWORD *)(*(_QWORD *)v36 + 8LL); if ( ((v30 - 1) & v30) != 0 ) v45 = v44 % v30; else v45 = (v30 - 1) & v44; *(_QWORD *)(*((_QWORD *)this + 1823) + 8 * v45) = v36; } } ++*((_QWORD *)this + 1826); } ++v26; continue; } break; } GJEffectManager::updateEffects(*((GJEffectManager **)this + 269), 0.0); GJEffectManager::calculateBaseActiveColors(*((GJEffectManager **)this + 269)); GJEffectManager::processInheritedColors(*((GJEffectManager **)this + 269)); v46 = v54; if ( v54 ) { do { v47 = (_QWORD *)*v46; operator delete(v46); v46 = v47; } while ( v47 ); } v48 = v52; v52 = nullptr; if ( v48 ) operator delete(v48); return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source