// // GJBaseGameLayer::processAreaEffects from 0x140331030 to 0x140331bf8 (3016 bytes) // // 10 xrefs: // > GJBaseGameLayer::processAreaActions @ 0x140331c60 // > GJBaseGameLayer::processAreaActions @ 0x140331c7d // > GJBaseGameLayer::processAreaActions @ 0x140331c97 // > LevelEditorLayer::updateVisibility @ 0x1403f7353 // > LevelEditorLayer::updateVisibility @ 0x1403f7372 // > PlayLayer::updateVisibility @ 0x14050ed14 // > PlayLayer::updateVisibility @ 0x14050ed32 // > @ 0x1408b66e0 // > @ 0x1408b66f0 // > @ 0x14091f5f8 // // 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:30:32 +0000 // __int64 __fastcall GJBaseGameLayer::processAreaEffects(__int64 a1, __int64 *a2, unsigned int a3, float a4, char a5) { unsigned int v6; // r14d float v8; // xmm0_4 __int64 v9; // rcx __int64 v10; // rax __int64 v11; // rcx __int64 result; // rax __int64 v13; // r15 unsigned __int32 v14; // xmm13_4 __int64 v15; // rsi __int64 v16; // rcx int v17; // ebx bool v18; // sf __int64 v19; // rax float v20; // xmm2_4 float v21; // xmm2_4 cocos2d::CCPoint *v22; // rcx float v23; // xmm1_4 __int64 v24; // rax char *v25; // rdx __int64 v26; // rbx __int64 v27; // rax __int64 v28; // rax struct cocos2d::CCObject *MainObject; // rax struct cocos2d::CCObject *v30; // rbx __int64 v31; // rax __int64 v32; // rax _DWORD *v33; // rax int v34; // edx float v35; // xmm5_4 float v36; // xmm0_4 float v37; // xmm1_4 float v38; // xmm1_4 float v39; // xmm3_4 float v40; // xmm2_4 float v41; // xmm1_4 float v42; // xmm0_4 float v43; // xmm2_4 float v44; // xmm1_4 float v45; // xmm2_4 float v46; // xmm4_4 float v47; // xmm1_4 int v48; // r8d char v49; // dl int v50; // r12d char v51; // cl char v52; // al __int64 v53; // rax float v54; // xmm1_4 bool v55; // zf int v56; // r14d int v57; // esi int v58; // eax struct cocos2d::CCObject *v59; // r13 int v60; // eax __int64 v61; // rbx struct cocos2d::CCObject *v62; // rax cocos2d::CCDictionary *v63; // rcx int v64; // eax float v65; // xmm9_4 float v66; // xmm8_4 float *v67; // rax float v68; // xmm8_4 unsigned int v69; // r8d unsigned int v70; // edx unsigned int *v71; // rax __int64 v72; // rcx __int64 *v73; // r14 __int64 *v74; // r12 unsigned int v75; // r13d __int64 v76; // rbx __int16 *v77; // r8 float AreaObjectValue; // xmm0_4 float v79; // xmm6_4 __int64 v80; // rbx cocos2d::CCDictionary *v81; // rax struct cocos2d::CCObject *v82; // rbx unsigned int v83; // eax unsigned int *v84; // rbx __int64 v85; // rax __int64 *v86; // rbx __int64 *v87; // rsi int v88; // eax int v89; // eax int v90; // eax unsigned int v91; // eax char v92; // [rsp+50h] [rbp-B0h] float v93; // [rsp+60h] [rbp-A0h] BYREF float v94; // [rsp+64h] [rbp-9Ch] float v95; // [rsp+68h] [rbp-98h] BYREF float v96; // [rsp+6Ch] [rbp-94h] int v97; // [rsp+70h] [rbp-90h] int v98; // [rsp+74h] [rbp-8Ch] int v99; // [rsp+78h] [rbp-88h] int v100; // [rsp+7Ch] [rbp-84h] char v101[8]; // [rsp+80h] [rbp-80h] BYREF int v102; // [rsp+88h] [rbp-78h] int v103; // [rsp+8Ch] [rbp-74h] float v104; // [rsp+90h] [rbp-70h] BYREF int v105; // [rsp+98h] [rbp-68h] struct cocos2d::CCObject *v106; // [rsp+A0h] [rbp-60h] char v107[8]; // [rsp+A8h] [rbp-58h] BYREF char v108[8]; // [rsp+B0h] [rbp-50h] BYREF char v109[8]; // [rsp+B8h] [rbp-48h] BYREF char v110[8]; // [rsp+C0h] [rbp-40h] BYREF float *v111; // [rsp+C8h] [rbp-38h] __int64 v112; // [rsp+D0h] [rbp-30h] char v113; // [rsp+D8h] [rbp-28h] BYREF char v114; // [rsp+E0h] [rbp-20h] BYREF char v115; // [rsp+E8h] [rbp-18h] BYREF char v116; // [rsp+F0h] [rbp-10h] BYREF char v117; // [rsp+F8h] [rbp-8h] BYREF char v118; // [rsp+100h] [rbp+0h] BYREF char v119; // [rsp+108h] [rbp+8h] BYREF char v120; // [rsp+110h] [rbp+10h] BYREF char v121; // [rsp+118h] [rbp+18h] BYREF char v122[8]; // [rsp+120h] [rbp+20h] BYREF char v123[8]; // [rsp+128h] [rbp+28h] BYREF char v124[8]; // [rsp+130h] [rbp+30h] BYREF char v125[8]; // [rsp+138h] [rbp+38h] BYREF char v126[8]; // [rsp+140h] [rbp+40h] BYREF char v127[8]; // [rsp+148h] [rbp+48h] BYREF char v128[8]; // [rsp+150h] [rbp+50h] BYREF char v129[8]; // [rsp+158h] [rbp+58h] BYREF unsigned int v130; // [rsp+250h] [rbp+150h] BYREF unsigned int v131; // [rsp+258h] [rbp+158h] unsigned int v132; // [rsp+260h] [rbp+160h] float v133; // [rsp+268h] [rbp+168h] v133 = a4; v132 = a3; v6 = a3; v8 = a4; v9 = *(_QWORD *)(a1 + 1768); v10 = *(_QWORD *)(v9 + 16 * (*(_QWORD *)(a1 + 1792) & (0x100000001B3LL * (((unsigned __int64)a3 >> 24) ^ (0x100000001B3LL * (BYTE2(a3) ^ (0x100000001B3LL * (BYTE1(a3) ^ (0x100000001B3LL * ((unsigned __int8)a3 ^ 0xCBF29CE484222325uLL))))))))) + 8); if ( v10 == *(_QWORD *)(a1 + 1752) ) { LABEL_6: v10 = 0; goto LABEL_7; } v11 = *(_QWORD *)(v9 + 16 * (*(_QWORD *)(a1 + 1792) & (0x100000001B3LL * (((unsigned __int64)a3 >> 24) ^ (0x100000001B3LL * (BYTE2(a3) ^ (0x100000001B3LL * (BYTE1(a3) ^ (0x100000001B3LL * ((unsigned __int8)a3 ^ 0xCBF29CE484222325uLL)))))))))); if ( a3 != *(_DWORD *)(v10 + 16) ) { while ( v10 != v11 ) { v10 = *(_QWORD *)(v10 + 8); if ( a3 == *(_DWORD *)(v10 + 16) ) goto LABEL_7; } goto LABEL_6; } LABEL_7: if ( v10 ) { sub_140356160(*a2, a2[1], (a2[1] - *a2) / 232, sub_14030B140); v130 = v6; sub_140066A60((_QWORD *)(a1 + 1744), (unsigned __int8 *)&v130); v8 = v133; } result = a2[1]; v13 = *a2; v112 = result; if ( v13 == result ) return result; v14 = _mm_load_si128((const __m128i *)&xmmword_140836C90).m128i_u32[0]; do { if ( *(_BYTE *)(v13 + 188) ) goto LABEL_128; v15 = *(_QWORD *)(v13 + 160); EnterEffectInstance::updateTransitions(v13, v8); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v95); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v104); v17 = *(_DWORD *)(v15 + 1556); v18 = v17 < 0; if ( !v17 ) { v17 = *(_DWORD *)(v13 + 176); v18 = v17 < 0; } if ( v18 ) { if ( v17 == -1 ) goto LABEL_31; if ( v17 != -2 ) { v19 = cocos2d::CCDirector::sharedDirector(v16); cocos2d::CCDirector::getWinSize(v19, &v93); v20 = *(float *)(a1 + 424); v93 = v93 / v20; v94 = v94 / v20; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, (const struct cocos2d::CCPoint *)&dword_14090AA70); switch ( v17 ) { case -11: v21 = v94; v22 = (cocos2d::CCPoint *)&v120; v23 = v93; goto LABEL_28; case -10: v23 = v93; v22 = (cocos2d::CCPoint *)&v119; goto LABEL_27; case -9: v23 = v93; v22 = (cocos2d::CCPoint *)&v118; v21 = 0.0; goto LABEL_28; case -8: v22 = (cocos2d::CCPoint *)&v117; v21 = v94; v23 = v93 * 0.5; goto LABEL_28; case -7: v22 = (cocos2d::CCPoint *)&v116; v23 = v93 * 0.5; v21 = 0.0; goto LABEL_28; case -6: v21 = v94; v22 = (cocos2d::CCPoint *)&v115; v23 = 0.0; goto LABEL_28; case -5: v23 = 0.0; v22 = (cocos2d::CCPoint *)&v114; goto LABEL_27; case -4: v21 = 0.0; v22 = (cocos2d::CCPoint *)&v113; v23 = 0.0; goto LABEL_28; default: v22 = (cocos2d::CCPoint *)&v121; v23 = v93 * 0.5; LABEL_27: v21 = v94 * 0.5; LABEL_28: cocos2d::CCPoint::CCPoint(v22, v23, v21); cocos2d::CCPoint::operator=(v101, v24); cocos2d::CCPoint::operator+(a1 + 1040, v107, v101); cocos2d::CCPoint::operator=(&v95, v107); cocos2d::CCPoint::operator-(a1 + 1040, v108, a1 + 1292); v25 = v108; break; } goto LABEL_38; } if ( !*(_BYTE *)(a1 + 1058) ) LABEL_31: v26 = *(_QWORD *)(a1 + 3512); else v26 = *(_QWORD *)(a1 + 3520); v27 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v26 + 200LL))(v26); cocos2d::CCPoint::operator=(&v95, v27); v28 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v26 + 200LL))(v26); cocos2d::CCPoint::operator-(v28, v109, v26 + 1232); v25 = v109; } else { MainObject = GJBaseGameLayer::tryGetMainObject(a1, v17); v30 = MainObject; if ( !MainObject ) goto LABEL_39; if ( v6 - 3 > 1 && GJBaseGameLayer::resetAreaObjectValues(a1, (__int64)MainObject, 1) ) (*(void (__fastcall **)(__int64, struct cocos2d::CCObject *))(*(_QWORD *)a1 + 1216LL))(a1, v30); v31 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *, char *))(*(_QWORD *)v30 + 1208LL))(v30, v122); cocos2d::CCPoint::operator=(&v95, v31); v32 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *, char *))(*(_QWORD *)v30 + 1208LL))(v30, v123); cocos2d::CCPoint::operator-(v32, v110, (char *)v30 + 1232); v25 = v110; } LABEL_38: cocos2d::CCPoint::operator=(&v104, v25); LABEL_39: v33 = (_DWORD *)(v13 + 40); v34 = (int)(float)((float)((float)(*(float *)(v13 + 20) + *(float *)(v13 + 16)) + *(float *)(v13 + 24)) + *(float *)(v13 + 28)); *(_DWORD *)(v15 + 2076) = v34; if ( COERCE_FLOAT(*(_DWORD *)(v13 + 44) & v14) <= COERCE_FLOAT(*(_DWORD *)(v13 + 40) & v14) ) v33 = (_DWORD *)(v13 + 44); v35 = (float)(1.0 / COERCE_FLOAT(*v33 & v14)) * (float)v34; v36 = *(float *)(a1 + 14240); v37 = v95 - v35; if ( (float)(v95 - v35) > 0.0 ) { if ( v37 < 10000000.0 ) v38 = v37 * v36; else v38 = v36 * 10000000.0; } else { v38 = 0.0; } v39 = *(float *)(a1 + 14240); v40 = v95 + v35; v99 = (int)v38; if ( (float)(v95 + v35) > 0.0 ) { v39 = v36; if ( v40 < 10000000.0 ) v41 = v36 * v40; else v41 = v36 * 10000000.0; } else { v41 = 0.0; } v42 = *(float *)(a1 + 14244); v43 = v96 - v35; v98 = (int)v41; if ( (float)(v96 - v35) > 0.0 ) { if ( v43 < 10000000.0 ) v44 = v42 * v43; else v44 = v42 * 10000000.0; } else { v44 = 0.0; } v45 = v42; v46 = v96 + v35; v97 = (int)v44; if ( (float)(v96 + v35) > 0.0 ) { v45 = v42; if ( v46 < 10000000.0 ) v47 = v42 * v46; else v47 = v42 * 10000000.0; } else { v47 = 0.0; } v48 = *(_DWORD *)(v15 + 1984); v49 = *(_BYTE *)(v15 + 2028); v50 = (int)v47; v100 = (int)v47; if ( v48 == 1 ) { v100 = (int)(float)(v45 * 10000000.0); v50 = v100; v51 = *(_BYTE *)(v15 + 2036); v97 = 0; if ( v49 ) { v98 = (int)(float)(v39 * 10000000.0); if ( !v51 ) goto LABEL_76; goto LABEL_75; } if ( !v51 ) goto LABEL_75; } else { if ( v48 == 2 ) { v98 = (int)(float)(v39 * 10000000.0); v52 = *(_BYTE *)(v15 + 2036); v99 = 0; if ( v49 ) { v100 = (int)(float)(v45 * 10000000.0); v50 = v100; if ( v52 ) v97 = 0; } else if ( !v52 ) { v97 = 0; } goto LABEL_76; } if ( v49 ) { v98 = (int)(float)(v39 * 10000000.0); v50 = (int)(float)(v45 * 10000000.0); v97 = 0; v100 = v50; LABEL_75: v99 = 0; } } LABEL_76: if ( v104 != 0.0 ) *(_BYTE *)(v15 + 2072) = v104 < 0.0; *(_DWORD *)(v13 + 184) += 2; if ( !v6 ) { if ( *(float *)(v13 + 64) == 0.0 ) { *(_BYTE *)(v15 + 1916) = 1; v53 = cocos2d::ccpForAngle(v124); cocos2d::CCPoint::operator=(v15 + 1920, v53); } else { *(_BYTE *)(v15 + 1916) = 0; } } if ( *(_DWORD *)(v15 + 1984) ) { *(_DWORD *)(v13 + 32) = *(_DWORD *)(v13 + 24); *(_DWORD *)(v13 + 36) = *(_DWORD *)(v13 + 28); } v54 = v96 + *(float *)(v13 + 32); v95 = v95 + *(float *)(v13 + 24); v96 = v54; if ( *(_BYTE *)(v15 + 2036) ) *(float *)(v13 + 40) = -COERCE_FLOAT(*(_DWORD *)(v13 + 40) & v14); v55 = *(_DWORD *)(v13 + 192) == 0; v18 = *(int *)(v13 + 192) < 0; v56 = 0; v102 = 0; v103 = 0; v57 = 0; v105 = (!v18 && !v55) + 1; do { v58 = *(_DWORD *)(v13 + 192); if ( v58 <= 0 ) { v60 = *(_DWORD *)(v13 + 172); if ( v60 > 9999 ) v60 = 9999; if ( v60 < 0 ) v60 = 0; v61 = (unsigned int)v60; v59 = *(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 3896) + 8LL * (unsigned int)v60); v106 = v59; if ( !v59 ) { v62 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(9999); v63 = *(cocos2d::CCDictionary **)(a1 + 3872); v106 = v62; v59 = v62; cocos2d::CCDictionary::setObject(v63, v62, (unsigned int)v61); *(_QWORD *)(*(_QWORD *)(a1 + 3896) + 8 * v61) = v59; } } else { v59 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 4184), v57 + v58 - 1); v106 = v59; } switch ( v132 ) { case 0u: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v129, (const struct cocos2d::CCPoint *)&v95); GJBaseGameLayer::processAreaMoveGroupAction(a1, (_DWORD)v59, v13, v90, v99, v98, v97, v50, v56, v57 == 1, v92); goto LABEL_126; case 1u: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v128, (const struct cocos2d::CCPoint *)&v95); GJBaseGameLayer::processAreaRotateGroupAction( a1, (_DWORD)v59, v13, v89, v99, v98, v97, v50, v56, v57 == 1, a5); goto LABEL_126; case 2u: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v127, (const struct cocos2d::CCPoint *)&v95); GJBaseGameLayer::processAreaTransformGroupAction( a1, (_DWORD)v59, v13, v88, v99, v98, v97, v50, v56, v57 == 1, a5); goto LABEL_126; } if ( v132 != 3 ) { if ( v132 == 4 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v125, (const struct cocos2d::CCPoint *)&v95); GJBaseGameLayer::processAreaTintGroupAction(a1, (_DWORD)v59, v13, v64, v57 == 1); } goto LABEL_126; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v126, (const struct cocos2d::CCPoint *)&v95); v65 = *(float *)(v13 + 124); v66 = *(float *)(v13 + 120); v111 = v67; v68 = v66 - v65; *(_DWORD *)(a1 + 14352) += cocos2d::CCArray::count(v59); v69 = 0; v70 = 0; v131 = 0; if ( !v59 ) goto LABEL_122; v71 = *((unsigned int **)v59 + 7); v72 = *v71; if ( !(_DWORD)v72 ) goto LABEL_122; v73 = *((__int64 **)v71 + 2); v74 = &v73[v72 - 1]; if ( v73 > v74 ) goto LABEL_121; v75 = 0; while ( 1 ) { v76 = *v73; if ( !*v73 ) break; if ( *(_BYTE *)(v76 + 773) ) { v77 = (__int16 *)*v73; LOBYTE(v130) = 0; ++v75; AreaObjectValue = GJBaseGameLayer::getAreaObjectValue(a1, v13, v77, v111, (bool *)&v130); v79 = (float)(AreaObjectValue * v68) + v65; if ( v57 == 1 ) { v80 = *(int *)(v76 + 924); v81 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 4184), *(_DWORD *)(v13 + 192) + 1); v82 = cocos2d::CCDictionary::objectForKey(v81, v80); v83 = cocos2d::CCArray::count(v82); v69 = v83 + v131 - 1; v131 = v69; if ( v82 ) { v84 = *((unsigned int **)v82 + 7); v85 = *v84; if ( (_DWORD)v85 ) { v86 = *((__int64 **)v84 + 2); v87 = &v86[v85 - 1]; if ( v86 > v87 ) { v57 = v103; } else { do { if ( !*v86 ) break; GameObject::setAreaOpacity(*v86++, v79, AreaObjectValue, *(_DWORD *)(a1 + 992)); } while ( v86 <= v87 ); v57 = v103; v69 = v131; } } } goto LABEL_117; } GameObject::setAreaOpacity(v76, v79, AreaObjectValue, *(_DWORD *)(a1 + 992)); } v69 = v131; LABEL_117: if ( ++v73 > v74 ) goto LABEL_120; } v69 = v131; LABEL_120: v130 = v75; v59 = v106; v70 = v130; LABEL_121: v56 = v102; LABEL_122: *(_DWORD *)(a1 + 14352) += v69; *(_DWORD *)(a1 + 14368) += v69 + v70; LABEL_126: v91 = cocos2d::CCArray::count(v59); v50 = v100; ++v57; v56 += v91; v103 = v57; v102 = v56; } while ( v57 < v105 ); v6 = v132; result = v112; LABEL_128: v8 = v133; v13 += 232; } while ( v13 != result ); return result; }