{"type": "func", "start": 5372339216, "end": 5372339545, "name": "MoreOptionsLayer::onFMODDebug", "pseudocode": "// \n// MoreOptionsLayer::onFMODDebug from 0x140376410 to 0x140376559 (329 bytes)\n// \n// 2 xrefs:\n// > MoreOptionsLayer::init @ 0x1403742dd\n// > <???> @ 0x1406d5bac\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 MoreOptionsLayer::onFMODDebug(MoreOptionsLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // rcx\n  _QWORD *FMODStatus; // rax\n  size_t v4; // r8\n  __int64 v5; // rax\n  FLAlertLayer *v6; // rbx\n  FMODAudioEngine *v7; // [rsp+50h] [rbp-88h]\n  __int128 v8; // [rsp+58h] [rbp-80h] BYREF\n  __int64 v9; // [rsp+68h] [rbp-70h]\n  __int64 v10; // [rsp+70h] [rbp-68h]\n  _BYTE v11[32]; // [rsp+80h] [rbp-58h] BYREF\n  _BYTE v12[32]; // [rsp+A0h] [rbp-38h] BYREF\n\n  v2 = 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    v2 = qword_1406C2E88;\n  }\n  FMODStatus = (_QWORD *)FMODAudioEngine::getFMODStatus(v2, (__int64)v12);\n  if ( FMODStatus[3] > 0xFu )\n    FMODStatus = (_QWORD *)*FMODStatus;\n  v8 = 0;\n  v9 = 0;\n  v10 = 0;\n  v4 = -1;\n  do\n    ++v4;\n  while ( *((_BYTE *)FMODStatus + v4) );\n  sub_14003A930(&v8, FMODStatus, v4);\n  v5 = sub_14003BDB0((__int64)v11, (__int64)&v8);\n  v6 = FLAlertLayer::create(0, (int)\"FMOD Debug\", v5, (__int64)\"OK\", 0, 1136525312, 0, 0, 1065353216);\n  sub_14003A830((__int64)&v8);\n  sub_14003A830((__int64)v12);\n  v6->show(v6);\n}", "assembly": "; \n; MoreOptionsLayer::onFMODDebug from 0x140376410 to 0x140376559 (329 bytes)\n; \n; 2 xrefs:\n; > MoreOptionsLayer::init @ 0x1403742dd\n; > <???> @ 0x1406d5bac\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\npush    rbx                                                            ; +0x0, 0x140376410\nsub     rsp, 0D0h                                                      ; +0x2, 0x140376412\nmov     rax, cs:__security_cookie                                      ; +0x9, 0x140376419\nxor     rax, rsp                                                       ; +0x10, 0x140376420\nmov     [rsp+0D8h+var_18], rax                                         ; +0x13, 0x140376423\nmov     rcx, cs:qword_1406C2E88                                        ; +0x1b, 0x14037642b\ntest    rcx, rcx                                                       ; +0x22, 0x140376432\njnz     short loc_140376466                                            ; +0x25, 0x140376435\nmov     ecx, 888h; Size                                                ; +0x27, 0x140376437\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2c, 0x14037643c\nmov     [rsp+0D8h+var_88], rax                                         ; +0x31, 0x140376441\nmov     rcx, rax                                                       ; +0x36, 0x140376446\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x39, 0x140376449\nnop                                                                    ; +0x3e, 0x14037644e\nmov     cs:qword_1406C2E88, rax                                        ; +0x3f, 0x14037644f\nmov     rdx, [rax]                                                     ; +0x46, 0x140376456\nmov     rcx, rax                                                       ; +0x49, 0x140376459\ncall    qword ptr [rdx+48h]                                            ; +0x4c, 0x14037645c\nmov     rcx, cs:qword_1406C2E88                                        ; +0x4f, 0x14037645f\nlea     rdx, [rsp+0D8h+var_38]                                         ; +0x56, 0x140376466\ncall    FMODAudioEngine__getFMODStatus                                 ; +0x5e, 0x14037646e\nnop                                                                    ; +0x63, 0x140376473\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x64, 0x140376474\njbe     short loc_14037647E                                            ; +0x69, 0x140376479\nmov     rax, [rax]                                                     ; +0x6b, 0x14037647b\nxorps   xmm0, xmm0                                                     ; +0x6e, 0x14037647e\nmovups  [rsp+0D8h+var_80], xmm0                                        ; +0x71, 0x140376481\nxor     ebx, ebx                                                       ; +0x76, 0x140376486\nmov     [rsp+0D8h+var_70], rbx                                         ; +0x78, 0x140376488\nmov     [rsp+0D8h+var_68], rbx                                         ; +0x7d, 0x14037648d\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x82, 0x140376492\nnop     dword ptr [rax+00000000h]                                      ; +0x89, 0x140376499\ninc     r8                                                             ; +0x90, 0x1403764a0\ncmp     [rax+r8], bl                                                   ; +0x93, 0x1403764a3\njnz     short loc_1403764A0                                            ; +0x97, 0x1403764a7\nmov     rdx, rax                                                       ; +0x99, 0x1403764a9\nlea     rcx, [rsp+0D8h+var_80]                                         ; +0x9c, 0x1403764ac\ncall    sub_14003A930                                                  ; +0xa1, 0x1403764b1\nlea     rax, [rsp+0D8h+var_80]                                         ; +0xa6, 0x1403764b6\nmov     [rsp+0D8h+var_88], rax                                         ; +0xab, 0x1403764bb\nlea     rdx, [rsp+0D8h+var_80]                                         ; +0xb0, 0x1403764c0\nlea     rcx, [rsp+0D8h+var_58]                                         ; +0xb5, 0x1403764c5\ncall    sub_14003BDB0                                                  ; +0xbd, 0x1403764cd\nmovss   xmm0, cs:flt_140622C24                                         ; +0xc2, 0x1403764d2\nmovss   [rsp+0D8h+var_98], xmm0                                        ; +0xca, 0x1403764da\nxorps   xmm1, xmm1                                                     ; +0xd0, 0x1403764e0\nmovss   [rsp+0D8h+var_A0], xmm1                                        ; +0xd3, 0x1403764e3\nmov     [rsp+0D8h+var_A8], 0                                           ; +0xd9, 0x1403764e9\nmovss   xmm0, cs:dword_140623478                                       ; +0xde, 0x1403764ee\nmovss   [rsp+0D8h+var_B0], xmm0                                        ; +0xe6, 0x1403764f6\nmov     [rsp+0D8h+var_B8], rbx                                         ; +0xec, 0x1403764fc\nlea     r9, aOk; \"OK\"                                                  ; +0xf1, 0x140376501\nmov     r8, rax                                                        ; +0xf8, 0x140376508\nlea     rdx, aFmodDebug; \"FMOD Debug\"                                  ; +0xfb, 0x14037650b\nxor     ecx, ecx                                                       ; +0x102, 0x140376512\ncall    FLAlertLayer__create                                           ; +0x104, 0x140376514\nmov     rbx, rax                                                       ; +0x109, 0x140376519\nlea     rcx, [rsp+0D8h+var_80]                                         ; +0x10c, 0x14037651c\ncall    sub_14003A830                                                  ; +0x111, 0x140376521\nnop                                                                    ; +0x116, 0x140376526\nlea     rcx, [rsp+0D8h+var_38]                                         ; +0x117, 0x140376527\ncall    sub_14003A830                                                  ; +0x11f, 0x14037652f\nmov     rdx, [rbx]                                                     ; +0x124, 0x140376534\nmov     rcx, rbx                                                       ; +0x127, 0x140376537\ncall    qword ptr [rdx+410h]                                           ; +0x12a, 0x14037653a\nmov     rcx, [rsp+0D8h+var_18]                                         ; +0x130, 0x140376540\nxor     rcx, rsp; StackCookie                                          ; +0x138, 0x140376548\ncall    __security_check_cookie                                        ; +0x13b, 0x14037654b\nadd     rsp, 0D0h                                                      ; +0x140, 0x140376550\npop     rbx                                                            ; +0x147, 0x140376557\nretn                                                                   ; +0x148, 0x140376558", "xrefs": ["MoreOptionsLayer::init @ 0x1403742dd", "<???> @ 0x1406d5bac"], "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"}