{"type": "func", "start": 4299947192, "end": 4299947544, "name": "FMOD::Sound::getNumTags", "pseudocode": "// \n// FMOD::Sound::getNumTags from 0x1004bfcb8 to 0x1004bfe18 (352 bytes)\n// \n// 1 xrefs:\n// > sub_1004530A4 @ 0x1004530a8\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::getNumTags(FMOD::Sound *a1, int *a2, int *a3)\n{\n  int v6; // w3\n  int v7; // w4\n  int v8; // w5\n  int v9; // w6\n  int v10; // w7\n  __int64 v11; // x20\n  unsigned int v12; // w8\n  unsigned int v13; // w8\n  int v14; // w0\n  __int64 v15; // x22\n  int v16; // w3\n  int v17; // w4\n  int v18; // w5\n  int v19; // w6\n  int v20; // w7\n  int v21; // w0\n  int v22; // w3\n  int v23; // w4\n  int v24; // w5\n  int v25; // w6\n  int v26; // w7\n  __int64 v28; // [xsp+8h] [xbp-158h] BYREF\n  unsigned int *v29; // [xsp+10h] [xbp-150h] BYREF\n  _BYTE v30[256]; // [xsp+18h] [xbp-148h] BYREF\n\n  v28 = 0;\n  v11 = sub_1004C3CE0(a1, &v29, &v28);\n  if ( !(_DWORD)v11 )\n  {\n    v12 = atomic_load(v29 + 68);\n    if ( v12 && (v13 = atomic_load(v29 + 68), v13 != 7) )\n    {\n      v11 = 46;\n    }\n    else\n    {\n      v11 = (*(__int64 (__fastcall **)(unsigned int *, int *, int *))(*(_QWORD *)v29 + 176LL))(v29, a2, a3);\n      if ( !(_DWORD)v11 )\n        goto LABEL_9;\n    }\n  }\n  if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )\n  {\n    v14 = sub_1004360AC((int)v30, 0x100u, (__int64)a2, v6, v7, v8, v9, v10);\n    v15 = v14;\n    v21 = sub_100435EB4(&v30[v14], (unsigned int)(256 - v14), \", \", v16, v17, v18, v19, v20);\n    sub_1004360AC((int)&v30[v15 + v21], (unsigned int)(256 - (v15 + v21)), (__int64)a3, v22, v23, v24, v25, v26);\n    sub_10048489C(v11, 5, (__int64)a1, (__int64)\"Sound::getNumTags\", (__int64)v30);\n  }\nLABEL_9:\n  if ( v28 )\n    sub_100442B7C(v28, 0xDu);\n  return (unsigned int)v11;\n}", "assembly": "; \n; FMOD::Sound::getNumTags from 0x1004bfcb8 to 0x1004bfe18 (352 bytes)\n; \n; 1 xrefs:\n; > sub_1004530A4 @ 0x1004530a8\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, #0x170                                         ; +0x0, 0x1004bfcb8\nSTP             X28, X27, [SP,#0x160+var_40]                           ; +0x4, 0x1004bfcbc\nSTP             X24, X23, [SP,#0x160+var_30]                           ; +0x8, 0x1004bfcc0\nSTP             X22, X21, [SP,#0x160+var_20]                           ; +0xc, 0x1004bfcc4\nSTP             X20, X19, [SP,#0x160+var_10]                           ; +0x10, 0x1004bfcc8\nSTP             X29, X30, [SP,#0x160+var_s0]                           ; +0x14, 0x1004bfccc\nADD             X29, SP, #0x160                                        ; +0x18, 0x1004bfcd0\nMOV             X21, X2                                                ; +0x1c, 0x1004bfcd4\nMOV             X22, X1                                                ; +0x20, 0x1004bfcd8\nMOV             X19, X0                                                ; +0x24, 0x1004bfcdc\nADRP            X8, #___stack_chk_guard_ptr@PAGE                       ; +0x28, 0x1004bfce0\nLDR             X8, [X8,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x2c, 0x1004bfce4\nLDR             X8, [X8]                                               ; +0x30, 0x1004bfce8\nSTUR            X8, [X29,#var_48]                                      ; +0x34, 0x1004bfcec\nSTR             XZR, [SP,#0x160+var_158]                               ; +0x38, 0x1004bfcf0\nADD             X1, SP, #0x160+var_150                                 ; +0x3c, 0x1004bfcf4\nADD             X2, SP, #0x160+var_158                                 ; +0x40, 0x1004bfcf8\nBL              sub_1004C3CE0                                          ; +0x44, 0x1004bfcfc\nMOV             X20, X0                                                ; +0x48, 0x1004bfd00\nCBNZ            W0, loc_1004BFD54                                      ; +0x4c, 0x1004bfd04\nLDR             X8, [SP,#0x160+var_150]                                ; +0x50, 0x1004bfd08\nADD             X8, X8, #0x110                                         ; +0x54, 0x1004bfd0c\nLDAR            W8, [X8]                                               ; +0x58, 0x1004bfd10\nCBZ             W8, loc_1004BFD2C                                      ; +0x5c, 0x1004bfd14\nLDR             X8, [SP,#0x160+var_150]                                ; +0x60, 0x1004bfd18\nADD             X8, X8, #0x110                                         ; +0x64, 0x1004bfd1c\nLDAR            W8, [X8]                                               ; +0x68, 0x1004bfd20\nCMP             W8, #7                                                 ; +0x6c, 0x1004bfd24\nB.NE            loc_1004BFD50                                          ; +0x70, 0x1004bfd28\nLDR             X0, [SP,#0x160+var_150]                                ; +0x74, 0x1004bfd2c\nLDR             X8, [X0]                                               ; +0x78, 0x1004bfd30\nLDR             X8, [X8,#0xB0]                                         ; +0x7c, 0x1004bfd34\nMOV             X1, X22                                                ; +0x80, 0x1004bfd38\nMOV             X2, X21                                                ; +0x84, 0x1004bfd3c\nBLR             X8                                                     ; +0x88, 0x1004bfd40\nMOV             X20, X0                                                ; +0x8c, 0x1004bfd44\nCBNZ            W0, loc_1004BFD54                                      ; +0x90, 0x1004bfd48\nB               loc_1004BFDCC                                          ; +0x94, 0x1004bfd4c\nMOV             W20, #0x2E ; '.'                                       ; +0x98, 0x1004bfd50\nADRL            X8, off_1008524C8                                      ; +0x9c, 0x1004bfd54\nLDR             X8, [X8]; unk_1008786E0                                ; +0xa4, 0x1004bfd5c\nLDRB            W8, [X8,#(dword_100878700 - 0x1008786E0)]              ; +0xa8, 0x1004bfd60\nTBZ             W8, #7, loc_1004BFDCC                                  ; +0xac, 0x1004bfd64\nADD             X23, SP, #0x160+var_148                                ; +0xb0, 0x1004bfd68\nMOV             W24, #0x100                                            ; +0xb4, 0x1004bfd6c\nADD             X0, SP, #0x160+var_148                                 ; +0xb8, 0x1004bfd70\nMOV             W1, #0x100                                             ; +0xbc, 0x1004bfd74\nMOV             X2, X22                                                ; +0xc0, 0x1004bfd78\nBL              sub_1004360AC                                          ; +0xc4, 0x1004bfd7c\nSXTW            X22, W0                                                ; +0xc8, 0x1004bfd80\nADD             X8, X23, X22                                           ; +0xcc, 0x1004bfd84\nSUB             W1, W24, W0                                            ; +0xd0, 0x1004bfd88\nADRL            X2, asc_1006C9A07; \", \"                                ; +0xd4, 0x1004bfd8c\nMOV             X0, X8                                                 ; +0xdc, 0x1004bfd94\nBL              sub_100435EB4                                          ; +0xe0, 0x1004bfd98\nADD             X8, X22, W0,SXTW                                       ; +0xe4, 0x1004bfd9c\nADD             X0, X23, X8                                            ; +0xe8, 0x1004bfda0\nSUB             W1, W24, W8                                            ; +0xec, 0x1004bfda4\nMOV             X2, X21                                                ; +0xf0, 0x1004bfda8\nBL              sub_1004360AC                                          ; +0xf4, 0x1004bfdac\nADRL            X3, aSoundGetnumtag; \"Sound::getNumTags\"               ; +0xf8, 0x1004bfdb0\nADD             X4, SP, #0x160+var_148                                 ; +0x100, 0x1004bfdb8\nMOV             X0, X20                                                ; +0x104, 0x1004bfdbc\nMOV             W1, #5                                                 ; +0x108, 0x1004bfdc0\nMOV             X2, X19                                                ; +0x10c, 0x1004bfdc4\nBL              sub_10048489C                                          ; +0x110, 0x1004bfdc8\nLDR             X0, [SP,#0x160+var_158]                                ; +0x114, 0x1004bfdcc\nCBZ             X0, loc_1004BFDDC                                      ; +0x118, 0x1004bfdd0\nMOV             W1, #0xD                                               ; +0x11c, 0x1004bfdd4\nBL              sub_100442B7C                                          ; +0x120, 0x1004bfdd8\nLDUR            X8, [X29,#var_48]                                      ; +0x124, 0x1004bfddc\nADRP            X9, #___stack_chk_guard_ptr@PAGE                       ; +0x128, 0x1004bfde0\nLDR             X9, [X9,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x12c, 0x1004bfde4\nLDR             X9, [X9]                                               ; +0x130, 0x1004bfde8\nCMP             X9, X8                                                 ; +0x134, 0x1004bfdec\nB.NE            loc_1004BFE14                                          ; +0x138, 0x1004bfdf0\nMOV             X0, X20                                                ; +0x13c, 0x1004bfdf4\nLDP             X29, X30, [SP,#0x160+var_s0]                           ; +0x140, 0x1004bfdf8\nLDP             X20, X19, [SP,#0x160+var_10]                           ; +0x144, 0x1004bfdfc\nLDP             X22, X21, [SP,#0x160+var_20]                           ; +0x148, 0x1004bfe00\nLDP             X24, X23, [SP,#0x160+var_30]                           ; +0x14c, 0x1004bfe04\nLDP             X28, X27, [SP,#0x160+var_40]                           ; +0x150, 0x1004bfe08\nADD             SP, SP, #0x170                                         ; +0x154, 0x1004bfe0c\nRET                                                                    ; +0x158, 0x1004bfe10\nBL              ___stack_chk_fail                                      ; +0x15c, 0x1004bfe14", "xrefs": ["sub_1004530A4 @ 0x1004530a8"], "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"}