{"type": "func", "start": 4296898916, "end": 4296899204, "name": "MusicDownloadManager::encodeCustomSFXMappingEntries", "pseudocode": "// \n// MusicDownloadManager::encodeCustomSFXMappingEntries from 0x1001d7964 to 0x1001d7a84 (288 bytes)\n// \n// 2 xrefs:\n// > sub_1003FC928 @ 0x1003fde38\n// > sub_1004C97AC @ 0x1004c9a84\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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:00:26 +0000\n// \n\nstd::string *__usercall MusicDownloadManager::encodeCustomSFXMappingEntries@<X0>(\n        std::string *result@<X0>,\n        __int64 a2@<X8>)\n{\n  std::string::size_type *p_size; // x20\n  std::string::size_type *v4; // x22\n  __int64 v5; // x8\n  int v6; // w11\n  const std::string::value_type *v7; // x1\n  std::string::size_type v8; // x2\n  std::string::size_type *v9; // x9\n  std::string::size_type *v10; // x8\n  bool v11; // zf\n  char __str[32]; // [xsp+18h] [xbp-48h] BYREF\n\n  *(_QWORD *)a2 = 0;\n  *(_QWORD *)(a2 + 8) = 0;\n  *(_QWORD *)(a2 + 16) = 0;\n  p_size = &result->__r_.__value_.__l.__size_;\n  v4 = (std::string::size_type *)result->__r_.__value_.__r.__words[0];\n  if ( (std::string::size_type *)result->__r_.__value_.__l.__data_ != &result->__r_.__value_.__r.__words[1] )\n  {\n    do\n    {\n      v5 = *(unsigned __int8 *)(a2 + 23);\n      if ( (v5 & 0x80u) != 0LL )\n        v5 = *(_QWORD *)(a2 + 8);\n      if ( v5 )\n        std::string::push_back((std::string *)a2, 124);\n      snprintf(__str, 0x20u, \"%d:%d:\", *((_DWORD *)v4 + 8), *((_DWORD *)v4 + 9));\n      std::string::append((std::string *)a2, __str);\n      v6 = *((char *)v4 + 63);\n      if ( v6 >= 0 )\n        v7 = (const std::string::value_type *)(v4 + 5);\n      else\n        v7 = (const std::string::value_type *)v4[5];\n      if ( v6 >= 0 )\n        v8 = *((unsigned __int8 *)v4 + 63);\n      else\n        v8 = v4[6];\n      result = std::string::append((std::string *)a2, v7, v8);\n      v9 = (std::string::size_type *)v4[1];\n      if ( v9 )\n      {\n        do\n        {\n          v10 = v9;\n          v9 = (std::string::size_type *)*v9;\n        }\n        while ( v9 );\n      }\n      else\n      {\n        do\n        {\n          v10 = (std::string::size_type *)v4[2];\n          v11 = *v10 == (_QWORD)v4;\n          v4 = v10;\n        }\n        while ( !v11 );\n      }\n      v4 = v10;\n    }\n    while ( v10 != p_size );\n  }\n  return result;\n}", "assembly": "; \n; MusicDownloadManager::encodeCustomSFXMappingEntries from 0x1001d7964 to 0x1001d7a84 (288 bytes)\n; \n; 2 xrefs:\n; > sub_1003FC928 @ 0x1003fde38\n; > sub_1004C97AC @ 0x1004c9a84\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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:00:26 +0000\n; \nSUB             SP, SP, #0x70                                          ; +0x0, 0x1001d7964\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x4, 0x1001d7968\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x8, 0x1001d796c\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0xc, 0x1001d7970\nADD             X29, SP, #0x60                                         ; +0x10, 0x1001d7974\nMOV             X20, X0                                                ; +0x14, 0x1001d7978\nMOV             X19, X8                                                ; +0x18, 0x1001d797c\nADRP            X8, #___stack_chk_guard_ptr@PAGE                       ; +0x1c, 0x1001d7980\nLDR             X8, [X8,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x20, 0x1001d7984\nLDR             X8, [X8]                                               ; +0x24, 0x1001d7988\nSTUR            X8, [X29,#var_28]                                      ; +0x28, 0x1001d798c\nSTP             XZR, XZR, [X19]                                        ; +0x2c, 0x1001d7990\nSTR             XZR, [X19,#0x10]                                       ; +0x30, 0x1001d7994\nLDR             X22, [X20],#8                                          ; +0x34, 0x1001d7998\nCMP             X22, X20                                               ; +0x38, 0x1001d799c\nB.EQ            loc_1001D7A54                                          ; +0x3c, 0x1001d79a0\nADRL            X21, aDD; \"%d:%d:\"                                     ; +0x40, 0x1001d79a4\nLDRB            W8, [X19,#0x17]                                        ; +0x48, 0x1001d79ac\nSXTB            W9, W8                                                 ; +0x4c, 0x1001d79b0\nLDR             X10, [X19,#8]                                          ; +0x50, 0x1001d79b4\nCMP             W9, #0                                                 ; +0x54, 0x1001d79b8\nCSEL            X8, X10, X8, LT                                        ; +0x58, 0x1001d79bc\nCBZ             X8, loc_1001D79D0                                      ; +0x5c, 0x1001d79c0\nMOV             X0, X19; this                                          ; +0x60, 0x1001d79c4\nMOV             W1, #0x7C ; '|'; __c                                   ; +0x64, 0x1001d79c8\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc; std::string::push_back(char) ; +0x68, 0x1001d79cc\nLDP             W8, W9, [X22,#0x20]                                    ; +0x6c, 0x1001d79d0\nSTP             X8, X9, [SP,#0x60+var_60]                              ; +0x70, 0x1001d79d4\nADD             X0, SP, #0x60+__str; __str                             ; +0x74, 0x1001d79d8\nMOV             W1, #0x20 ; ' '; __size                                ; +0x78, 0x1001d79dc\nMOV             X2, X21; __format                                      ; +0x7c, 0x1001d79e0\nBL              _snprintf                                              ; +0x80, 0x1001d79e4\nADD             X1, SP, #0x60+__str; __s                               ; +0x84, 0x1001d79e8\nMOV             X0, X19; this                                          ; +0x88, 0x1001d79ec\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0x8c, 0x1001d79f0\nMOV             X8, X22                                                ; +0x90, 0x1001d79f4\nLDR             X9, [X8,#0x28]!                                        ; +0x94, 0x1001d79f8\nLDRB            W10, [X8,#0x17]                                        ; +0x98, 0x1001d79fc\nSXTB            W11, W10                                               ; +0x9c, 0x1001d7a00\nLDR             X12, [X8,#8]                                           ; +0xa0, 0x1001d7a04\nCMP             W11, #0                                                ; +0xa4, 0x1001d7a08\nCSEL            X1, X9, X8, LT; __s                                    ; +0xa8, 0x1001d7a0c\nCSEL            X2, X12, X10, LT; __n                                  ; +0xac, 0x1001d7a10\nMOV             X0, X19; this                                          ; +0xb0, 0x1001d7a14\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm; std::string::append(char const*,ulong) ; +0xb4, 0x1001d7a18\nLDR             X9, [X22,#8]                                           ; +0xb8, 0x1001d7a1c\nCBZ             X9, loc_1001D7A34                                      ; +0xbc, 0x1001d7a20\nMOV             X8, X9                                                 ; +0xc0, 0x1001d7a24\nLDR             X9, [X9]                                               ; +0xc4, 0x1001d7a28\nCBNZ            X9, loc_1001D7A24                                      ; +0xc8, 0x1001d7a2c\nB               loc_1001D7A48                                          ; +0xcc, 0x1001d7a30\nLDR             X8, [X22,#0x10]                                        ; +0xd0, 0x1001d7a34\nLDR             X9, [X8]                                               ; +0xd4, 0x1001d7a38\nCMP             X9, X22                                                ; +0xd8, 0x1001d7a3c\nMOV             X22, X8                                                ; +0xdc, 0x1001d7a40\nB.NE            loc_1001D7A34                                          ; +0xe0, 0x1001d7a44\nMOV             X22, X8                                                ; +0xe4, 0x1001d7a48\nCMP             X8, X20                                                ; +0xe8, 0x1001d7a4c\nB.NE            loc_1001D79AC                                          ; +0xec, 0x1001d7a50\nLDUR            X8, [X29,#var_28]                                      ; +0xf0, 0x1001d7a54\nADRP            X9, #___stack_chk_guard_ptr@PAGE                       ; +0xf4, 0x1001d7a58\nLDR             X9, [X9,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0xf8, 0x1001d7a5c\nLDR             X9, [X9]                                               ; +0xfc, 0x1001d7a60\nCMP             X9, X8                                                 ; +0x100, 0x1001d7a64\nB.NE            loc_1001D7A80                                          ; +0x104, 0x1001d7a68\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x108, 0x1001d7a6c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x10c, 0x1001d7a70\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x110, 0x1001d7a74\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x114, 0x1001d7a78\nRET                                                                    ; +0x118, 0x1001d7a7c\nBL              ___stack_chk_fail                                      ; +0x11c, 0x1001d7a80", "xrefs": ["sub_1003FC928 @ 0x1003fde38", "sub_1004C97AC @ 0x1004c9a84"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}