{"type": "func", "start": 4296894808, "end": 4296895136, "name": "MusicDownloadManager::createCustomSFXFolder", "pseudocode": "// \n// MusicDownloadManager::createCustomSFXFolder from 0x1001d6958 to 0x1001d6aa0 (328 bytes)\n// \n// 4 xrefs:\n// > sub_1001D852C @ 0x1001d8818\n// > sub_1001D852C @ 0x1001d88cc\n// > SFXBrowser::setTextPopupClosed @ 0x1001f7710\n// > SFXFolderPickerPopup::setTextPopupClosed @ 0x100529cc4\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:25 +0000\n// \n\nchar *__fastcall MusicDownloadManager::createCustomSFXFolder(__int64 a1, __int64 a2, int a3, int a4)\n{\n  __int64 CustomSFXRoot; // x21\n  __int64 v8; // x0\n  char *v9; // x22\n  void *__p[2]; // [xsp+0h] [xbp-50h] BYREF\n  __int64 v12; // [xsp+10h] [xbp-40h]\n  __int128 v13; // [xsp+18h] [xbp-38h] BYREF\n  __int64 v14; // [xsp+28h] [xbp-28h]\n\n  CustomSFXRoot = sub_1001D6784(a1, a3);\n  if ( !CustomSFXRoot )\n    CustomSFXRoot = MusicDownloadManager::getCustomSFXRoot(a1);\n  sub_1001D6ABC((__int64 *)&v13, (std::string *)a2);\n  if ( *(char *)(a2 + 23) < 0 )\n    operator delete(*(void **)a2);\n  *(_OWORD *)a2 = v13;\n  *(_QWORD *)(a2 + 16) = v14;\n  if ( (*(char *)(a2 + 23) & 0x8000000000000000LL) != 0 )\n  {\n    if ( *(_QWORD *)(a2 + 8) )\n      goto LABEL_7;\nLABEL_14:\n    std::string::assign((std::string *)a2, \"New Folder\");\n    goto LABEL_7;\n  }\n  if ( !*(_BYTE *)(a2 + 23) )\n    goto LABEL_14;\nLABEL_7:\n  if ( (unsigned int)(a4 - 2) > 0xFFFFFD\n    || (v8 = *(_QWORD *)(a1 + 824)) != 0 && cocos2d::CCDictionary::objectForKey_1(v8, (unsigned int)a4) )\n  {\n    a4 = sub_1001D68F0(a1);\n  }\n  if ( *(char *)(a2 + 23) < 0 )\n  {\n    sub_1000097D0(__p, *(void **)a2, *(_QWORD *)(a2 + 8));\n  }\n  else\n  {\n    *(_OWORD *)__p = *(_OWORD *)a2;\n    v12 = *(_QWORD *)(a2 + 16);\n  }\n  v9 = sub_1001D6418(a4, (__int64)__p);\n  if ( SHIBYTE(v12) < 0 )\n    operator delete(__p[0]);\n  *((_DWORD *)v9 + 19) = a4;\n  cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 824), v9, a4);\n  sub_1002E74E0(*(_QWORD *)(CustomSFXRoot + 152), v9);\n  return v9;\n}", "assembly": "; \n; MusicDownloadManager::createCustomSFXFolder from 0x1001d6958 to 0x1001d6aa0 (328 bytes)\n; \n; 4 xrefs:\n; > sub_1001D852C @ 0x1001d8818\n; > sub_1001D852C @ 0x1001d88cc\n; > SFXBrowser::setTextPopupClosed @ 0x1001f7710\n; > SFXFolderPickerPopup::setTextPopupClosed @ 0x100529cc4\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:25 +0000\n; \nSUB             SP, SP, #0x60                                          ; +0x0, 0x1001d6958\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x4, 0x1001d695c\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0x8, 0x1001d6960\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0xc, 0x1001d6964\nADD             X29, SP, #0x50                                         ; +0x10, 0x1001d6968\nMOV             X20, X3                                                ; +0x14, 0x1001d696c\nMOV             X22, X1                                                ; +0x18, 0x1001d6970\nMOV             X19, X0                                                ; +0x1c, 0x1001d6974\nMOV             X1, X2                                                 ; +0x20, 0x1001d6978\nBL              sub_1001D6784                                          ; +0x24, 0x1001d697c\nMOV             X21, X0                                                ; +0x28, 0x1001d6980\nCBNZ            X0, loc_1001D6994                                      ; +0x2c, 0x1001d6984\nMOV             X0, X19                                                ; +0x30, 0x1001d6988\nBL              MusicDownloadManager__getCustomSFXRoot                 ; +0x34, 0x1001d698c\nMOV             X21, X0                                                ; +0x38, 0x1001d6990\nADD             X8, SP, #0x50+var_38                                   ; +0x3c, 0x1001d6994\nMOV             X0, X22; __str                                         ; +0x40, 0x1001d6998\nBL              sub_1001D6ABC                                          ; +0x44, 0x1001d699c\nLDRSB           W8, [X22,#0x17]                                        ; +0x48, 0x1001d69a0\nTBZ             W8, #0x1F, loc_1001D69B0                               ; +0x4c, 0x1001d69a4\nLDR             X0, [X22]; __p                                         ; +0x50, 0x1001d69a8\nBL              __ZdlPv; operator delete(void *)                       ; +0x54, 0x1001d69ac\nLDUR            Q0, [SP,#0x50+var_38]                                  ; +0x58, 0x1001d69b0\nSTR             Q0, [X22]                                              ; +0x5c, 0x1001d69b4\nLDR             X8, [SP,#0x50+var_28]                                  ; +0x60, 0x1001d69b8\nSTR             X8, [X22,#0x10]                                        ; +0x64, 0x1001d69bc\nLDRSB           X8, [X22,#0x17]                                        ; +0x68, 0x1001d69c0\nTBNZ            X8, #0x3F, loc_1001D6A1C ; '?'                         ; +0x6c, 0x1001d69c4\nCBZ             X8, loc_1001D6A24                                      ; +0x70, 0x1001d69c8\nSUB             W8, W20, #2                                            ; +0x74, 0x1001d69cc\nMOV             W9, #0xFFFFFD                                          ; +0x78, 0x1001d69d0\nCMP             W8, W9                                                 ; +0x80, 0x1001d69d8\nB.HI            loc_1001D69F4                                          ; +0x84, 0x1001d69dc\nLDR             X0, [X19,#0x338]                                       ; +0x88, 0x1001d69e0\nCBZ             X0, loc_1001D6A00                                      ; +0x8c, 0x1001d69e4\nMOV             W1, W20                                                ; +0x90, 0x1001d69e8\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x94, 0x1001d69ec\nCBZ             X0, loc_1001D6A00                                      ; +0x98, 0x1001d69f0\nMOV             X0, X19                                                ; +0x9c, 0x1001d69f4\nBL              sub_1001D68F0                                          ; +0xa0, 0x1001d69f8\nMOV             X20, X0                                                ; +0xa4, 0x1001d69fc\nLDRSB           W8, [X22,#0x17]                                        ; +0xa8, 0x1001d6a00\nTBNZ            W8, #0x1F, loc_1001D6A38                               ; +0xac, 0x1001d6a04\nLDR             Q0, [X22]                                              ; +0xb0, 0x1001d6a08\nSTR             Q0, [SP,#0x50+__p]                                     ; +0xb4, 0x1001d6a0c\nLDR             X8, [X22,#0x10]                                        ; +0xb8, 0x1001d6a10\nSTR             X8, [SP,#0x50+var_40]                                  ; +0xbc, 0x1001d6a14\nB               loc_1001D6A44                                          ; +0xc0, 0x1001d6a18\nLDR             X8, [X22,#8]                                           ; +0xc4, 0x1001d6a1c\nCBNZ            X8, loc_1001D69CC                                      ; +0xc8, 0x1001d6a20\nADRL            X1, aNewFolder; \"New Folder\"                           ; +0xcc, 0x1001d6a24\nMOV             X0, X22; this                                          ; +0xd4, 0x1001d6a2c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xd8, 0x1001d6a30\nB               loc_1001D69CC                                          ; +0xdc, 0x1001d6a34\nLDP             X1, X2, [X22]; __src                                   ; +0xe0, 0x1001d6a38\nMOV             X0, SP; __dst                                          ; +0xe4, 0x1001d6a3c\nBL              sub_1000097D0                                          ; +0xe8, 0x1001d6a40\nLDR             W2, [X21,#0x4C]                                        ; +0xec, 0x1001d6a44\nMOV             X1, SP                                                 ; +0xf0, 0x1001d6a48\nMOV             X0, X20                                                ; +0xf4, 0x1001d6a4c\nBL              sub_1001D6418                                          ; +0xf8, 0x1001d6a50\nMOV             X22, X0                                                ; +0xfc, 0x1001d6a54\nLDRSB           W8, [SP,#0x50+var_40+7]                                ; +0x100, 0x1001d6a58\nTBZ             W8, #0x1F, loc_1001D6A68                               ; +0x104, 0x1001d6a5c\nLDR             X0, [SP,#0x50+__p]; __p                                ; +0x108, 0x1001d6a60\nBL              __ZdlPv; operator delete(void *)                       ; +0x10c, 0x1001d6a64\nSTR             W20, [X22,#0x4C]                                       ; +0x110, 0x1001d6a68\nLDR             X0, [X19,#0x338]                                       ; +0x114, 0x1001d6a6c\nSXTW            X2, W20                                                ; +0x118, 0x1001d6a70\nMOV             X1, X22                                                ; +0x11c, 0x1001d6a74\nBL              cocos2d__CCDictionary__setObject_1                     ; +0x120, 0x1001d6a78\nLDR             X0, [X21,#0x98]                                        ; +0x124, 0x1001d6a7c\nMOV             X1, X22                                                ; +0x128, 0x1001d6a80\nBL              sub_1002E74E0                                          ; +0x12c, 0x1001d6a84\nMOV             X0, X22                                                ; +0x130, 0x1001d6a88\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x134, 0x1001d6a8c\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x138, 0x1001d6a90\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x13c, 0x1001d6a94\nADD             SP, SP, #0x60 ; '`'                                    ; +0x140, 0x1001d6a98\nRET                                                                    ; +0x144, 0x1001d6a9c", "xrefs": ["sub_1001D852C @ 0x1001d8818", "sub_1001D852C @ 0x1001d88cc", "SFXBrowser::setTextPopupClosed @ 0x1001f7710", "SFXFolderPickerPopup::setTextPopupClosed @ 0x100529cc4"], "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"}