{"type": "func", "start": 5372112800, "end": 5372113133, "name": "GJBaseGameLayer::applyTimeWarp", "pseudocode": "// \n// GJBaseGameLayer::applyTimeWarp from 0x14033efa0 to 0x14033f0ed (333 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x14076b880\n// > <???> @ 0x14078b2f8\n// > <???> @ 0x1407d5ee0\n// > <???> @ 0x14091fd0c\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 11:30:38 +0000\n// \n\n// Hidden C++ exception states: #wind=1\ndouble __fastcall GJBaseGameLayer::applyTimeWarp(__int64 a1, float a2)\n{\n  float v2; // xmm7_4\n  float v4; // xmm6_4\n  __int64 v5; // rax\n  __int64 v6; // rcx\n  double result; // xmm0_8\n  __int64 v8; // rax\n  _QWORD *v9; // rbx\n  void *v10; // [rsp+50h] [rbp+8h]\n  float v11; // [rsp+58h] [rbp+10h] BYREF\n\n  v2 = a2;\n  *(float *)(a1 + 824) = a2;\n  v4 = 1.0;\n  if ( fabs(*(float *)(a1 + 13664) - 1.0) >= 0.0099999998 && !*(_BYTE *)(a1 + 2214) )\n    v2 = *(float *)(a1 + 13664) * a2;\n  v5 = cocos2d::CCDirector::sharedDirector(a1);\n  *(_QWORD *)&result = *(unsigned int *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 112LL))(v5) + 56);\n  if ( *(float *)&result != v2 && *(_BYTE *)(a1 + 13144) )\n  {\n    v8 = cocos2d::CCDirector::sharedDirector(v6);\n    *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 112LL))(v8) + 56) = v2;\n    if ( !*(_BYTE *)(a1 + 2214) )\n      v4 = *(float *)(a1 + 13668);\n    v9 = (_QWORD *)qword_14090BF60;\n    if ( !qword_14090BF60 )\n    {\n      v10 = operator new(0x8A8u);\n      qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v10);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n      v9 = (_QWORD *)qword_14090BF60;\n    }\n    v11 = 1.0;\n    FMOD::ChannelControl::getPitch(v9[69], &v11);\n    if ( v4 != v11 )\n    {\n      FMOD::ChannelControl::setPitch(v9[69]);\n      FMOD::ChannelControl::setPitch(v9[73]);\n      return FMOD::ChannelControl::setPitch(v9[74]);\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::applyTimeWarp from 0x14033efa0 to 0x14033f0ed (333 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x14076b880\n; > <???> @ 0x14078b2f8\n; > <???> @ 0x1407d5ee0\n; > <???> @ 0x14091fd0c\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 11:30:38 +0000\n; \npush    rbx                                                            ; +0x0, 0x14033efa0\nsub     rsp, 40h                                                       ; +0x2, 0x14033efa2\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x6, 0x14033efa6\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0xb, 0x14033efab\nmovaps  xmm7, xmm1                                                     ; +0x10, 0x14033efb0\nmov     rbx, rcx                                                       ; +0x13, 0x14033efb3\nmovss   dword ptr [rcx+338h], xmm7                                     ; +0x16, 0x14033efb6\nmovss   xmm1, dword ptr [rcx+3560h]                                    ; +0x1e, 0x14033efbe\nmovaps  xmm0, xmm1                                                     ; +0x26, 0x14033efc6\nmovss   xmm6, cs:flt_140835080                                         ; +0x29, 0x14033efc9\nsubss   xmm0, xmm6                                                     ; +0x31, 0x14033efd1\nandps   xmm0, cs:xmmword_140836C90                                     ; +0x35, 0x14033efd5\ncomiss  xmm0, cs:dword_140834D9C                                       ; +0x3c, 0x14033efdc\njb      short loc_14033EFF5                                            ; +0x43, 0x14033efe3\ncmp     byte ptr [rcx+8A6h], 0                                         ; +0x45, 0x14033efe5\njnz     short loc_14033EFF5                                            ; +0x4c, 0x14033efec\nmulss   xmm1, xmm7                                                     ; +0x4e, 0x14033efee\nmovaps  xmm7, xmm1                                                     ; +0x52, 0x14033eff2\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x55, 0x14033eff5\nmov     rcx, [rax]                                                     ; +0x5b, 0x14033effb\nmov     rdx, [rcx+70h]                                                 ; +0x5e, 0x14033effe\nmov     rcx, rax                                                       ; +0x62, 0x14033f002\ncall    rdx                                                            ; +0x65, 0x14033f005\nmovss   xmm0, dword ptr [rax+38h]                                      ; +0x67, 0x14033f007\nucomiss xmm0, xmm7                                                     ; +0x6c, 0x14033f00c\njp      short loc_14033F017                                            ; +0x6f, 0x14033f00f\njz      loc_14033F0DD                                                  ; +0x71, 0x14033f011\ncmp     byte ptr [rbx+3358h], 0                                        ; +0x77, 0x14033f017\njz      loc_14033F0DD                                                  ; +0x7e, 0x14033f01e\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x84, 0x14033f024\nmov     rcx, [rax]                                                     ; +0x8a, 0x14033f02a\nmov     rdx, [rcx+70h]                                                 ; +0x8d, 0x14033f02d\nmov     rcx, rax                                                       ; +0x91, 0x14033f031\ncall    rdx                                                            ; +0x94, 0x14033f034\nmovss   dword ptr [rax+38h], xmm7                                      ; +0x96, 0x14033f036\ncmp     byte ptr [rbx+8A6h], 0                                         ; +0x9b, 0x14033f03b\njnz     short loc_14033F04C                                            ; +0xa2, 0x14033f042\nmovss   xmm6, dword ptr [rbx+3564h]                                    ; +0xa4, 0x14033f044\nmov     rbx, cs:qword_14090BF60                                        ; +0xac, 0x14033f04c\ntest    rbx, rbx                                                       ; +0xb3, 0x14033f053\njnz     short loc_14033F08A                                            ; +0xb6, 0x14033f056\nmov     ecx, 8A8h; Size                                                ; +0xb8, 0x14033f058\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xbd, 0x14033f05d\nmov     [rsp+48h+arg_0], rax                                           ; +0xc2, 0x14033f062\nmov     rcx, rax                                                       ; +0xc7, 0x14033f067\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0xca, 0x14033f06a\nnop                                                                    ; +0xcf, 0x14033f06f\nmov     cs:qword_14090BF60, rax                                        ; +0xd0, 0x14033f070\nmov     rcx, [rax]                                                     ; +0xd7, 0x14033f077\nmov     rdx, [rcx+48h]                                                 ; +0xda, 0x14033f07a\nmov     rcx, rax                                                       ; +0xde, 0x14033f07e\ncall    rdx                                                            ; +0xe1, 0x14033f081\nmov     rbx, cs:qword_14090BF60                                        ; +0xe3, 0x14033f083\nmov     [rsp+48h+arg_8], 3F800000h                                     ; +0xea, 0x14033f08a\nlea     rdx, [rsp+48h+arg_8]                                           ; +0xf2, 0x14033f092\nmov     rcx, [rbx+228h]                                                ; +0xf7, 0x14033f097\ncall    cs:?getPitch@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@PEAM@Z; FMOD::ChannelControl::getPitch(float *) ; +0xfe, 0x14033f09e\nucomiss xmm6, [rsp+48h+arg_8]                                          ; +0x104, 0x14033f0a4\njp      short loc_14033F0AD                                            ; +0x109, 0x14033f0a9\njz      short loc_14033F0DD                                            ; +0x10b, 0x14033f0ab\nmovaps  xmm1, xmm6                                                     ; +0x10d, 0x14033f0ad\nmov     rcx, [rbx+228h]                                                ; +0x110, 0x14033f0b0\ncall    cs:?setPitch@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@M@Z; FMOD::ChannelControl::setPitch(float) ; +0x117, 0x14033f0b7\nmovaps  xmm1, xmm6                                                     ; +0x11d, 0x14033f0bd\nmov     rcx, [rbx+248h]                                                ; +0x120, 0x14033f0c0\ncall    cs:?setPitch@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@M@Z; FMOD::ChannelControl::setPitch(float) ; +0x127, 0x14033f0c7\nmovaps  xmm1, xmm6                                                     ; +0x12d, 0x14033f0cd\nmov     rcx, [rbx+250h]                                                ; +0x130, 0x14033f0d0\ncall    cs:?setPitch@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@M@Z; FMOD::ChannelControl::setPitch(float) ; +0x137, 0x14033f0d7\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x13d, 0x14033f0dd\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x142, 0x14033f0e2\nadd     rsp, 40h                                                       ; +0x147, 0x14033f0e7\npop     rbx                                                            ; +0x14b, 0x14033f0eb\nretn                                                                   ; +0x14c, 0x14033f0ec", "xrefs": ["<???> @ 0x14076b880", "<???> @ 0x14078b2f8", "<???> @ 0x1407d5ee0", "<???> @ 0x14091fd0c"], "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"}