{"type": "func", "start": 4296255040, "end": 4296255328, "name": "GJBaseGameLayer::applyShake", "pseudocode": "// \n// GJBaseGameLayer::applyShake from 0x10013a640 to 0x10013a760 (288 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:24:52 +0000\n// \n\nvoid __fastcall GJBaseGameLayer::applyShake(__int64 a1, double *a2)\n{\n  double v2; // xmm0_8\n  double v3; // xmm1_8\n  char v4; // r15\n  __m128 v5; // xmm0\n  __m128 v6; // xmm0\n  __m128 v7; // xmm1\n  float v8; // xmm2_4\n  float v9; // xmm1_4\n  __m128 v10; // xmm0\n  __m128 inserted; // xmm1\n  __m128 v12; // [rsp+0h] [rbp-30h]\n\n  v2 = *(double *)(a1 + 920);\n  v3 = *(double *)(a1 + 1240);\n  if ( v3 < 0.0 || (v8 = *(float *)(a1 + 1232), v8 <= 0.0) || (v9 = v2 - v3, v9 > v8) )\n  {\n    *(double *)(a1 + 1240) = v2;\n    v4 = *(_BYTE *)(a1 + 12648);\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 ( v4 == 1 )\n    {\n      v7 = _mm_blendv_ps(\n             (__m128)xmmword_100A041E0,\n             (__m128)xmmword_100A038B0,\n             _mm_cmplt_ps((__m128)xmmword_100A04CE0, _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_100A041E0);\n    }\n    v10 = _mm_mul_ps(_mm_moveldup_ps((__m128)*(unsigned int *)(a1 + 1228)), v7);\n    _mm_storel_ps((double *)(a1 + 1248), v10);\n  }\n  else\n  {\n    v10 = (__m128)*(unsigned __int64 *)(a1 + 1248);\n  }\n  _mm_storel_ps(a2, _mm_add_ps((__m128)*(unsigned __int64 *)a2, v10));\n}", "assembly": "; \n; GJBaseGameLayer::applyShake from 0x10013a640 to 0x10013a760 (288 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:24:52 +0000\n; \npush    rbp                                                            ; +0x0, 0x10013a640\nmov     rbp, rsp                                                       ; +0x1, 0x10013a641\npush    r15                                                            ; +0x4, 0x10013a644\npush    r14                                                            ; +0x6, 0x10013a646\npush    rbx                                                            ; +0x8, 0x10013a648\nsub     rsp, 18h                                                       ; +0x9, 0x10013a649\nmov     rbx, rsi                                                       ; +0xd, 0x10013a64d\nmov     r14, rdi                                                       ; +0x10, 0x10013a650\nmovsd   xmm0, qword ptr [rdi+398h]                                     ; +0x13, 0x10013a653\nmovsd   xmm1, qword ptr [rdi+4D8h]                                     ; +0x1b, 0x10013a65b\nxorpd   xmm2, xmm2                                                     ; +0x23, 0x10013a663\nucomisd xmm2, xmm1                                                     ; +0x27, 0x10013a667\njbe     short loc_10013A6D7                                            ; +0x2b, 0x10013a66b\nmovsd   qword ptr [r14+4D8h], xmm0                                     ; +0x2d, 0x10013a66d\nmovzx   r15d, byte ptr [r14+3168h]                                     ; +0x36, 0x10013a676\ncall    _rand                                                          ; +0x3e, 0x10013a67e\nxorps   xmm0, xmm0                                                     ; +0x43, 0x10013a683\ncvtsi2ss xmm0, eax                                                     ; +0x46, 0x10013a686\nmulss   xmm0, cs:dword_100A03A50                                       ; +0x4a, 0x10013a68a\nmovaps  [rbp+var_30], xmm0                                             ; +0x52, 0x10013a692\ncmp     r15b, 1                                                        ; +0x56, 0x10013a696\njnz     short loc_10013A70B                                            ; +0x5a, 0x10013a69a\ncall    _rand                                                          ; +0x5c, 0x10013a69c\nxorps   xmm0, xmm0                                                     ; +0x61, 0x10013a6a1\ncvtsi2ss xmm0, eax                                                     ; +0x64, 0x10013a6a4\nmulss   xmm0, cs:dword_100A03A50                                       ; +0x68, 0x10013a6a8\nmovaps  xmm1, [rbp+var_30]                                             ; +0x70, 0x10013a6b0\ninsertps xmm1, xmm0, 10h                                               ; +0x74, 0x10013a6b4\nmovaps  xmm0, cs:xmmword_100A04CE0                                     ; +0x7a, 0x10013a6ba\ncmpltps xmm0, xmm1                                                     ; +0x81, 0x10013a6c1\nmovaps  xmm1, cs:xmmword_100A041E0                                     ; +0x85, 0x10013a6c5\nblendvps xmm1, cs:xmmword_100A038B0                                    ; +0x8c, 0x10013a6cc\njmp     short loc_10013A733                                            ; +0x95, 0x10013a6d5\nmovss   xmm2, dword ptr [r14+4D0h]                                     ; +0x97, 0x10013a6d7\nxorps   xmm3, xmm3                                                     ; +0xa0, 0x10013a6e0\nucomiss xmm3, xmm2                                                     ; +0xa3, 0x10013a6e3\njnb     short loc_10013A66D                                            ; +0xa6, 0x10013a6e6\nmovapd  xmm3, xmm0                                                     ; +0xa8, 0x10013a6e8\nsubsd   xmm3, xmm1                                                     ; +0xac, 0x10013a6ec\nxorps   xmm1, xmm1                                                     ; +0xb0, 0x10013a6f0\ncvtsd2ss xmm1, xmm3                                                    ; +0xb3, 0x10013a6f3\nucomiss xmm1, xmm2                                                     ; +0xb7, 0x10013a6f7\nja      loc_10013A66D                                                  ; +0xba, 0x10013a6fa\nmovsd   xmm0, qword ptr [r14+4E0h]                                     ; +0xc0, 0x10013a700\njmp     short loc_10013A74B                                            ; +0xc9, 0x10013a709\ncall    _rand                                                          ; +0xcb, 0x10013a70b\nxorps   xmm0, xmm0                                                     ; +0xd0, 0x10013a710\ncvtsi2ss xmm0, eax                                                     ; +0xd3, 0x10013a713\nmulss   xmm0, cs:dword_100A03A50                                       ; +0xd7, 0x10013a717\nmovaps  xmm1, [rbp+var_30]                                             ; +0xdf, 0x10013a71f\ninsertps xmm1, xmm0, 10h                                               ; +0xe3, 0x10013a723\naddps   xmm1, xmm1                                                     ; +0xe9, 0x10013a729\naddps   xmm1, cs:xmmword_100A041E0                                     ; +0xec, 0x10013a72c\nmovss   xmm0, dword ptr [r14+4CCh]                                     ; +0xf3, 0x10013a733\nmovsldup xmm0, xmm0                                                    ; +0xfc, 0x10013a73c\nmulps   xmm0, xmm1                                                     ; +0x100, 0x10013a740\nmovlps  qword ptr [r14+4E0h], xmm0                                     ; +0x103, 0x10013a743\nmovsd   xmm1, qword ptr [rbx]                                          ; +0x10b, 0x10013a74b\naddps   xmm1, xmm0                                                     ; +0x10f, 0x10013a74f\nmovlps  qword ptr [rbx], xmm1                                          ; +0x112, 0x10013a752\nadd     rsp, 18h                                                       ; +0x115, 0x10013a755\npop     rbx                                                            ; +0x119, 0x10013a759\npop     r14                                                            ; +0x11a, 0x10013a75a\npop     r15                                                            ; +0x11c, 0x10013a75c\npop     rbp                                                            ; +0x11e, 0x10013a75e\nretn                                                                   ; +0x11f, 0x10013a75f", "xrefs": [], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}