{"type": "func", "start": 5372324240, "end": 5372324493, "name": "OptionsLayer::musicSliderChanged", "pseudocode": "// \n// OptionsLayer::musicSliderChanged from 0x140372990 to 0x140372a8d (253 bytes)\n// \n// 2 xrefs:\n// > OptionsLayer::customSetup @ 0x140372494\n// > <???> @ 0x1406d5ac8\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\n// Hidden C++ exception states: #wind=3\nvoid OptionsLayer::musicSliderChanged(OptionsLayer *a1, cocos2d::CCObject *a2)\n{\n  float Value; // xmm6_4\n  __int64 v3; // rax\n  float v4; // xmm8_4\n  FMOD::ChannelControl *v5; // rcx\n  GameManager *v6; // rcx\n  FMODAudioEngine *v7; // [rsp+68h] [rbp+10h]\n  void *v8; // [rsp+68h] [rbp+10h]\n\n  Value = SliderThumb::getValue((SliderThumb *)a2);\n  if ( Value < 0.029999999 )\n    Value = 0.0;\n  v3 = qword_1406C2E88;\n  if ( !qword_1406C2E88 )\n  {\n    v7 = (FMODAudioEngine *)operator new(0x888u);\n    qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n    v3 = qword_1406C2E88;\n  }\n  v4 = *(float *)(v3 + 512);\n  *(_DWORD *)(v3 + 524) = 0;\n  *(float *)(v3 + 512) = Value;\n  v5 = *(FMOD::ChannelControl **)(v3 + 552);\n  if ( v5 )\n    FMOD::ChannelControl::setVolume(v5, Value);\n  if ( v4 <= 0.0 && Value > 0.0 )\n  {\n    v6 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v8 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v8);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v6 = (GameManager *)qword_1406C2ED8;\n    }\n    GameManager::playMenuMusic(v6);\n  }\n}", "assembly": "; \n; OptionsLayer::musicSliderChanged from 0x140372990 to 0x140372a8d (253 bytes)\n; \n; 2 xrefs:\n; > OptionsLayer::customSetup @ 0x140372494\n; > <???> @ 0x1406d5ac8\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\nsub     rsp, 58h                                                       ; +0x0, 0x140372990\nmovaps  [rsp+58h+var_18], xmm6                                         ; +0x4, 0x140372994\nmovaps  [rsp+58h+var_28], xmm7                                         ; +0x9, 0x140372999\nmovaps  [rsp+58h+var_38], xmm8                                         ; +0xe, 0x14037299e\nmov     rcx, rdx                                                       ; +0x14, 0x1403729a4\ncall    SliderThumb__getValue                                          ; +0x17, 0x1403729a7\nmovaps  xmm6, xmm0                                                     ; +0x1c, 0x1403729ac\nmovss   xmm1, cs:dword_1406229C8                                       ; +0x1f, 0x1403729af\nxorps   xmm7, xmm7                                                     ; +0x27, 0x1403729b7\ncomiss  xmm1, xmm0                                                     ; +0x2a, 0x1403729ba\njbe     short loc_1403729C2                                            ; +0x2d, 0x1403729bd\nxorps   xmm6, xmm6                                                     ; +0x2f, 0x1403729bf\nmov     rax, cs:qword_1406C2E88                                        ; +0x32, 0x1403729c2\ntest    rax, rax                                                       ; +0x39, 0x1403729c9\njnz     short loc_1403729FD                                            ; +0x3c, 0x1403729cc\nmov     ecx, 888h; Size                                                ; +0x3e, 0x1403729ce\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x43, 0x1403729d3\nmov     [rsp+58h+arg_8], rax                                           ; +0x48, 0x1403729d8\nmov     rcx, rax                                                       ; +0x4d, 0x1403729dd\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x50, 0x1403729e0\nnop                                                                    ; +0x55, 0x1403729e5\nmov     cs:qword_1406C2E88, rax                                        ; +0x56, 0x1403729e6\nmov     rdx, [rax]                                                     ; +0x5d, 0x1403729ed\nmov     rcx, rax                                                       ; +0x60, 0x1403729f0\ncall    qword ptr [rdx+48h]                                            ; +0x63, 0x1403729f3\nmov     rax, cs:qword_1406C2E88                                        ; +0x66, 0x1403729f6\nmovss   xmm8, dword ptr [rax+200h]                                     ; +0x6d, 0x1403729fd\nmov     dword ptr [rax+20Ch], 0                                        ; +0x76, 0x140372a06\nmovss   dword ptr [rax+200h], xmm6                                     ; +0x80, 0x140372a10\nmov     rcx, [rax+228h]                                                ; +0x88, 0x140372a18\ntest    rcx, rcx                                                       ; +0x8f, 0x140372a1f\njz      short loc_140372A2D                                            ; +0x92, 0x140372a22\nmovaps  xmm1, xmm6                                                     ; +0x94, 0x140372a24\ncall    cs:?setVolume@ChannelControl@FMOD@@QEAA?AW4FMOD_RESULT@@M@Z; FMOD::ChannelControl::setVolume(float) ; +0x97, 0x140372a27\ncomiss  xmm7, xmm8                                                     ; +0x9d, 0x140372a2d\njb      short loc_140372A78                                            ; +0xa1, 0x140372a31\ncomiss  xmm6, xmm7                                                     ; +0xa3, 0x140372a33\njbe     short loc_140372A78                                            ; +0xa6, 0x140372a36\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xa8, 0x140372a38\ntest    rcx, rcx                                                       ; +0xaf, 0x140372a3f\njnz     short loc_140372A73                                            ; +0xb2, 0x140372a42\nmov     ecx, 668h; Size                                                ; +0xb4, 0x140372a44\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xb9, 0x140372a49\nmov     [rsp+58h+arg_8], rax                                           ; +0xbe, 0x140372a4e\nmov     rcx, rax                                                       ; +0xc3, 0x140372a53\ncall    sub_14017AB00                                                  ; +0xc6, 0x140372a56\nnop                                                                    ; +0xcb, 0x140372a5b\nmov     cs:qword_1406C2ED8, rax                                        ; +0xcc, 0x140372a5c\nmov     rdx, [rax]                                                     ; +0xd3, 0x140372a63\nmov     rcx, rax                                                       ; +0xd6, 0x140372a66\ncall    qword ptr [rdx+48h]                                            ; +0xd9, 0x140372a69\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xdc, 0x140372a6c\ncall    GameManager__playMenuMusic                                     ; +0xe3, 0x140372a73\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0xe8, 0x140372a78\nmovaps  xmm7, [rsp+58h+var_28]                                         ; +0xed, 0x140372a7d\nmovaps  xmm8, [rsp+58h+var_38]                                         ; +0xf2, 0x140372a82\nadd     rsp, 58h                                                       ; +0xf8, 0x140372a88\nretn                                                                   ; +0xfc, 0x140372a8c", "xrefs": ["OptionsLayer::customSetup @ 0x140372494", "<???> @ 0x1406d5ac8"], "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"}