{"type": "func", "start": 4299951768, "end": 4299952020, "name": "FMOD::Sound::getMode", "pseudocode": "// \n// FMOD::Sound::getMode from 0x1004c0e98 to 0x1004c0f94 (252 bytes)\n// \n// 1 xrefs:\n// > sub_1004531C4 @ 0x1004531c8\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\nFMOD_RESULT __fastcall FMOD::Sound::getMode(FMOD::Sound *a1, unsigned int *a2)\n{\n  int v4; // w3\n  int v5; // w4\n  int v6; // w5\n  int v7; // w6\n  int v8; // w7\n  __int64 v9; // x21\n  unsigned int v10; // w8\n  unsigned int v11; // w8\n  unsigned int *v13; // [xsp+0h] [xbp-130h] BYREF\n  _BYTE v14[256]; // [xsp+8h] [xbp-128h] BYREF\n\n  v9 = sub_1004C3CE0(a1, &v13, 0);\n  if ( !(_DWORD)v9 )\n  {\n    v10 = atomic_load(v13 + 68);\n    if ( v10 && (v11 = atomic_load(v13 + 68), v11 != 7) )\n    {\n      v9 = 46;\n    }\n    else\n    {\n      v9 = (*(__int64 (__fastcall **)(unsigned int *, unsigned int *))(*(_QWORD *)v13 + 288LL))(v13, a2);\n      if ( !(_DWORD)v9 )\n        return (unsigned int)v9;\n    }\n  }\n  if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )\n  {\n    sub_1004360EC((int)v14, 0x100u, (__int64)a2, v4, v5, v6, v7, v8);\n    sub_10048489C(v9, 5, (__int64)a1, (__int64)\"Sound::getMode\", (__int64)v14);\n  }\n  return (unsigned int)v9;\n}", "assembly": "; \n; FMOD::Sound::getMode from 0x1004c0e98 to 0x1004c0f94 (252 bytes)\n; \n; 1 xrefs:\n; > sub_1004531C4 @ 0x1004531c8\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             SP, SP, #0x140                                         ; +0x0, 0x1004c0e98\nSTP             X22, X21, [SP,#0x130+var_20]                           ; +0x4, 0x1004c0e9c\nSTP             X20, X19, [SP,#0x130+var_10]                           ; +0x8, 0x1004c0ea0\nSTP             X29, X30, [SP,#0x130+var_s0]                           ; +0xc, 0x1004c0ea4\nADD             X29, SP, #0x130                                        ; +0x10, 0x1004c0ea8\nMOV             X20, X1                                                ; +0x14, 0x1004c0eac\nMOV             X19, X0                                                ; +0x18, 0x1004c0eb0\nADRP            X8, #___stack_chk_guard_ptr@PAGE                       ; +0x1c, 0x1004c0eb4\nLDR             X8, [X8,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x20, 0x1004c0eb8\nLDR             X8, [X8]                                               ; +0x24, 0x1004c0ebc\nSTUR            X8, [X29,#var_28]                                      ; +0x28, 0x1004c0ec0\nMOV             X1, SP                                                 ; +0x2c, 0x1004c0ec4\nMOV             X2, #0                                                 ; +0x30, 0x1004c0ec8\nBL              sub_1004C3CE0                                          ; +0x34, 0x1004c0ecc\nMOV             X21, X0                                                ; +0x38, 0x1004c0ed0\nCBNZ            W0, loc_1004C0F20                                      ; +0x3c, 0x1004c0ed4\nLDR             X8, [SP,#0x130+var_130]                                ; +0x40, 0x1004c0ed8\nADD             X8, X8, #0x110                                         ; +0x44, 0x1004c0edc\nLDAR            W8, [X8]                                               ; +0x48, 0x1004c0ee0\nCBZ             W8, loc_1004C0EFC                                      ; +0x4c, 0x1004c0ee4\nLDR             X8, [SP,#0x130+var_130]                                ; +0x50, 0x1004c0ee8\nADD             X8, X8, #0x110                                         ; +0x54, 0x1004c0eec\nLDAR            W8, [X8]                                               ; +0x58, 0x1004c0ef0\nCMP             W8, #7                                                 ; +0x5c, 0x1004c0ef4\nB.NE            loc_1004C0F1C                                          ; +0x60, 0x1004c0ef8\nLDR             X0, [SP,#0x130+var_130]                                ; +0x64, 0x1004c0efc\nLDR             X8, [X0]                                               ; +0x68, 0x1004c0f00\nLDR             X8, [X8,#0x120]                                        ; +0x6c, 0x1004c0f04\nMOV             X1, X20                                                ; +0x70, 0x1004c0f08\nBLR             X8                                                     ; +0x74, 0x1004c0f0c\nMOV             X21, X0                                                ; +0x78, 0x1004c0f10\nCBNZ            W0, loc_1004C0F20                                      ; +0x7c, 0x1004c0f14\nB               loc_1004C0F60                                          ; +0x80, 0x1004c0f18\nMOV             W21, #0x2E ; '.'                                       ; +0x84, 0x1004c0f1c\nADRL            X8, off_1008524C8                                      ; +0x88, 0x1004c0f20\nLDR             X8, [X8]; unk_1008786E0                                ; +0x90, 0x1004c0f28\nLDRB            W8, [X8,#(dword_100878700 - 0x1008786E0)]              ; +0x94, 0x1004c0f2c\nTBZ             W8, #7, loc_1004C0F60                                  ; +0x98, 0x1004c0f30\nADD             X0, SP, #0x130+var_128                                 ; +0x9c, 0x1004c0f34\nMOV             W1, #0x100                                             ; +0xa0, 0x1004c0f38\nMOV             X2, X20                                                ; +0xa4, 0x1004c0f3c\nBL              sub_1004360EC                                          ; +0xa8, 0x1004c0f40\nADRL            X3, aSoundGetmode; \"Sound::getMode\"                    ; +0xac, 0x1004c0f44\nADD             X4, SP, #0x130+var_128                                 ; +0xb4, 0x1004c0f4c\nMOV             X0, X21                                                ; +0xb8, 0x1004c0f50\nMOV             W1, #5                                                 ; +0xbc, 0x1004c0f54\nMOV             X2, X19                                                ; +0xc0, 0x1004c0f58\nBL              sub_10048489C                                          ; +0xc4, 0x1004c0f5c\nLDUR            X8, [X29,#var_28]                                      ; +0xc8, 0x1004c0f60\nADRP            X9, #___stack_chk_guard_ptr@PAGE                       ; +0xcc, 0x1004c0f64\nLDR             X9, [X9,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0xd0, 0x1004c0f68\nLDR             X9, [X9]                                               ; +0xd4, 0x1004c0f6c\nCMP             X9, X8                                                 ; +0xd8, 0x1004c0f70\nB.NE            loc_1004C0F90                                          ; +0xdc, 0x1004c0f74\nMOV             X0, X21                                                ; +0xe0, 0x1004c0f78\nLDP             X29, X30, [SP,#0x130+var_s0]                           ; +0xe4, 0x1004c0f7c\nLDP             X20, X19, [SP,#0x130+var_10]                           ; +0xe8, 0x1004c0f80\nLDP             X22, X21, [SP,#0x130+var_20]                           ; +0xec, 0x1004c0f84\nADD             SP, SP, #0x140                                         ; +0xf0, 0x1004c0f88\nRET                                                                    ; +0xf4, 0x1004c0f8c\nBL              ___stack_chk_fail                                      ; +0xf8, 0x1004c0f90", "xrefs": ["sub_1004531C4 @ 0x1004531c8"], "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"}