// // GJBaseGameLayer::spawnParticleTrigger from 0x1001065c0 to 0x1001069a7 (999 bytes) // // 2 xrefs: // > GJBaseGameLayer::destroyObject @ 0x10010623d // > GJBaseGameLayer::spawnParticleTrigger_1 @ 0x10013c08a // // 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 12:21:32 +0000 // __int64 __fastcall GJBaseGameLayer::spawnParticleTrigger(__int64 a1, int a2, __int64 a3, float a4, __m128 a5) { int v5; // eax __int64 v6; // r12 __int64 v7; // r14 __int64 v8; // r15 __int64 MainObject; // rbx __int64 v10; // rax __int64 result; // rax __m128 v12; // xmm1 __m128 v13; // xmm0 unsigned int v14; // r13d float v15; // xmm0_4 float v16; // xmm0_4 float v17; // xmm0_4 double v18; // xmm0_8 __int64 v19; // rax __int64 v20; // r12 unsigned int ObjectZLayer; // ebx unsigned int ObjectZOrder; // eax __int64 v23; // rbx __int64 v24; // rax __m128 v25; // xmm0 __m128 v26; // xmm1 _BYTE v27[8]; // [rsp+10h] [rbp-C0h] BYREF _BYTE v28[8]; // [rsp+18h] [rbp-B8h] BYREF __m128 v29; // [rsp+20h] [rbp-B0h] __m128 v30; // [rsp+30h] [rbp-A0h] __int64 v31; // [rsp+40h] [rbp-90h] __int64 v32; // [rsp+48h] [rbp-88h] __int64 v33; // [rsp+50h] [rbp-80h] _BYTE v34[8]; // [rsp+58h] [rbp-78h] BYREF unsigned __int64 v35; // [rsp+60h] [rbp-70h] BYREF __int64 v36; // [rsp+68h] [rbp-68h] __m128 v37; // [rsp+70h] [rbp-60h] __int128 v38; // [rsp+80h] [rbp-50h] BYREF void *__p; // [rsp+90h] [rbp-40h] float v40; // [rsp+A4h] [rbp-2Ch] v37 = a5; v40 = a4; v36 = a3; v5 = 9999; if ( a2 < 9999 ) v5 = a2; v6 = 0; if ( v5 > 0 ) v6 = (unsigned int)v5; v7 = a1; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 3616) + 8 * v6); if ( !v8 ) { v8 = sub_1007FE900(a1); cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3592), v8, v6); *(_QWORD *)(*(_QWORD *)(a1 + 3616) + 8 * v6) = v8; } sub_1002782A0(v34); MainObject = GJBaseGameLayer::tryGetMainObject(a1); if ( MainObject ) { v10 = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)MainObject + 192LL))(MainObject, (unsigned int)a2); sub_100278300(v34, v10); } v31 = MainObject; result = sub_1007FEF90(v8); if ( (_DWORD)result ) { v12 = _mm_cmpeq_ss((__m128)0LL, v37); v37 = _mm_or_ps(_mm_andnot_ps(v12, v37), _mm_and_ps((__m128)0x3F800000u, v12)); v13 = (__m128)0xBC8EFA35; *(__float2 *)v13.f32 = __sincosf_stret(-0.017453292 * v40); v29 = v13; v30 = _mm_shuffle_ps(v13, v13, 225); v14 = 0; v32 = a1; v33 = v8; do { v19 = sub_1007FEFE0(v8, v14); if ( *(_DWORD *)(v19 + 1028) != 2065 ) goto LABEL_12; v20 = v19; ParticleGameObject::updateParticleStruct(v19); if ( (*(_BYTE *)(v20 + 1448) & 1) != 0 ) { sub_10001AD30(&v38, *(const void **)(v20 + 1464), *(_QWORD *)(v20 + 1456)); } else { __p = *(void **)(v20 + 1464); v38 = *(_OWORD *)(v20 + 1448); } ObjectZLayer = GameObject::getObjectZLayer(v20); ObjectZOrder = GameObject::getObjectZOrder(v20); v23 = (*(__int64 (__fastcall **)(__int64, __int128 *, __int64, _QWORD, _QWORD, _QWORD, int))(*(_QWORD *)v7 + 1504LL))( v7, &v38, v20 + 1480, ObjectZLayer, ObjectZOrder, 0, 1); if ( (v38 & 1) != 0 ) operator delete(__p); if ( !v23 ) goto LABEL_12; if ( v31 ) { v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL))(v20); sub_1002782D0(&v38, v24); if ( v40 != 0.0 ) { sub_1002782D0(&v35, v34); v25 = (__m128)(unsigned int)v38; v26 = (__m128)DWORD1(v38); v25.f32[0] = *(float *)&v38 - *(float *)&v35; v26.f32[0] = *((float *)&v38 + 1) - _mm_movehdup_ps((__m128)v35).f32[0]; _mm_storel_ps( (double *)&v38, _mm_add_ps( _mm_add_ps( _mm_mul_ps(_mm_moveldup_ps(v25), v30), _mm_mul_ps(_mm_insert_ps(_mm_xor_ps(v26, (__m128)xmmword_100A035F0), v26, 28), v29)), (__m128)v35)); } sub_100278370(v28, &v38, v34); sub_1002783B0(v27, v28, v37.f32[0]); sub_100278350(&v35, v36, v27); sub_100278300(&v38, &v35); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v23 + 184LL))(v23, &v38); v7 = v32; v8 = v33; if ( *(_BYTE *)(v20 + 809) ) { LABEL_27: (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 1488LL))(v7, v20); goto LABEL_28; } } else { (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v23 + 184LL))(v23, v36); if ( *(_BYTE *)(v20 + 809) ) goto LABEL_27; } if ( *(_BYTE *)(v20 + 1768) == 1 ) goto LABEL_27; LABEL_28: ParticleGameObject::applyParticleSettings(v20, v23); if ( (*(float (__fastcall **)(__int64))(*(_QWORD *)v23 + 920LL))(v23) < 0.0 ) (*(void (__fastcall **)(__int64, double))(*(_QWORD *)v23 + 928LL))(v23, 0.0); v15 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v20 + 368LL))(v20); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v23 + 360LL))(v23, v15 + v40); v16 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v20 + 136LL))(v20); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v23 + 128LL))(v23, v16 * v37.f32[0]); v17 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v20 + 152LL))(v20); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v23 + 144LL))(v23, v17 * v37.f32[0]); v18 = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)v20 + 344LL))(v20, 1); cocos2d::CCParticleSystem::resumeSystem(v23, v18); LABEL_12: ++v14; result = sub_1007FEF90(v8); } while ( v14 < (unsigned int)result ); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source