{"type": "func", "start": 6115840, "end": 6116250, "name": "FMODLevelVisualizer::updateVisualizer", "pseudocode": "// \n// FMODLevelVisualizer::updateVisualizer from 0x5d5200 to 0x5d539a (410 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::updateAudioVisualizer @ 0x599270\n// > GJBaseGameLayer::updateAudioVisualizer @ 0x5992b0\n// > FMODLevelVisualizer::init @ 0x5d5664\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:54:08 +0000\n// \n\nint __fastcall FMODLevelVisualizer::updateVisualizer(FMODLevelVisualizer *this, float a2, float a3, float a4)\n{\n  int v5; // r5\n  float v9; // s16\n  float v10; // s19\n  int v11; // r0\n  int v12; // r1\n  int v13; // r4\n  int v14; // r0\n  int v15; // r7\n  void (*v16)(void); // r3\n  int v17; // r4\n  void (__fastcall *v18)(int, _BYTE *); // r7\n  float *v19; // r0\n  int v20; // r3\n  int v21; // r1\n  void (__fastcall *v22)(int, __int16 *); // r3\n  __int16 *v23; // r1\n  float v24; // s15\n  bool v25; // cc\n  _BYTE v27[8]; // [sp+Ch] [bp-Ch] BYREF\n\n  v5 = 0;\n  v9 = 0.6;\n  v10 = 0.0;\n  v11 = (*(int (__fastcall **)(FMODLevelVisualizer *, int, _DWORD))(*(_DWORD *)this + 240))(this, 50, LODWORD(a3));\n  v12 = 100;\n  v13 = v11;\n  while ( 1 )\n  {\n    v14 = (*(int (__fastcall **)(int, int))(*(_DWORD *)v13 + 240))(v13, v12);\n    v15 = v14;\n    if ( v14 )\n    {\n      v16 = *(void (**)(void))(*(_DWORD *)v14 + 172);\n      if ( a2 > v10 )\n      {\n        v16();\n        if ( a2 <= v9 )\n          v9 = a2;\n        (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v15 + 72))(\n          v15,\n          (float)((float)(v9 - v10) * 96.0) / *((float *)this + 66));\n      }\n      else\n      {\n        v16();\n      }\n    }\n    if ( ++v5 == 3 )\n      break;\n    v9 = 1.0;\n    if ( v5 == 2 )\n    {\n      v12 = 300;\n    }\n    else\n    {\n      v12 = 200;\n      v9 = 0.85;\n      v10 = 0.6;\n    }\n    if ( v5 == 2 )\n      v10 = 0.85;\n  }\n  v17 = (*(int (__fastcall **)(int, int))(*(_DWORD *)v13 + 240))(v13, 400);\n  v18 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v17 + 92);\n  v19 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27, *v19, (float)(a3 * 96.0) - 48.0);\n  v18(v17, v27);\n  v20 = *(_DWORD *)v17;\n  if ( a3 <= 0.85 )\n  {\n    v22 = *(void (__fastcall **)(int, __int16 *))(v20 + 480);\n    if ( a3 <= 0.6 )\n      v23 = (__int16 *)&unk_BEE214;\n    else\n      v23 = &word_BEE211;\n    v22(v17, v23);\n  }\n  else\n  {\n    (*(void (__fastcall **)(int, void *))(v20 + 480))(v17, &unk_BEE20B);\n  }\n  v24 = (float)(0.5 - a4) * 255.0;\n  v25 = v24 <= 0.0;\n  if ( v24 <= 0.0 )\n    v21 = 0;\n  else\n    LODWORD(v24) = (unsigned int)v24;\n  if ( !v25 )\n    v21 = LOBYTE(v24);\n  (*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 456))(v17, v21);\n  return (*(int (__fastcall **)(int, bool))(*(_DWORD *)v17 + 172))(v17, a3 > 0.0);\n}", "assembly": "; \n; FMODLevelVisualizer::updateVisualizer from 0x5d5200 to 0x5d539a (410 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::updateAudioVisualizer @ 0x599270\n; > GJBaseGameLayer::updateAudioVisualizer @ 0x5992b0\n; > FMODLevelVisualizer::init @ 0x5d5664\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:54:08 +0000\n; \nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x5d5200\nMOV             R8, R0                                                 ; +0x4, 0x5d5204\nVPUSH           {D8-D12}                                               ; +0x6, 0x5d5206\nMOVS            R5, #0                                                 ; +0xa, 0x5d520a\nLDR             R6, =(__stack_chk_guard_ptr - 0x5D5212)                ; +0xc, 0x5d520c\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x5d520e\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x5d5210\nVMOV            S21, R3                                                ; +0x12, 0x5d5212\nSUB             SP, SP, #0x18                                          ; +0x16, 0x5d5216\nVMOV            S18, R1                                                ; +0x18, 0x5d5218\nLDR             R3, [R6]                                               ; +0x1c, 0x5d521c\nMOVS            R1, #0x32 ; '2'                                        ; +0x1e, 0x5d521e\nVMOV            S17, R2                                                ; +0x20, 0x5d5220\nVLDR            S16, =0.6                                              ; +0x24, 0x5d5224\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x28, 0x5d5228\nLDR             R3, [R0]                                               ; +0x2a, 0x5d522a\nVLDR            S19, =0.0                                              ; +0x2c, 0x5d522c\nLDR.W           R3, [R3,#0xF0]                                         ; +0x30, 0x5d5230\nBLX             R3                                                     ; +0x34, 0x5d5234\nVMOV.F32        S22, S16                                               ; +0x36, 0x5d5236\nVLDR            S23, =96.0                                             ; +0x3a, 0x5d523a\nMOVS            R1, #0x64 ; 'd'                                        ; +0x3e, 0x5d523e\nVLDR            S20, =0.85                                             ; +0x40, 0x5d5240\nVMOV.F32        S24, S16                                               ; +0x44, 0x5d5244\nMOV             R4, R0                                                 ; +0x48, 0x5d5248\nLDR             R3, [R4]                                               ; +0x4a, 0x5d524a\nMOV             R0, R4                                                 ; +0x4c, 0x5d524c\nLDR.W           R3, [R3,#0xF0]                                         ; +0x4e, 0x5d524e\nBLX             R3                                                     ; +0x52, 0x5d5252\nMOV             R7, R0                                                 ; +0x54, 0x5d5254\nCBZ             R0, loc_5D529C                                         ; +0x56, 0x5d5256\nVCMPE.F32       S18, S19                                               ; +0x58, 0x5d5258\nLDR             R3, [R0]                                               ; +0x5c, 0x5d525c\nLDR.W           R3, [R3,#0xAC]                                         ; +0x5e, 0x5d525e\nVMRS            APSR_nzcv, FPSCR                                       ; +0x62, 0x5d5262\nBHI             loc_5D526E                                             ; +0x66, 0x5d5266\nMOVS            R1, #0                                                 ; +0x68, 0x5d5268\nBLX             R3                                                     ; +0x6a, 0x5d526a\nB               loc_5D529C                                             ; +0x6c, 0x5d526c\nMOVS            R1, #1                                                 ; +0x6e, 0x5d526e\nBLX             R3                                                     ; +0x70, 0x5d5270\nVCMPE.F32       S18, S16                                               ; +0x72, 0x5d5272\nVLDR            S15, [R8,#0x108]                                       ; +0x76, 0x5d5276\nMOV             R0, R7                                                 ; +0x7a, 0x5d527a\nLDR             R3, [R7]                                               ; +0x7c, 0x5d527c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7e, 0x5d527e\nIT LE                                                                  ; +0x82, 0x5d5282\nVMOVLE.F32      S16, S18                                               ; +0x84, 0x5d5284\nLDR             R3, [R3,#0x48]                                         ; +0x88, 0x5d5288\nVSUB.F32        S16, S16, S19                                          ; +0x8a, 0x5d528a\nVMUL.F32        S16, S16, S23                                          ; +0x8e, 0x5d528e\nVDIV.F32        S15, S16, S15                                          ; +0x92, 0x5d5292\nVMOV            R1, S15                                                ; +0x96, 0x5d5296\nBLX             R3                                                     ; +0x9a, 0x5d529a\nADDS            R5, #1                                                 ; +0x9c, 0x5d529c\nCMP             R5, #3                                                 ; +0x9e, 0x5d529e\nBEQ             loc_5D52C2                                             ; +0xa0, 0x5d52a0\nVMOV.F32        S16, #1.0                                              ; +0xa2, 0x5d52a2\nCMP             R5, #2                                                 ; +0xa6, 0x5d52a6\nITE EQ                                                                 ; +0xa8, 0x5d52a8\nMOVEQ.W         R1, #0x12C                                             ; +0xaa, 0x5d52aa\nMOVNE           R1, #0xC8                                              ; +0xae, 0x5d52ae\nIT NE                                                                  ; +0xb0, 0x5d52b0\nVMOVNE.F32      S16, S20                                               ; +0xb2, 0x5d52b2\nITE NE                                                                 ; +0xb6, 0x5d52b6\nVMOVNE.F32      S19, S24                                               ; +0xb8, 0x5d52b8\nVMOVEQ.F32      S19, S20                                               ; +0xbc, 0x5d52bc\nB               loc_5D524A                                             ; +0xc0, 0x5d52c0\nLDR             R3, [R4]                                               ; +0xc2, 0x5d52c2\nMOV.W           R1, #0x190                                             ; +0xc4, 0x5d52c4\nMOV             R0, R4                                                 ; +0xc8, 0x5d52c8\nADD             R5, SP, #0x18+var_C                                    ; +0xca, 0x5d52ca\nLDR.W           R3, [R3,#0xF0]                                         ; +0xcc, 0x5d52cc\nBLX             R3                                                     ; +0xd0, 0x5d52d0\nLDR             R3, [R0]                                               ; +0xd2, 0x5d52d2\nMOV             R4, R0                                                 ; +0xd4, 0x5d52d4\nLDR             R7, [R3,#0x5C]                                         ; +0xd6, 0x5d52d6\nLDR             R3, [R3,#0x60]                                         ; +0xd8, 0x5d52d8\nBLX             R3                                                     ; +0xda, 0x5d52da\nVLDR            S14, =96.0                                             ; +0xdc, 0x5d52dc\nVLDR            S15, =48.0                                             ; +0xe0, 0x5d52e0\nVNMLS.F32       S15, S17, S14                                          ; +0xe4, 0x5d52e4\nVMOV            R2, S15; float                                         ; +0xe8, 0x5d52e8\nMOV             R3, R0                                                 ; +0xec, 0x5d52ec\nMOV             R0, R5; this                                           ; +0xee, 0x5d52ee\nLDR             R1, [R3]; float                                        ; +0xf0, 0x5d52f0\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xf2, 0x5d52f2\nMOV             R0, R4                                                 ; +0xf6, 0x5d52f6\nMOV             R1, R5                                                 ; +0xf8, 0x5d52f8\nBLX             R7                                                     ; +0xfa, 0x5d52fa\nVLDR            S15, =0.85                                             ; +0xfc, 0x5d52fc\nLDR             R3, [R4]                                               ; +0x100, 0x5d5300\nVCMPE.F32       S17, S15                                               ; +0x102, 0x5d5302\nVMRS            APSR_nzcv, FPSCR                                       ; +0x106, 0x5d5306\nBLE             loc_5D531A                                             ; +0x10a, 0x5d530a\nLDR             R1, =(word_BEE208 - 0x5D5318)                          ; +0x10c, 0x5d530c\nMOV             R0, R4                                                 ; +0x10e, 0x5d530e\nLDR.W           R3, [R3,#0x1E0]                                        ; +0x110, 0x5d5310\nADD             R1, PC; word_BEE208                                    ; +0x114, 0x5d5314\nADDS            R1, #(unk_BEE20B - 0xBEE208)                           ; +0x116, 0x5d5316\nB               loc_5D5338                                             ; +0x118, 0x5d5318\nVCMPE.F32       S17, S22                                               ; +0x11a, 0x5d531a\nLDR.W           R3, [R3,#0x1E0]                                        ; +0x11e, 0x5d531e\nMOV             R0, R4                                                 ; +0x122, 0x5d5322\nVMRS            APSR_nzcv, FPSCR                                       ; +0x124, 0x5d5324\nBLE             loc_5D5332                                             ; +0x128, 0x5d5328\nLDR             R1, =(word_BEE208 - 0x5D5330)                          ; +0x12a, 0x5d532a\nADD             R1, PC; word_BEE208                                    ; +0x12c, 0x5d532c\nADDS            R1, #(word_BEE211 - 0xBEE208)                          ; +0x12e, 0x5d532e\nB               loc_5D5338                                             ; +0x130, 0x5d5330\nLDR             R1, =(word_BEE208 - 0x5D5338)                          ; +0x132, 0x5d5332\nADD             R1, PC; word_BEE208                                    ; +0x134, 0x5d5334\nADDS            R1, #(unk_BEE214 - 0xBEE208)                           ; +0x136, 0x5d5336\nBLX             R3                                                     ; +0x138, 0x5d5338\nVMOV.F32        S15, #0.5                                              ; +0x13a, 0x5d533a\nVLDR            S14, =255.0                                            ; +0x13e, 0x5d533e\nMOV             R0, R4                                                 ; +0x142, 0x5d5342\nLDR             R3, [R4]                                               ; +0x144, 0x5d5344\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x146, 0x5d5346\nVSUB.F32        S15, S15, S21                                          ; +0x14a, 0x5d534a\nVMUL.F32        S15, S15, S14                                          ; +0x14e, 0x5d534e\nVCMPE.F32       S15, #0.0                                              ; +0x152, 0x5d5352\nVMRS            APSR_nzcv, FPSCR                                       ; +0x156, 0x5d5356\nITETT GT                                                               ; +0x15a, 0x5d535a\nVCVTGT.U32.F32  S15, S15                                               ; +0x15c, 0x5d535c\nMOVLE           R1, #0                                                 ; +0x160, 0x5d5360\nVSTRGT          S15, [SP,#0x18+var_14]                                 ; +0x162, 0x5d5362\nLDRBGT.W        R1, [SP,#0x18+var_14]                                  ; +0x166, 0x5d5366\nBLX             R3                                                     ; +0x16a, 0x5d536a\nVCMPE.F32       S17, #0.0                                              ; +0x16c, 0x5d536c\nLDR             R3, [R4]                                               ; +0x170, 0x5d5370\nMOV             R0, R4                                                 ; +0x172, 0x5d5372\nVMRS            APSR_nzcv, FPSCR                                       ; +0x174, 0x5d5374\nLDR.W           R3, [R3,#0xAC]                                         ; +0x178, 0x5d5378\nITE GT                                                                 ; +0x17c, 0x5d537c\nMOVGT           R1, #1                                                 ; +0x17e, 0x5d537e\nMOVLE           R1, #0                                                 ; +0x180, 0x5d5380\nBLX             R3                                                     ; +0x182, 0x5d5382\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x184, 0x5d5384\nLDR             R3, [R6]                                               ; +0x186, 0x5d5386\nCMP             R2, R3                                                 ; +0x188, 0x5d5388\nBEQ             loc_5D5390                                             ; +0x18a, 0x5d538a\nBLX             __stack_chk_fail                                       ; +0x18c, 0x5d538c\nADD             SP, SP, #0x18                                          ; +0x190, 0x5d5390\nVPOP            {D8-D12}                                               ; +0x192, 0x5d5392\nPOP.W           {R4-R8,PC}                                             ; +0x196, 0x5d5396", "xrefs": ["GJBaseGameLayer::updateAudioVisualizer @ 0x599270", "GJBaseGameLayer::updateAudioVisualizer @ 0x5992b0", "FMODLevelVisualizer::init @ 0x5d5664"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}