{"type": "func", "start": 4296312528, "end": 4296312856, "name": "GJBaseGameLayer::modifyObjectPhysics", "pseudocode": "// \n// GJBaseGameLayer::modifyObjectPhysics from 0x1001486d0 to 0x100148818 (328 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::triggerAdvancedFollowEditCommand @ 0x10014810b\n// > GJBaseGameLayer::modifyGroupPhysics @ 0x1001484f5\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall GJBaseGameLayer::modifyObjectPhysics(\n        GJBaseGameLayer *a1,\n        AdvancedFollowEditObject *a2,\n        GameObjectPhysics *a3)\n{\n  __m128 m_modXVariance_low; // xmm0\n  __m128 v5; // xmm0\n  float v6; // xmm0_4\n  float v7; // xmm0_4\n  __m128 v8; // [rsp+0h] [rbp-60h]\n  float m_startDirectionVariance; // [rsp+0h] [rbp-60h]\n  float v10[2]; // [rsp+18h] [rbp-48h] BYREF\n  __m128 m_modX_low; // [rsp+20h] [rbp-40h]\n  __m128 inserted; // [rsp+30h] [rbp-30h]\n\n  m_modX_low = (__m128)LODWORD(a2->m_modX);\n  m_modXVariance_low = (__m128)LODWORD(a2->m_modXVariance);\n  inserted = m_modXVariance_low;\n  m_modXVariance_low.f32[0] = GameToolbox::fast_rand_0_1();\n  v8 = m_modXVariance_low;\n  inserted = _mm_insert_ps(inserted, (__m128)LODWORD(a2->m_modYVariance), 16);\n  v5 = _mm_insert_ps(m_modX_low, (__m128)LODWORD(a2->m_modY), 16);\n  m_modX_low = v5;\n  v5.f32[0] = GameToolbox::fast_rand_0_1();\n  _mm_storel_ps(\n    (double *)&a3->m_unkPoint1,\n    _mm_mul_ps(\n      (__m128)(unsigned __int64)a3->m_unkPoint1,\n      _mm_add_ps(_mm_mul_ps(_mm_insert_ps(v8, v5, 16), inserted), m_modX_low)));\n  m_modX_low.i32[0] = LODWORD(a2->m_startSpeed);\n  inserted.i32[0] = LODWORD(a2->m_startSpeedVariance);\n  v6 = (float)(GameToolbox::fast_rand_0_1() * inserted.f32[0]) + m_modX_low.f32[0];\n  if ( v6 != 0.0 )\n  {\n    inserted.i32[0] = LODWORD(a2->m_startDirection);\n    m_startDirectionVariance = a2->m_startDirectionVariance;\n    m_modX_low.f32[0] = v6;\n    v7 = GameToolbox::fast_rand_0_1();\n    GJBaseGameLayer::getFollowSpeedVal(\n      (GJBaseGameLayer *)v10,\n      (GameObject *)a1,\n      (int)a3->m_gameObject,\n      a2->m_startSpeedReference,\n      (float)(v7 * m_startDirectionVariance) + inserted.f32[0],\n      m_modX_low.f32[0]);\n    if ( !a2->m_xOnly )\n      a3->m_unkPoint1.y = v10[1] + a3->m_unkPoint1.y;\n    if ( !a2->m_yOnly )\n      a3->m_unkPoint1.x = v10[0] + a3->m_unkPoint1.x;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::modifyObjectPhysics from 0x1001486d0 to 0x100148818 (328 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::triggerAdvancedFollowEditCommand @ 0x10014810b\n; > GJBaseGameLayer::modifyGroupPhysics @ 0x1001484f5\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbp                                                            ; +0x0, 0x1001486d0\nmov     rbp, rsp                                                       ; +0x1, 0x1001486d1\npush    r15                                                            ; +0x4, 0x1001486d4\npush    r14                                                            ; +0x6, 0x1001486d6\npush    rbx                                                            ; +0x8, 0x1001486d8\nsub     rsp, 48h                                                       ; +0x9, 0x1001486d9\nmov     rbx, rdx                                                       ; +0xd, 0x1001486dd\nmov     r14, rsi                                                       ; +0x10, 0x1001486e0\nmov     r15, rdi                                                       ; +0x13, 0x1001486e3\nmovss   xmm0, dword ptr [rsi+820h]                                     ; +0x16, 0x1001486e6\nmovaps  [rbp+var_40], xmm0                                             ; +0x1e, 0x1001486ee\nmovss   xmm0, dword ptr [rsi+824h]                                     ; +0x22, 0x1001486f2\nmovaps  [rbp+var_30], xmm0                                             ; +0x2a, 0x1001486fa\ncall    GameToolbox__fast_rand_0_1                                     ; +0x2e, 0x1001486fe\nmovaps  [rbp+var_60], xmm0                                             ; +0x33, 0x100148703\nmovaps  xmm0, [rbp+var_30]                                             ; +0x37, 0x100148707\ninsertps xmm0, dword ptr [r14+82Ch], 10h                               ; +0x3b, 0x10014870b\nmovaps  [rbp+var_30], xmm0                                             ; +0x46, 0x100148716\nmovaps  xmm0, [rbp+var_40]                                             ; +0x4a, 0x10014871a\ninsertps xmm0, dword ptr [r14+828h], 10h                               ; +0x4e, 0x10014871e\nmovaps  [rbp+var_40], xmm0                                             ; +0x59, 0x100148729\ncall    GameToolbox__fast_rand_0_1                                     ; +0x5d, 0x10014872d\nmovaps  xmm1, [rbp+var_60]                                             ; +0x62, 0x100148732\ninsertps xmm1, xmm0, 10h                                               ; +0x66, 0x100148736\nmulps   xmm1, [rbp+var_30]                                             ; +0x6c, 0x10014873c\naddps   xmm1, [rbp+var_40]                                             ; +0x70, 0x100148740\nmovsd   xmm0, qword ptr [rbx+8]                                        ; +0x74, 0x100148744\nmulps   xmm0, xmm1                                                     ; +0x79, 0x100148749\nmovlps  qword ptr [rbx+8], xmm0                                        ; +0x7c, 0x10014874c\nmovss   xmm0, dword ptr [r14+734h]                                     ; +0x80, 0x100148750\nmovss   dword ptr [rbp+var_40], xmm0                                   ; +0x89, 0x100148759\nmovss   xmm0, dword ptr [r14+738h]                                     ; +0x8e, 0x10014875e\nmovss   dword ptr [rbp+var_30], xmm0                                   ; +0x97, 0x100148767\ncall    GameToolbox__fast_rand_0_1                                     ; +0x9c, 0x10014876c\nmulss   xmm0, dword ptr [rbp+var_30]                                   ; +0xa1, 0x100148771\naddss   xmm0, dword ptr [rbp+var_40]                                   ; +0xa6, 0x100148776\nxorps   xmm1, xmm1                                                     ; +0xab, 0x10014877b\nucomiss xmm0, xmm1                                                     ; +0xae, 0x10014877e\njnz     short loc_100148789                                            ; +0xb1, 0x100148781\njnp     loc_10014880D                                                  ; +0xb3, 0x100148783\nmovss   xmm1, dword ptr [r14+740h]                                     ; +0xb9, 0x100148789\nmovss   dword ptr [rbp+var_30], xmm1                                   ; +0xc2, 0x100148792\nmovss   xmm1, dword ptr [r14+744h]                                     ; +0xc7, 0x100148797\nmovss   dword ptr [rbp+var_60], xmm1                                   ; +0xd0, 0x1001487a0\nmovss   dword ptr [rbp+var_40], xmm0                                   ; +0xd5, 0x1001487a5\ncall    GameToolbox__fast_rand_0_1                                     ; +0xda, 0x1001487aa\nmulss   xmm0, dword ptr [rbp+var_60]                                   ; +0xdf, 0x1001487af\naddss   xmm0, dword ptr [rbp+var_30]                                   ; +0xe4, 0x1001487b4\nmov     rdx, [rbx]                                                     ; +0xe9, 0x1001487b9\nmov     ecx, [r14+73Ch]                                                ; +0xec, 0x1001487bc\nmov     r8d, [r14+748h]                                                ; +0xf3, 0x1001487c3\nlea     rdi, [rbp+var_48]                                              ; +0xfa, 0x1001487ca\nmov     rsi, r15                                                       ; +0xfe, 0x1001487ce\nmovss   xmm1, dword ptr [rbp+var_40]                                   ; +0x101, 0x1001487d1\ncall    GJBaseGameLayer__getFollowSpeedVal                             ; +0x106, 0x1001487d6\ncmp     byte ptr [r14+754h], 0                                         ; +0x10b, 0x1001487db\njnz     short loc_1001487F4                                            ; +0x113, 0x1001487e3\nmovss   xmm0, [rbp+var_44]                                             ; +0x115, 0x1001487e5\naddss   xmm0, dword ptr [rbx+0Ch]                                      ; +0x11a, 0x1001487ea\nmovss   dword ptr [rbx+0Ch], xmm0                                      ; +0x11f, 0x1001487ef\ncmp     byte ptr [r14+755h], 0                                         ; +0x124, 0x1001487f4\njnz     short loc_10014880D                                            ; +0x12c, 0x1001487fc\nmovss   xmm0, [rbp+var_48]                                             ; +0x12e, 0x1001487fe\naddss   xmm0, dword ptr [rbx+8]                                        ; +0x133, 0x100148803\nmovss   dword ptr [rbx+8], xmm0                                        ; +0x138, 0x100148808\nadd     rsp, 48h                                                       ; +0x13d, 0x10014880d\npop     rbx                                                            ; +0x141, 0x100148811\npop     r14                                                            ; +0x142, 0x100148812\npop     r15                                                            ; +0x144, 0x100148814\npop     rbp                                                            ; +0x146, 0x100148816\nretn                                                                   ; +0x147, 0x100148817", "xrefs": ["GJBaseGameLayer::triggerAdvancedFollowEditCommand @ 0x10014810b", "GJBaseGameLayer::modifyGroupPhysics @ 0x1001484f5"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}