{"type": "func", "start": 742412, "end": 742560, "name": "FMOD::Sound::getFormat", "pseudocode": "// \n// FMOD::Sound::getFormat from 0xb540c to 0xb54a0 (148 bytes)\n// \n// 1 xrefs:\n// > FMOD::Sound::getFormat @ 0xe0588\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::getFormat(int a1, int a2, int a3, int a4, int a5)\n{\n  int v9; // r6\n  int v10; // r0\n  int v11; // r0\n  _BYTE v13[256]; // [sp+Ch] [bp-11Ch] BYREF\n  _DWORD *v14; // [sp+10Ch] [bp-1Ch] BYREF\n\n  v9 = sub_54E84(a1, &v14, 0);\n  if ( !v9 )\n  {\n    v10 = v14[47];\n    __dmb(0xBu);\n    if ( v10 && (v11 = v14[47], __dmb(0xBu), v11 != 7) )\n    {\n      v9 = 46;\n    }\n    else\n    {\n      v9 = (*(int (__fastcall **)(_DWORD *, int, int, int, int))(*v14 + 80))(v14, a2, a3, a4, a5);\n      if ( !v9 )\n        return 0;\n    }\n  }\n  if ( (*((_BYTE *)&dword_14 + (_DWORD)off_E8000) & 0x80) != 0 )\n  {\n    sub_B54A8(v13, 256, a2, a3, a4, a5);\n    sub_BAB40(v9, 5, a1, \"Sound::getFormat\", v13);\n  }\n  return v9;\n}", "assembly": "; \n; FMOD::Sound::getFormat from 0xb540c to 0xb54a0 (148 bytes)\n; \n; 1 xrefs:\n; > FMOD::Sound::getFormat @ 0xe0588\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, 0xb540c\nADD             R7, SP, #0xC                                           ; +0x2, 0xb540e\nPUSH.W          {R8-R10}                                               ; +0x4, 0xb5410\nSUB             SP, SP, #0x110                                         ; +0x8, 0xb5414\nMOV             R9, R1                                                 ; +0xa, 0xb5416\nADD             R1, SP, #0x110+var_4                                   ; +0xc, 0xb5418\nMOV             R8, R2                                                 ; +0xe, 0xb541a\nMOVS            R2, #0                                                 ; +0x10, 0xb541c\nMOV             R5, R3                                                 ; +0x12, 0xb541e\nMOV             R4, R0                                                 ; +0x14, 0xb5420\nBL              sub_54E84                                              ; +0x16, 0xb5422\nLDR.W           R10, [R7,#-0x18+arg_0]                                 ; +0x1a, 0xb5426\nMOV             R6, R0                                                 ; +0x1e, 0xb542a\nCBNZ            R0, loc_B5464                                          ; +0x20, 0xb542c\nLDR             R0, [SP,#0x110+var_4]                                  ; +0x22, 0xb542e\nLDR.W           R0, [R0,#0xBC]                                         ; +0x24, 0xb5430\nDMB.W           ISH                                                    ; +0x28, 0xb5434\nCBZ             R0, loc_B5448                                          ; +0x2c, 0xb5438\nLDR             R0, [SP,#0x110+var_4]                                  ; +0x2e, 0xb543a\nLDR.W           R0, [R0,#0xBC]                                         ; +0x30, 0xb543c\nDMB.W           ISH                                                    ; +0x34, 0xb5440\nCMP             R0, #7                                                 ; +0x38, 0xb5444\nBNE             loc_B5462                                              ; +0x3a, 0xb5446\nLDR             R0, [SP,#0x110+var_4]                                  ; +0x3c, 0xb5448\nMOV             R2, R8                                                 ; +0x3e, 0xb544a\nMOV             R3, R5                                                 ; +0x40, 0xb544c\nLDR             R1, [R0]                                               ; +0x42, 0xb544e\nLDR             R6, [R1,#0x50]                                         ; +0x44, 0xb5450\nMOV             R1, R9                                                 ; +0x46, 0xb5452\nSTR.W           R10, [SP,#0x110+var_110]                               ; +0x48, 0xb5454\nBLX             R6                                                     ; +0x4c, 0xb5458\nMOV             R6, R0                                                 ; +0x4e, 0xb545a\nCBNZ            R0, loc_B5464                                          ; +0x50, 0xb545c\nMOVS            R6, #0                                                 ; +0x52, 0xb545e\nB               loc_B5496                                              ; +0x54, 0xb5460\nMOVS            R6, #0x2E ; '.'                                        ; +0x56, 0xb5462\nLDR             R0, =(off_E6144 - 0xB546A)                             ; +0x58, 0xb5464\nADD             R0, PC; off_E6144                                      ; +0x5a, 0xb5466\nLDR             R0, [R0]; off_E8000                                    ; +0x5c, 0xb5468\nLDR             R0, [R0]; dword_F2488                                  ; +0x5e, 0xb546a\nLDRB            R0, [R0,#(dword_F249C - 0xF2488)]                      ; +0x60, 0xb546c\nLSLS            R0, R0, #0x18                                          ; +0x62, 0xb546e\nBPL             loc_B5496                                              ; +0x64, 0xb5470\nSTRD.W          R5, R10, [SP,#0x110+var_110]                           ; +0x66, 0xb5472\nADD             R5, SP, #0x110+var_104                                 ; +0x6a, 0xb5476\nMOV.W           R1, #0x100                                             ; +0x6c, 0xb5478\nMOV             R2, R9                                                 ; +0x70, 0xb547c\nMOV             R0, R5                                                 ; +0x72, 0xb547e\nMOV             R3, R8                                                 ; +0x74, 0xb5480\nBL              sub_B54A8                                              ; +0x76, 0xb5482\nSTR             R5, [SP,#0x110+var_110]                                ; +0x7a, 0xb5486\nMOV             R0, R6                                                 ; +0x7c, 0xb5488\nLDR             R3, =(aSoundGetformat - 0xB5494); \"Sound::getFormat\" ... ; +0x7e, 0xb548a\nMOVS            R1, #5                                                 ; +0x80, 0xb548c\nMOV             R2, R4                                                 ; +0x82, 0xb548e\nADD             R3, PC; \"Sound::getFormat\"                             ; +0x84, 0xb5490\nBL              sub_BAB40                                              ; +0x86, 0xb5492\nMOV             R0, R6                                                 ; +0x8a, 0xb5496\nADD             SP, SP, #0x110                                         ; +0x8c, 0xb5498\nPOP.W           {R8-R10}                                               ; +0x8e, 0xb549a\nPOP             {R4-R7,PC}                                             ; +0x92, 0xb549e", "xrefs": ["FMOD::Sound::getFormat @ 0xe0588"], "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"}