{"type": "func", "start": 4296388944, "end": 4296389232, "name": "GJBaseGameLayer::applyShake", "pseudocode": "// \n// GJBaseGameLayer::applyShake from 0x10015b150 to 0x10015b270 (288 bytes)\n// \n// 0 xrefs:\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::applyShake(GJBaseGameLayer *a1, cocos2d::CCPoint *a2)\n{\n  double m_totalTime; // xmm0_8\n  double m_unkUint64_1; // xmm1_8\n  bool m_staticCameraShake; // r15\n  __m128 v5; // xmm0\n  __m128 v6; // xmm0\n  __m128 v7; // xmm1\n  float m_unkUint16; // xmm2_4\n  float v9; // xmm1_4\n  __m128 m_unkPoint34; // xmm0\n  __m128 inserted; // xmm1\n  __m128 v12; // [rsp+0h] [rbp-30h]\n\n  m_totalTime = a1->m_gameState.m_totalTime;\n  m_unkUint64_1 = a1->m_gameState.m_unkUint64_1;\n  if ( m_unkUint64_1 < 0.0\n    || (m_unkUint16 = a1->m_gameState.m_unkUint16, m_unkUint16 <= 0.0)\n    || (v9 = m_totalTime - m_unkUint64_1, v9 > m_unkUint16) )\n  {\n    a1->m_gameState.m_unkUint64_1 = m_totalTime;\n    m_staticCameraShake = a1->m_staticCameraShake;\n    v5 = 0;\n    v5.f32[0] = (float)rand() * 4.6566129e-10;\n    v12 = v5;\n    v6 = 0;\n    v6.f32[0] = (float)rand() * 4.6566129e-10;\n    if ( m_staticCameraShake )\n    {\n      v7 = _mm_blendv_ps(\n             (__m128)xmmword_1008154C0,\n             (__m128)xmmword_1008154E0,\n             _mm_cmplt_ps((__m128)xmmword_100816970, _mm_insert_ps(v12, v6, 16)));\n    }\n    else\n    {\n      inserted = _mm_insert_ps(v12, v6, 16);\n      v7 = _mm_add_ps(_mm_add_ps(inserted, inserted), (__m128)xmmword_1008154C0);\n    }\n    m_unkPoint34 = _mm_mul_ps(_mm_moveldup_ps((__m128)LODWORD(a1->m_gameState.m_unkUint15)), v7);\n    _mm_storel_ps((double *)&a1->m_gameState.m_unkPoint34, m_unkPoint34);\n  }\n  else\n  {\n    m_unkPoint34 = (__m128)(unsigned __int64)a1->m_gameState.m_unkPoint34;\n  }\n  _mm_storel_ps((double *)a2, _mm_add_ps((__m128)*(_QWORD *)a2, m_unkPoint34));\n}", "assembly": "; \n; GJBaseGameLayer::applyShake from 0x10015b150 to 0x10015b270 (288 bytes)\n; \n; 0 xrefs:\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, 0x10015b150\nmov     rbp, rsp                                                       ; +0x1, 0x10015b151\npush    r15                                                            ; +0x4, 0x10015b154\npush    r14                                                            ; +0x6, 0x10015b156\npush    rbx                                                            ; +0x8, 0x10015b158\nsub     rsp, 18h                                                       ; +0x9, 0x10015b159\nmov     rbx, rsi                                                       ; +0xd, 0x10015b15d\nmov     r14, rdi                                                       ; +0x10, 0x10015b160\nmovsd   xmm0, qword ptr [rdi+398h]                                     ; +0x13, 0x10015b163\nmovsd   xmm1, qword ptr [rdi+4D8h]                                     ; +0x1b, 0x10015b16b\nxorpd   xmm2, xmm2                                                     ; +0x23, 0x10015b173\nucomisd xmm2, xmm1                                                     ; +0x27, 0x10015b177\njbe     short loc_10015B1E7                                            ; +0x2b, 0x10015b17b\nmovsd   qword ptr [r14+4D8h], xmm0                                     ; +0x2d, 0x10015b17d\nmovzx   r15d, byte ptr [r14+30B0h]                                     ; +0x36, 0x10015b186\ncall    _rand                                                          ; +0x3e, 0x10015b18e\nxorps   xmm0, xmm0                                                     ; +0x43, 0x10015b193\ncvtsi2ss xmm0, eax                                                     ; +0x46, 0x10015b196\nmulss   xmm0, cs:dword_100815710                                       ; +0x4a, 0x10015b19a\nmovaps  [rbp+var_30], xmm0                                             ; +0x52, 0x10015b1a2\ncmp     r15b, 1                                                        ; +0x56, 0x10015b1a6\njnz     short loc_10015B21B                                            ; +0x5a, 0x10015b1aa\ncall    _rand                                                          ; +0x5c, 0x10015b1ac\nxorps   xmm0, xmm0                                                     ; +0x61, 0x10015b1b1\ncvtsi2ss xmm0, eax                                                     ; +0x64, 0x10015b1b4\nmulss   xmm0, cs:dword_100815710                                       ; +0x68, 0x10015b1b8\nmovaps  xmm1, [rbp+var_30]                                             ; +0x70, 0x10015b1c0\ninsertps xmm1, xmm0, 10h                                               ; +0x74, 0x10015b1c4\nmovaps  xmm0, cs:xmmword_100816970                                     ; +0x7a, 0x10015b1ca\ncmpltps xmm0, xmm1                                                     ; +0x81, 0x10015b1d1\nmovaps  xmm1, cs:xmmword_1008154C0                                     ; +0x85, 0x10015b1d5\nblendvps xmm1, cs:xmmword_1008154E0                                    ; +0x8c, 0x10015b1dc\njmp     short loc_10015B243                                            ; +0x95, 0x10015b1e5\nmovss   xmm2, dword ptr [r14+4D0h]                                     ; +0x97, 0x10015b1e7\nxorps   xmm3, xmm3                                                     ; +0xa0, 0x10015b1f0\nucomiss xmm3, xmm2                                                     ; +0xa3, 0x10015b1f3\njnb     short loc_10015B17D                                            ; +0xa6, 0x10015b1f6\nmovapd  xmm3, xmm0                                                     ; +0xa8, 0x10015b1f8\nsubsd   xmm3, xmm1                                                     ; +0xac, 0x10015b1fc\nxorps   xmm1, xmm1                                                     ; +0xb0, 0x10015b200\ncvtsd2ss xmm1, xmm3                                                    ; +0xb3, 0x10015b203\nucomiss xmm1, xmm2                                                     ; +0xb7, 0x10015b207\nja      loc_10015B17D                                                  ; +0xba, 0x10015b20a\nmovsd   xmm0, qword ptr [r14+4E0h]                                     ; +0xc0, 0x10015b210\njmp     short loc_10015B25B                                            ; +0xc9, 0x10015b219\ncall    _rand                                                          ; +0xcb, 0x10015b21b\nxorps   xmm0, xmm0                                                     ; +0xd0, 0x10015b220\ncvtsi2ss xmm0, eax                                                     ; +0xd3, 0x10015b223\nmulss   xmm0, cs:dword_100815710                                       ; +0xd7, 0x10015b227\nmovaps  xmm1, [rbp+var_30]                                             ; +0xdf, 0x10015b22f\ninsertps xmm1, xmm0, 10h                                               ; +0xe3, 0x10015b233\naddps   xmm1, xmm1                                                     ; +0xe9, 0x10015b239\naddps   xmm1, cs:xmmword_1008154C0                                     ; +0xec, 0x10015b23c\nmovss   xmm0, dword ptr [r14+4CCh]                                     ; +0xf3, 0x10015b243\nmovsldup xmm0, xmm0                                                    ; +0xfc, 0x10015b24c\nmulps   xmm0, xmm1                                                     ; +0x100, 0x10015b250\nmovlps  qword ptr [r14+4E0h], xmm0                                     ; +0x103, 0x10015b253\nmovsd   xmm1, qword ptr [rbx]                                          ; +0x10b, 0x10015b25b\naddps   xmm1, xmm0                                                     ; +0x10f, 0x10015b25f\nmovlps  qword ptr [rbx], xmm1                                          ; +0x112, 0x10015b262\nadd     rsp, 18h                                                       ; +0x115, 0x10015b265\npop     rbx                                                            ; +0x119, 0x10015b269\npop     r14                                                            ; +0x11a, 0x10015b26a\npop     r15                                                            ; +0x11c, 0x10015b26c\npop     rbp                                                            ; +0x11e, 0x10015b26e\nretn                                                                   ; +0x11f, 0x10015b26f", "xrefs": [], "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"}