{"type": "func", "start": 4299945796, "end": 4299946148, "name": "FMOD::Sound::getName", "pseudocode": "// \n// FMOD::Sound::getName from 0x1004bf744 to 0x1004bf8a4 (352 bytes)\n// \n// 1 xrefs:\n// > sub_100453064 @ 0x100453068\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\n// local variable allocation has failed, the output may be wrong!\nFMOD_RESULT __fastcall FMOD::Sound::getName(FMOD::Sound *a1, char *a2, int a3)\n{\n  __int64 v3; // x21\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  _WORD v30[128]; // [xsp+18h] [xbp-148h] BYREF\n\n  v3 = *(_QWORD *)&a3;\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 *, char *, __int64))(*(_QWORD *)v29 + 144LL))(v29, a2, v3);\n      if ( !(_DWORD)v11 )\n        goto LABEL_9;\n    }\n  }\n  if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )\n  {\n    v14 = sub_100435EB4(v30, 0x100u, a2, v6, v7, v8, v9, v10);\n    v15 = v14;\n    v21 = sub_100435EB4((_WORD *)((char *)v30 + v14), (unsigned int)(256 - v14), \", \", v16, v17, v18, v19, v20);\n    sub_100435CDC((_BYTE *)v30 + v15 + v21, (unsigned int)(256 - (v15 + v21)), v3, v22, v23, v24, v25, v26);\n    sub_10048489C(v11, 5, (__int64)a1, (__int64)\"Sound::getName\", (__int64)v30);\n  }\nLABEL_9:\n  if ( v28 )\n    sub_100442B7C(v28, 0xDu);\n  return (unsigned int)v11;\n}", "assembly": "; \n; FMOD::Sound::getName from 0x1004bf744 to 0x1004bf8a4 (352 bytes)\n; \n; 1 xrefs:\n; > sub_100453064 @ 0x100453068\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, 0x1004bf744\nSTP             X28, X27, [SP,#0x160+var_40]                           ; +0x4, 0x1004bf748\nSTP             X24, X23, [SP,#0x160+var_30]                           ; +0x8, 0x1004bf74c\nSTP             X22, X21, [SP,#0x160+var_20]                           ; +0xc, 0x1004bf750\nSTP             X20, X19, [SP,#0x160+var_10]                           ; +0x10, 0x1004bf754\nSTP             X29, X30, [SP,#0x160+var_s0]                           ; +0x14, 0x1004bf758\nADD             X29, SP, #0x160                                        ; +0x18, 0x1004bf75c\nMOV             X21, X2                                                ; +0x1c, 0x1004bf760\nMOV             X22, X1                                                ; +0x20, 0x1004bf764\nMOV             X19, X0                                                ; +0x24, 0x1004bf768\nADRP            X8, #___stack_chk_guard_ptr@PAGE                       ; +0x28, 0x1004bf76c\nLDR             X8, [X8,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x2c, 0x1004bf770\nLDR             X8, [X8]                                               ; +0x30, 0x1004bf774\nSTUR            X8, [X29,#var_48]                                      ; +0x34, 0x1004bf778\nSTR             XZR, [SP,#0x160+var_158]                               ; +0x38, 0x1004bf77c\nADD             X1, SP, #0x160+var_150                                 ; +0x3c, 0x1004bf780\nADD             X2, SP, #0x160+var_158                                 ; +0x40, 0x1004bf784\nBL              sub_1004C3CE0                                          ; +0x44, 0x1004bf788\nMOV             X20, X0                                                ; +0x48, 0x1004bf78c\nCBNZ            W0, loc_1004BF7E0                                      ; +0x4c, 0x1004bf790\nLDR             X8, [SP,#0x160+var_150]                                ; +0x50, 0x1004bf794\nADD             X8, X8, #0x110                                         ; +0x54, 0x1004bf798\nLDAR            W8, [X8]                                               ; +0x58, 0x1004bf79c\nCBZ             W8, loc_1004BF7B8                                      ; +0x5c, 0x1004bf7a0\nLDR             X8, [SP,#0x160+var_150]                                ; +0x60, 0x1004bf7a4\nADD             X8, X8, #0x110                                         ; +0x64, 0x1004bf7a8\nLDAR            W8, [X8]                                               ; +0x68, 0x1004bf7ac\nCMP             W8, #7                                                 ; +0x6c, 0x1004bf7b0\nB.NE            loc_1004BF7DC                                          ; +0x70, 0x1004bf7b4\nLDR             X0, [SP,#0x160+var_150]                                ; +0x74, 0x1004bf7b8\nLDR             X8, [X0]                                               ; +0x78, 0x1004bf7bc\nLDR             X8, [X8,#0x90]                                         ; +0x7c, 0x1004bf7c0\nMOV             X1, X22                                                ; +0x80, 0x1004bf7c4\nMOV             X2, X21                                                ; +0x84, 0x1004bf7c8\nBLR             X8                                                     ; +0x88, 0x1004bf7cc\nMOV             X20, X0                                                ; +0x8c, 0x1004bf7d0\nCBNZ            W0, loc_1004BF7E0                                      ; +0x90, 0x1004bf7d4\nB               loc_1004BF858                                          ; +0x94, 0x1004bf7d8\nMOV             W20, #0x2E ; '.'                                       ; +0x98, 0x1004bf7dc\nADRL            X8, off_1008524C8                                      ; +0x9c, 0x1004bf7e0\nLDR             X8, [X8]; unk_1008786E0                                ; +0xa4, 0x1004bf7e8\nLDRB            W8, [X8,#(dword_100878700 - 0x1008786E0)]              ; +0xa8, 0x1004bf7ec\nTBZ             W8, #7, loc_1004BF858                                  ; +0xac, 0x1004bf7f0\nADD             X23, SP, #0x160+var_148                                ; +0xb0, 0x1004bf7f4\nMOV             W24, #0x100                                            ; +0xb4, 0x1004bf7f8\nADD             X0, SP, #0x160+var_148                                 ; +0xb8, 0x1004bf7fc\nMOV             W1, #0x100                                             ; +0xbc, 0x1004bf800\nMOV             X2, X22                                                ; +0xc0, 0x1004bf804\nBL              sub_100435EB4                                          ; +0xc4, 0x1004bf808\nSXTW            X22, W0                                                ; +0xc8, 0x1004bf80c\nADD             X8, X23, X22                                           ; +0xcc, 0x1004bf810\nSUB             W1, W24, W0                                            ; +0xd0, 0x1004bf814\nADRL            X2, asc_1006C9A07; \", \"                                ; +0xd4, 0x1004bf818\nMOV             X0, X8                                                 ; +0xdc, 0x1004bf820\nBL              sub_100435EB4                                          ; +0xe0, 0x1004bf824\nADD             X8, X22, W0,SXTW                                       ; +0xe4, 0x1004bf828\nADD             X0, X23, X8; int                                       ; +0xe8, 0x1004bf82c\nSUB             W1, W24, W8; int                                       ; +0xec, 0x1004bf830\nMOV             X2, X21; char                                          ; +0xf0, 0x1004bf834\nBL              sub_100435CDC                                          ; +0xf4, 0x1004bf838\nADRL            X3, aSoundGetname; \"Sound::getName\"                    ; +0xf8, 0x1004bf83c\nADD             X4, SP, #0x160+var_148                                 ; +0x100, 0x1004bf844\nMOV             X0, X20                                                ; +0x104, 0x1004bf848\nMOV             W1, #5                                                 ; +0x108, 0x1004bf84c\nMOV             X2, X19                                                ; +0x10c, 0x1004bf850\nBL              sub_10048489C                                          ; +0x110, 0x1004bf854\nLDR             X0, [SP,#0x160+var_158]                                ; +0x114, 0x1004bf858\nCBZ             X0, loc_1004BF868                                      ; +0x118, 0x1004bf85c\nMOV             W1, #0xD                                               ; +0x11c, 0x1004bf860\nBL              sub_100442B7C                                          ; +0x120, 0x1004bf864\nLDUR            X8, [X29,#var_48]                                      ; +0x124, 0x1004bf868\nADRP            X9, #___stack_chk_guard_ptr@PAGE                       ; +0x128, 0x1004bf86c\nLDR             X9, [X9,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x12c, 0x1004bf870\nLDR             X9, [X9]                                               ; +0x130, 0x1004bf874\nCMP             X9, X8                                                 ; +0x134, 0x1004bf878\nB.NE            loc_1004BF8A0                                          ; +0x138, 0x1004bf87c\nMOV             X0, X20                                                ; +0x13c, 0x1004bf880\nLDP             X29, X30, [SP,#0x160+var_s0]                           ; +0x140, 0x1004bf884\nLDP             X20, X19, [SP,#0x160+var_10]                           ; +0x144, 0x1004bf888\nLDP             X22, X21, [SP,#0x160+var_20]                           ; +0x148, 0x1004bf88c\nLDP             X24, X23, [SP,#0x160+var_30]                           ; +0x14c, 0x1004bf890\nLDP             X28, X27, [SP,#0x160+var_40]                           ; +0x150, 0x1004bf894\nADD             SP, SP, #0x170                                         ; +0x154, 0x1004bf898\nRET                                                                    ; +0x158, 0x1004bf89c\nBL              ___stack_chk_fail                                      ; +0x15c, 0x1004bf8a0", "xrefs": ["sub_100453064 @ 0x100453068"], "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"}