{"type": "func", "start": 5372194256, "end": 5372194708, "name": "GJBaseGameLayer::toggleAudioVisualizer", "pseudocode": "// \n// GJBaseGameLayer::toggleAudioVisualizer from 0x140352dd0 to 0x140352f94 (452 bytes)\n// \n// 3 xrefs:\n// > GameSettingsLayer::didChangeGV @ 0x1402c7576\n// > GJBaseGameLayer::init @ 0x14030dab4\n// > <???> @ 0x1409203f0\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:48 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall GJBaseGameLayer::toggleAudioVisualizer(__int64 a1, char a2)\n{\n  __int64 result; // rax\n  __int64 v5; // rax\n  __int64 v6; // rax\n  __int64 v7; // rdi\n  float v8; // xmm6_4\n  __int64 v9; // rbx\n  float *v10; // rax\n  __int64 v11; // rax\n  __int64 v12; // rax\n  __int64 v13; // rdi\n  float v14; // xmm6_4\n  __int64 v15; // rbx\n  float *v16; // rax\n  __int64 v17; // rax\n  void *v18; // [rsp+50h] [rbp+8h] BYREF\n  char v19; // [rsp+60h] [rbp+18h] BYREF\n  char v20; // [rsp+68h] [rbp+20h] BYREF\n\n  result = qword_14090BF60;\n  if ( !qword_14090BF60 )\n  {\n    v18 = operator new(0x8A8u);\n    qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v18);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n    result = qword_14090BF60;\n  }\n  *(_BYTE *)(result + 2184) = a2;\n  if ( *(_BYTE *)(a1 + 14336) != a2 )\n  {\n    *(_BYTE *)(a1 + 14336) = a2;\n    if ( !*(_QWORD *)(a1 + 14320) )\n    {\n      v5 = cocos2d::CCDirector::sharedDirector(a1);\n      cocos2d::CCDirector::getWinSize(v5, &v18);\n      v6 = FMODLevelVisualizer::create();\n      *(_QWORD *)(a1 + 14320) = v6;\n      (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 13888) + 456LL))(\n        *(_QWORD *)(a1 + 13888),\n        v6,\n        100);\n      v7 = **(_QWORD **)(a1 + 14320);\n      v8 = *((float *)&v18 + 1) * 0.5;\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v19, 0.0, 0.0);\n      v9 = *(_QWORD *)(a1 + 14320);\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, *v10 + 20.0, v8);\n      (*(void (__fastcall **)(__int64, __int64))(v7 + 184))(v9, v11);\n      v12 = FMODLevelVisualizer::create();\n      *(_QWORD *)(a1 + 14328) = v12;\n      (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 13888) + 456LL))(\n        *(_QWORD *)(a1 + 13888),\n        v12,\n        100);\n      v13 = **(_QWORD **)(a1 + 14328);\n      v14 = *((float *)&v18 + 1) * 0.5;\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v19, 0.0, 0.0);\n      v15 = *(_QWORD *)(a1 + 14328);\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, *v16 + 35.0, v14);\n      (*(void (__fastcall **)(__int64, __int64))(v13 + 184))(v15, v17);\n    }\n    (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 14320) + 336LL))(\n      *(_QWORD *)(a1 + 14320),\n      *(unsigned __int8 *)(a1 + 14336));\n    return (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 14328) + 336LL))(\n             *(_QWORD *)(a1 + 14328),\n             *(unsigned __int8 *)(a1 + 14336));\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::toggleAudioVisualizer from 0x140352dd0 to 0x140352f94 (452 bytes)\n; \n; 3 xrefs:\n; > GameSettingsLayer::didChangeGV @ 0x1402c7576\n; > GJBaseGameLayer::init @ 0x14030dab4\n; > <???> @ 0x1409203f0\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:48 +0000\n; \npush    rbx                                                            ; +0x0, 0x140352dd0\npush    rsi                                                            ; +0x2, 0x140352dd2\npush    rdi                                                            ; +0x3, 0x140352dd3\nsub     rsp, 30h                                                       ; +0x4, 0x140352dd4\nmovaps  [rsp+48h+var_28], xmm6                                         ; +0x8, 0x140352dd8\nmovzx   ebx, dl                                                        ; +0xd, 0x140352ddd\nmov     rsi, rcx                                                       ; +0x10, 0x140352de0\nmov     rax, cs:qword_14090BF60                                        ; +0x13, 0x140352de3\ntest    rax, rax                                                       ; +0x1a, 0x140352dea\njnz     short loc_140352E21                                            ; +0x1d, 0x140352ded\nmov     ecx, 8A8h; Size                                                ; +0x1f, 0x140352def\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x24, 0x140352df4\nmov     [rsp+48h+arg_0], rax                                           ; +0x29, 0x140352df9\nmov     rcx, rax                                                       ; +0x2e, 0x140352dfe\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x31, 0x140352e01\nnop                                                                    ; +0x36, 0x140352e06\nmov     cs:qword_14090BF60, rax                                        ; +0x37, 0x140352e07\nmov     rcx, [rax]                                                     ; +0x3e, 0x140352e0e\nmov     rdx, [rcx+48h]                                                 ; +0x41, 0x140352e11\nmov     rcx, rax                                                       ; +0x45, 0x140352e15\ncall    rdx                                                            ; +0x48, 0x140352e18\nmov     rax, cs:qword_14090BF60                                        ; +0x4a, 0x140352e1a\nmov     [rax+888h], bl                                                 ; +0x51, 0x140352e21\ncmp     [rsi+3800h], bl                                                ; +0x57, 0x140352e27\njz      loc_140352F87                                                  ; +0x5d, 0x140352e2d\nmov     [rsi+3800h], bl                                                ; +0x63, 0x140352e33\ncmp     qword ptr [rsi+37F0h], 0                                       ; +0x69, 0x140352e39\njnz     loc_140352F59                                                  ; +0x71, 0x140352e41\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x77, 0x140352e47\nmov     rcx, rax                                                       ; +0x7d, 0x140352e4d\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x80, 0x140352e50\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x85, 0x140352e55\ncall    FMODLevelVisualizer__create                                    ; +0x8b, 0x140352e5b\nmov     [rsi+37F0h], rax                                               ; +0x90, 0x140352e60\nmov     rcx, [rsi+3640h]                                               ; +0x97, 0x140352e67\nmov     rdx, [rcx]                                                     ; +0x9e, 0x140352e6e\nmov     r9, [rdx+1C8h]                                                 ; +0xa1, 0x140352e71\nmov     r8d, 64h ; 'd'                                                 ; +0xa8, 0x140352e78\nmov     rdx, rax                                                       ; +0xae, 0x140352e7e\ncall    r9                                                             ; +0xb1, 0x140352e81\nmov     rax, [rsi+37F0h]                                               ; +0xb4, 0x140352e84\nmov     rdi, [rax]                                                     ; +0xbb, 0x140352e8b\nmovss   xmm6, dword ptr [rsp+48h+arg_0+4]                              ; +0xbe, 0x140352e8e\nmulss   xmm6, cs:dword_140834F20                                       ; +0xc4, 0x140352e94\nxorps   xmm2, xmm2                                                     ; +0xcc, 0x140352e9c\nxorps   xmm1, xmm1                                                     ; +0xcf, 0x140352e9f\nlea     rcx, [rsp+48h+arg_10]                                          ; +0xd2, 0x140352ea2\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xd7, 0x140352ea7\nmov     rbx, [rsi+37F0h]                                               ; +0xdd, 0x140352ead\nmovss   xmm1, dword ptr [rax]                                          ; +0xe4, 0x140352eb4\naddss   xmm1, cs:dword_1408355B4                                       ; +0xe8, 0x140352eb8\nmovaps  xmm2, xmm6                                                     ; +0xf0, 0x140352ec0\nlea     rcx, [rsp+48h+arg_18]                                          ; +0xf3, 0x140352ec3\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xf8, 0x140352ec8\nmov     rdx, rax                                                       ; +0xfe, 0x140352ece\nmov     rcx, rbx                                                       ; +0x101, 0x140352ed1\ncall    qword ptr [rdi+0B8h]                                           ; +0x104, 0x140352ed4\ncall    FMODLevelVisualizer__create                                    ; +0x10a, 0x140352eda\nmov     [rsi+37F8h], rax                                               ; +0x10f, 0x140352edf\nmov     rcx, [rsi+3640h]                                               ; +0x116, 0x140352ee6\nmov     rdx, [rcx]                                                     ; +0x11d, 0x140352eed\nmov     r9, [rdx+1C8h]                                                 ; +0x120, 0x140352ef0\nmov     r8d, 64h ; 'd'                                                 ; +0x127, 0x140352ef7\nmov     rdx, rax                                                       ; +0x12d, 0x140352efd\ncall    r9                                                             ; +0x130, 0x140352f00\nmov     rax, [rsi+37F8h]                                               ; +0x133, 0x140352f03\nmov     rdi, [rax]                                                     ; +0x13a, 0x140352f0a\nmovss   xmm6, dword ptr [rsp+48h+arg_0+4]                              ; +0x13d, 0x140352f0d\nmulss   xmm6, cs:dword_140834F20                                       ; +0x143, 0x140352f13\nxorps   xmm2, xmm2                                                     ; +0x14b, 0x140352f1b\nxorps   xmm1, xmm1                                                     ; +0x14e, 0x140352f1e\nlea     rcx, [rsp+48h+arg_10]                                          ; +0x151, 0x140352f21\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x156, 0x140352f26\nmov     rbx, [rsi+37F8h]                                               ; +0x15c, 0x140352f2c\nmovss   xmm1, dword ptr [rax]                                          ; +0x163, 0x140352f33\naddss   xmm1, cs:dword_14083565C                                       ; +0x167, 0x140352f37\nmovaps  xmm2, xmm6                                                     ; +0x16f, 0x140352f3f\nlea     rcx, [rsp+48h+arg_18]                                          ; +0x172, 0x140352f42\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x177, 0x140352f47\nmov     rdx, rax                                                       ; +0x17d, 0x140352f4d\nmov     rcx, rbx                                                       ; +0x180, 0x140352f50\ncall    qword ptr [rdi+0B8h]                                           ; +0x183, 0x140352f53\nmov     rcx, [rsi+37F0h]                                               ; +0x189, 0x140352f59\nmov     rax, [rcx]                                                     ; +0x190, 0x140352f60\nmovzx   edx, byte ptr [rsi+3800h]                                      ; +0x193, 0x140352f63\ncall    qword ptr [rax+150h]                                           ; +0x19a, 0x140352f6a\nmov     rcx, [rsi+37F8h]                                               ; +0x1a0, 0x140352f70\nmov     rax, [rcx]                                                     ; +0x1a7, 0x140352f77\nmovzx   edx, byte ptr [rsi+3800h]                                      ; +0x1aa, 0x140352f7a\ncall    qword ptr [rax+150h]                                           ; +0x1b1, 0x140352f81\nmovaps  xmm6, [rsp+48h+var_28]                                         ; +0x1b7, 0x140352f87\nadd     rsp, 30h                                                       ; +0x1bc, 0x140352f8c\npop     rdi                                                            ; +0x1c0, 0x140352f90\npop     rsi                                                            ; +0x1c1, 0x140352f91\npop     rbx                                                            ; +0x1c2, 0x140352f92\nretn                                                                   ; +0x1c3, 0x140352f93", "xrefs": ["GameSettingsLayer::didChangeGV @ 0x1402c7576", "GJBaseGameLayer::init @ 0x14030dab4", "<???> @ 0x1409203f0"], "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"}