{"type": "func", "start": 745320, "end": 745460, "name": "FMOD::Sound::setMode", "pseudocode": "// \n// FMOD::Sound::setMode from 0xb5f68 to 0xb5ff4 (140 bytes)\n// \n// 1 xrefs:\n// > FMOD::Sound::setMode @ 0xe0668\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:41:43 +0000\n// \n\nint __fastcall FMOD::Sound::setMode(FMOD::Sound *this, unsigned int a2)\n{\n  int v4; // r6\n  int v5; // r0\n  int v6; // r0\n  _BYTE v8[256]; // [sp+8h] [bp-118h] BYREF\n  int v9; // [sp+108h] [bp-18h] BYREF\n  _DWORD *v10; // [sp+10Ch] [bp-14h] BYREF\n\n  v9 = 0;\n  v4 = sub_54E84((int)this, &v10, (int)&v9);\n  if ( !v4 )\n  {\n    v5 = v10[47];\n    __dmb(0xBu);\n    if ( v5 && (v6 = v10[47], __dmb(0xBu), v6 != 7) )\n    {\n      v4 = 46;\n    }\n    else\n    {\n      v4 = (*(int (__fastcall **)(_DWORD *, unsigned int))(*v10 + 140))(v10, a2);\n      if ( !v4 )\n      {\n        v4 = 0;\n        goto LABEL_9;\n      }\n    }\n  }\n  if ( (*((_BYTE *)&dword_14 + (_DWORD)off_E8000) & 0x80) != 0 )\n  {\n    sub_5C8F4(v8, 256, a2);\n    sub_BAB40(v4, 5, this, \"Sound::setMode\", v8);\n  }\nLABEL_9:\n  sub_6429C(&v9);\n  return v4;\n}", "assembly": "; \n; FMOD::Sound::setMode from 0xb5f68 to 0xb5ff4 (140 bytes)\n; \n; 1 xrefs:\n; > FMOD::Sound::setMode @ 0xe0668\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:41:43 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0xb5f68\nADD             R7, SP, #0xC                                           ; +0x2, 0xb5f6a\nPUSH.W          {R8}                                                   ; +0x4, 0xb5f6c\nSUB             SP, SP, #0x110                                         ; +0x8, 0xb5f70\nMOV             R8, R1                                                 ; +0xa, 0xb5f72\nMOV             R4, R0                                                 ; +0xc, 0xb5f74\nMOVS            R0, #0                                                 ; +0xe, 0xb5f76\nADD             R1, SP, #0x110+var_4                                   ; +0x10, 0xb5f78\nADD             R2, SP, #0x110+var_8                                   ; +0x12, 0xb5f7a\nSTR             R0, [SP,#0x110+var_8]                                  ; +0x14, 0xb5f7c\nMOV             R0, R4                                                 ; +0x16, 0xb5f7e\nBL              sub_54E84                                              ; +0x18, 0xb5f80\nMOV             R6, R0                                                 ; +0x1c, 0xb5f84\nCBNZ            R0, loc_B5FB8                                          ; +0x1e, 0xb5f86\nLDR             R0, [SP,#0x110+var_4]                                  ; +0x20, 0xb5f88\nLDR.W           R0, [R0,#0xBC]                                         ; +0x22, 0xb5f8a\nDMB.W           ISH                                                    ; +0x26, 0xb5f8e\nCBZ             R0, loc_B5FA2                                          ; +0x2a, 0xb5f92\nLDR             R0, [SP,#0x110+var_4]                                  ; +0x2c, 0xb5f94\nLDR.W           R0, [R0,#0xBC]                                         ; +0x2e, 0xb5f96\nDMB.W           ISH                                                    ; +0x32, 0xb5f9a\nCMP             R0, #7                                                 ; +0x36, 0xb5f9e\nBNE             loc_B5FB6                                              ; +0x38, 0xb5fa0\nLDR             R0, [SP,#0x110+var_4]                                  ; +0x3a, 0xb5fa2\nLDR             R1, [R0]                                               ; +0x3c, 0xb5fa4\nLDR.W           R2, [R1,#0x8C]                                         ; +0x3e, 0xb5fa6\nMOV             R1, R8                                                 ; +0x42, 0xb5faa\nBLX             R2                                                     ; +0x44, 0xb5fac\nMOV             R6, R0                                                 ; +0x46, 0xb5fae\nCBNZ            R0, loc_B5FB8                                          ; +0x48, 0xb5fb0\nMOVS            R6, #0                                                 ; +0x4a, 0xb5fb2\nB               loc_B5FE4                                              ; +0x4c, 0xb5fb4\nMOVS            R6, #0x2E ; '.'                                        ; +0x4e, 0xb5fb6\nLDR             R0, =(off_E6144 - 0xB5FBE)                             ; +0x50, 0xb5fb8\nADD             R0, PC; off_E6144                                      ; +0x52, 0xb5fba\nLDR             R0, [R0]; off_E8000                                    ; +0x54, 0xb5fbc\nLDR             R0, [R0]; dword_F2488                                  ; +0x56, 0xb5fbe\nLDRB            R0, [R0,#(dword_F249C - 0xF2488)]                      ; +0x58, 0xb5fc0\nLSLS            R0, R0, #0x18                                          ; +0x5a, 0xb5fc2\nBPL             loc_B5FE4                                              ; +0x5c, 0xb5fc4\nADD             R5, SP, #0x110+var_108                                 ; +0x5e, 0xb5fc6\nMOV.W           R1, #0x100                                             ; +0x60, 0xb5fc8\nMOV             R2, R8                                                 ; +0x64, 0xb5fcc\nMOV             R0, R5                                                 ; +0x66, 0xb5fce\nBL              sub_5C8F4                                              ; +0x68, 0xb5fd0\nSTR             R5, [SP,#0x110+var_110]                                ; +0x6c, 0xb5fd4\nMOV             R0, R6                                                 ; +0x6e, 0xb5fd6\nLDR             R3, =(aSoundSetmode - 0xB5FE2); \"Sound::setMode\" ...   ; +0x70, 0xb5fd8\nMOVS            R1, #5                                                 ; +0x72, 0xb5fda\nMOV             R2, R4                                                 ; +0x74, 0xb5fdc\nADD             R3, PC; \"Sound::setMode\"                               ; +0x76, 0xb5fde\nBL              sub_BAB40                                              ; +0x78, 0xb5fe0\nADD             R0, SP, #0x110+var_8                                   ; +0x7c, 0xb5fe4\nBL              sub_6429C                                              ; +0x7e, 0xb5fe6\nMOV             R0, R6                                                 ; +0x82, 0xb5fea\nADD             SP, SP, #0x110                                         ; +0x84, 0xb5fec\nPOP.W           {R8}                                                   ; +0x86, 0xb5fee\nPOP             {R4-R7,PC}                                             ; +0x8a, 0xb5ff2", "xrefs": ["FMOD::Sound::setMode @ 0xe0668"], "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"}