{"type": "func", "start": 5373452080, "end": 5373452216, "name": "MusicDownloadManager::getCustomSFXCount", "pseudocode": "// \n// MusicDownloadManager::getCustomSFXCount from 0x140485f30 to 0x140485fb8 (136 bytes)\n// \n// 5 xrefs:\n// > SFXFolderPickerPopup::updateShareHint @ 0x1400c5e79\n// > LevelEditorLayer::updateCustomSFXMappings @ 0x1403f3ecc\n// > SFXBrowser::sfxFoldersPicked @ 0x14061d921\n// > SFXBrowser::onExportFile @ 0x14061e00c\n// > <???> @ 0x140928c04\n// \n// This function is hookable on this platform (idp: pc, 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:32:46 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall MusicDownloadManager::getCustomSFXCount(__int64 a1, __int64 a2)\n{\n  _QWORD *v4; // rax\n  cocos2d::CCDictionary *v5; // rcx\n  unsigned int v6; // ebx\n  __int128 v8; // [rsp+20h] [rbp-18h] BYREF\n\n  v8 = 0;\n  v4 = operator new(0x20u);\n  *v4 = v4;\n  v4[1] = v4;\n  v4[2] = v4;\n  *((_WORD *)v4 + 12) = 257;\n  *(_QWORD *)&v8 = v4;\n  if ( sub_140485E10(a1, a2, (__int64 *)&v8) )\n  {\n    v5 = *(cocos2d::CCDictionary **)(a1 + 920);\n    if ( v5 )\n      v6 = cocos2d::CCDictionary::count(v5) - 1;\n    else\n      v6 = 0;\n  }\n  else\n  {\n    v6 = DWORD2(v8);\n  }\n  sub_1400BD560((void **)&v8, (__int64)&v8);\n  return v6;\n}", "assembly": "; \n; MusicDownloadManager::getCustomSFXCount from 0x140485f30 to 0x140485fb8 (136 bytes)\n; \n; 5 xrefs:\n; > SFXFolderPickerPopup::updateShareHint @ 0x1400c5e79\n; > LevelEditorLayer::updateCustomSFXMappings @ 0x1403f3ecc\n; > SFXBrowser::sfxFoldersPicked @ 0x14061d921\n; > SFXBrowser::onExportFile @ 0x14061e00c\n; > <???> @ 0x140928c04\n; \n; This function is hookable on this platform (idp: pc, 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:32:46 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140485f30\npush    rdi                                                            ; +0x5, 0x140485f35\nsub     rsp, 30h                                                       ; +0x6, 0x140485f36\nmov     rbx, rdx                                                       ; +0xa, 0x140485f3a\nmov     rdi, rcx                                                       ; +0xd, 0x140485f3d\nxorps   xmm0, xmm0                                                     ; +0x10, 0x140485f40\nmovdqu  [rsp+38h+var_18], xmm0                                         ; +0x13, 0x140485f43\nmov     ecx, 20h ; ' '; Size                                           ; +0x19, 0x140485f49\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1e, 0x140485f4e\nmov     [rax], rax                                                     ; +0x23, 0x140485f53\nmov     [rax+8], rax                                                   ; +0x26, 0x140485f56\nmov     [rax+10h], rax                                                 ; +0x2a, 0x140485f5a\nmov     word ptr [rax+18h], 101h                                       ; +0x2e, 0x140485f5e\nmov     qword ptr [rsp+38h+var_18], rax                                ; +0x34, 0x140485f64\nlea     r8, [rsp+38h+var_18]                                           ; +0x39, 0x140485f69\nmov     rdx, rbx                                                       ; +0x3e, 0x140485f6e\nmov     rcx, rdi                                                       ; +0x41, 0x140485f71\ncall    sub_140485E10                                                  ; +0x44, 0x140485f74\ntest    al, al                                                         ; +0x49, 0x140485f79\njz      short loc_140485F98                                            ; +0x4b, 0x140485f7b\nmov     rcx, [rdi+398h]                                                ; +0x4d, 0x140485f7d\ntest    rcx, rcx                                                       ; +0x54, 0x140485f84\njz      short loc_140485F94                                            ; +0x57, 0x140485f87\ncall    cs:?count@CCDictionary@cocos2d@@QEAAIXZ; cocos2d::CCDictionary::count(void) ; +0x59, 0x140485f89\nlea     ebx, [rax-1]                                                   ; +0x5f, 0x140485f8f\njmp     short loc_140485F9C                                            ; +0x62, 0x140485f92\nxor     ebx, ebx                                                       ; +0x64, 0x140485f94\njmp     short loc_140485F9C                                            ; +0x66, 0x140485f96\nmov     ebx, dword ptr [rsp+38h+var_18+8]                              ; +0x68, 0x140485f98\nlea     rdx, [rsp+38h+var_18]                                          ; +0x6c, 0x140485f9c\nlea     rcx, [rsp+38h+var_18]                                          ; +0x71, 0x140485fa1\ncall    sub_1400BD560                                                  ; +0x76, 0x140485fa6\nmov     eax, ebx                                                       ; +0x7b, 0x140485fab\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x7d, 0x140485fad\nadd     rsp, 30h                                                       ; +0x82, 0x140485fb2\npop     rdi                                                            ; +0x86, 0x140485fb6\nretn                                                                   ; +0x87, 0x140485fb7", "xrefs": ["SFXFolderPickerPopup::updateShareHint @ 0x1400c5e79", "LevelEditorLayer::updateCustomSFXMappings @ 0x1403f3ecc", "SFXBrowser::sfxFoldersPicked @ 0x14061d921", "SFXBrowser::onExportFile @ 0x14061e00c", "<???> @ 0x140928c04"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}