{"type": "func", "start": 5372112832, "end": 5372113027, "name": "MusicDownloadManager::addDLToActive", "pseudocode": "// \n// MusicDownloadManager::addDLToActive from 0x14033efc0 to 0x14033f083 (195 bytes)\n// \n// 5 xrefs:\n// > MusicDownloadManager::getSongInfo @ 0x14033d6b1\n// > MusicDownloadManager::downloadSong @ 0x14033ec6d\n// > MusicDownloadManager::downloadCustomSong @ 0x1403404fe\n// > MusicDownloadManager::downloadSFX @ 0x14034241f\n// > <???> @ 0x1406d56a8\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// Hidden C++ exception states: #wind=1\nvoid MusicDownloadManager::addDLToActive(MusicDownloadManager *a1, const char *a2, cocos2d::CCObject *a3)\n{\n  size_t v5; // r8\n  void *v6; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v8; // [rsp+30h] [rbp-28h]\n\n  *(_OWORD *)Block = 0;\n  v8 = 0;\n  v5 = -1;\n  do\n    ++v5;\n  while ( a2[v5] );\n  sub_14003A930(Block, a2, v5);\n  cocos2d::CCDictionary::setObject(a1->m_activeDownloads, a3, Block);\n  if ( *((_QWORD *)&v8 + 1) > 0xFu )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v8 + 1) + 1LL) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v6);\n  }\n}", "assembly": "; \n; MusicDownloadManager::addDLToActive from 0x14033efc0 to 0x14033f083 (195 bytes)\n; \n; 5 xrefs:\n; > MusicDownloadManager::getSongInfo @ 0x14033d6b1\n; > MusicDownloadManager::downloadSong @ 0x14033ec6d\n; > MusicDownloadManager::downloadCustomSong @ 0x1403404fe\n; > MusicDownloadManager::downloadSFX @ 0x14034241f\n; > <???> @ 0x1406d56a8\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\nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x14033efc0\npush    rdi                                                            ; +0x5, 0x14033efc5\nsub     rsp, 50h                                                       ; +0x6, 0x14033efc6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14033efca\nxor     rax, rsp                                                       ; +0x11, 0x14033efd1\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x14033efd4\nmov     rdi, r8                                                        ; +0x19, 0x14033efd9\nmov     rbx, rcx                                                       ; +0x1c, 0x14033efdc\nxorps   xmm0, xmm0                                                     ; +0x1f, 0x14033efdf\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x22, 0x14033efe2\nxorps   xmm1, xmm1                                                     ; +0x27, 0x14033efe7\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x2a, 0x14033efea\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x30, 0x14033eff0\nnop     word ptr [rax+rax+00000000h]                                   ; +0x37, 0x14033eff7\ninc     r8                                                             ; +0x40, 0x14033f000\ncmp     byte ptr [rdx+r8], 0                                           ; +0x43, 0x14033f003\njnz     short loc_14033F000                                            ; +0x48, 0x14033f008\nlea     rcx, [rsp+58h+Block]                                           ; +0x4a, 0x14033f00a\ncall    sub_14003A930                                                  ; +0x4f, 0x14033f00f\nnop                                                                    ; +0x54, 0x14033f014\nlea     r8, [rsp+58h+Block]                                            ; +0x55, 0x14033f015\nmov     rdx, rdi                                                       ; +0x5a, 0x14033f01a\nmov     rcx, [rbx+148h]                                                ; +0x5d, 0x14033f01d\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x64, 0x14033f024\nnop                                                                    ; +0x6a, 0x14033f02a\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x6b, 0x14033f02b\ncmp     rdx, 0Fh                                                       ; +0x70, 0x14033f030\njbe     short loc_14033F06B                                            ; +0x74, 0x14033f034\ninc     rdx                                                            ; +0x76, 0x14033f036\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x79, 0x14033f039\nmov     rax, rcx                                                       ; +0x7e, 0x14033f03e\ncmp     rdx, 1000h                                                     ; +0x81, 0x14033f041\njb      short loc_14033F066                                            ; +0x88, 0x14033f048\nadd     rdx, 27h ; '''                                                 ; +0x8a, 0x14033f04a\nmov     rcx, [rcx-8]                                                   ; +0x8e, 0x14033f04e\nsub     rax, rcx                                                       ; +0x92, 0x14033f052\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x95, 0x14033f055\ncmp     rax, 1Fh                                                       ; +0x99, 0x14033f059\njbe     short loc_14033F066                                            ; +0x9d, 0x14033f05d\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x9f, 0x14033f05f\nalign 2                                                                ; +0xa5, 0x14033f065\ncall    j_j_free                                                       ; +0xa6, 0x14033f066\nmov     rcx, [rsp+58h+var_18]                                          ; +0xab, 0x14033f06b\nxor     rcx, rsp; StackCookie                                          ; +0xb0, 0x14033f070\ncall    __security_check_cookie                                        ; +0xb3, 0x14033f073\nmov     rbx, [rsp+58h+arg_18]                                          ; +0xb8, 0x14033f078\nadd     rsp, 50h                                                       ; +0xbd, 0x14033f07d\npop     rdi                                                            ; +0xc1, 0x14033f081\nretn                                                                   ; +0xc2, 0x14033f082", "xrefs": ["MusicDownloadManager::getSongInfo @ 0x14033d6b1", "MusicDownloadManager::downloadSong @ 0x14033ec6d", "MusicDownloadManager::downloadCustomSong @ 0x1403404fe", "MusicDownloadManager::downloadSFX @ 0x14034241f", "<???> @ 0x1406d56a8"], "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"}