{"type": "func", "start": 4299946940, "end": 4299947192, "name": "FMOD::Sound::getNumSubSounds", "pseudocode": "// \n// FMOD::Sound::getNumSubSounds from 0x1004bfbbc to 0x1004bfcb8 (252 bytes)\n// \n// 1 xrefs:\n// > sub_100453094 @ 0x100453098\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::getNumSubSounds(FMOD::Sound *a1, 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 *, int *))(*(_QWORD *)v13 + 168LL))(v13, a2);\n      if ( !(_DWORD)v9 )\n        return (unsigned int)v9;\n    }\n  }\n  if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )\n  {\n    sub_1004360AC((int)v14, 0x100u, (__int64)a2, v4, v5, v6, v7, v8);\n    sub_10048489C(v9, 5, (__int64)a1, (__int64)\"Sound::getNumSubSounds\", (__int64)v14);\n  }\n  return (unsigned int)v9;\n}", "assembly": "; \n; FMOD::Sound::getNumSubSounds from 0x1004bfbbc to 0x1004bfcb8 (252 bytes)\n; \n; 1 xrefs:\n; > sub_100453094 @ 0x100453098\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, 0x1004bfbbc\nSTP             X22, X21, [SP,#0x130+var_20]                           ; +0x4, 0x1004bfbc0\nSTP             X20, X19, [SP,#0x130+var_10]                           ; +0x8, 0x1004bfbc4\nSTP             X29, X30, [SP,#0x130+var_s0]                           ; +0xc, 0x1004bfbc8\nADD             X29, SP, #0x130                                        ; +0x10, 0x1004bfbcc\nMOV             X20, X1                                                ; +0x14, 0x1004bfbd0\nMOV             X19, X0                                                ; +0x18, 0x1004bfbd4\nADRP            X8, #___stack_chk_guard_ptr@PAGE                       ; +0x1c, 0x1004bfbd8\nLDR             X8, [X8,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x20, 0x1004bfbdc\nLDR             X8, [X8]                                               ; +0x24, 0x1004bfbe0\nSTUR            X8, [X29,#var_28]                                      ; +0x28, 0x1004bfbe4\nMOV             X1, SP                                                 ; +0x2c, 0x1004bfbe8\nMOV             X2, #0                                                 ; +0x30, 0x1004bfbec\nBL              sub_1004C3CE0                                          ; +0x34, 0x1004bfbf0\nMOV             X21, X0                                                ; +0x38, 0x1004bfbf4\nCBNZ            W0, loc_1004BFC44                                      ; +0x3c, 0x1004bfbf8\nLDR             X8, [SP,#0x130+var_130]                                ; +0x40, 0x1004bfbfc\nADD             X8, X8, #0x110                                         ; +0x44, 0x1004bfc00\nLDAR            W8, [X8]                                               ; +0x48, 0x1004bfc04\nCBZ             W8, loc_1004BFC20                                      ; +0x4c, 0x1004bfc08\nLDR             X8, [SP,#0x130+var_130]                                ; +0x50, 0x1004bfc0c\nADD             X8, X8, #0x110                                         ; +0x54, 0x1004bfc10\nLDAR            W8, [X8]                                               ; +0x58, 0x1004bfc14\nCMP             W8, #7                                                 ; +0x5c, 0x1004bfc18\nB.NE            loc_1004BFC40                                          ; +0x60, 0x1004bfc1c\nLDR             X0, [SP,#0x130+var_130]                                ; +0x64, 0x1004bfc20\nLDR             X8, [X0]                                               ; +0x68, 0x1004bfc24\nLDR             X8, [X8,#0xA8]                                         ; +0x6c, 0x1004bfc28\nMOV             X1, X20                                                ; +0x70, 0x1004bfc2c\nBLR             X8                                                     ; +0x74, 0x1004bfc30\nMOV             X21, X0                                                ; +0x78, 0x1004bfc34\nCBNZ            W0, loc_1004BFC44                                      ; +0x7c, 0x1004bfc38\nB               loc_1004BFC84                                          ; +0x80, 0x1004bfc3c\nMOV             W21, #0x2E ; '.'                                       ; +0x84, 0x1004bfc40\nADRL            X8, off_1008524C8                                      ; +0x88, 0x1004bfc44\nLDR             X8, [X8]; unk_1008786E0                                ; +0x90, 0x1004bfc4c\nLDRB            W8, [X8,#(dword_100878700 - 0x1008786E0)]              ; +0x94, 0x1004bfc50\nTBZ             W8, #7, loc_1004BFC84                                  ; +0x98, 0x1004bfc54\nADD             X0, SP, #0x130+var_128                                 ; +0x9c, 0x1004bfc58\nMOV             W1, #0x100                                             ; +0xa0, 0x1004bfc5c\nMOV             X2, X20                                                ; +0xa4, 0x1004bfc60\nBL              sub_1004360AC                                          ; +0xa8, 0x1004bfc64\nADRL            X3, aSoundGetnumsub; \"Sound::getNumSubSounds\"          ; +0xac, 0x1004bfc68\nADD             X4, SP, #0x130+var_128                                 ; +0xb4, 0x1004bfc70\nMOV             X0, X21                                                ; +0xb8, 0x1004bfc74\nMOV             W1, #5                                                 ; +0xbc, 0x1004bfc78\nMOV             X2, X19                                                ; +0xc0, 0x1004bfc7c\nBL              sub_10048489C                                          ; +0xc4, 0x1004bfc80\nLDUR            X8, [X29,#var_28]                                      ; +0xc8, 0x1004bfc84\nADRP            X9, #___stack_chk_guard_ptr@PAGE                       ; +0xcc, 0x1004bfc88\nLDR             X9, [X9,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0xd0, 0x1004bfc8c\nLDR             X9, [X9]                                               ; +0xd4, 0x1004bfc90\nCMP             X9, X8                                                 ; +0xd8, 0x1004bfc94\nB.NE            loc_1004BFCB4                                          ; +0xdc, 0x1004bfc98\nMOV             X0, X21                                                ; +0xe0, 0x1004bfc9c\nLDP             X29, X30, [SP,#0x130+var_s0]                           ; +0xe4, 0x1004bfca0\nLDP             X20, X19, [SP,#0x130+var_10]                           ; +0xe8, 0x1004bfca4\nLDP             X22, X21, [SP,#0x130+var_20]                           ; +0xec, 0x1004bfca8\nADD             SP, SP, #0x140                                         ; +0xf0, 0x1004bfcac\nRET                                                                    ; +0xf4, 0x1004bfcb0\nBL              ___stack_chk_fail                                      ; +0xf8, 0x1004bfcb4", "xrefs": ["sub_100453094 @ 0x100453098"], "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"}