{"type": "func", "start": 5372106928, "end": 5372107319, "name": "MusicDownloadManager::onGetSongInfoCompleted", "pseudocode": "// \n// MusicDownloadManager::onGetSongInfoCompleted from 0x14033d8b0 to 0x14033da37 (391 bytes)\n// \n// 2 xrefs:\n// > MusicDownloadManager::handleIt @ 0x14033d19e\n// > <???> @ 0x1406d5600\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=2\nvoid __fastcall MusicDownloadManager::onGetSongInfoCompleted(MusicDownloadManager *a1, const void **a2, const char *a3)\n{\n  const char *v6; // rcx\n  int v7; // r15d\n  cocos2d::CCString *v8; // rax\n  const char *CString; // rax\n  const void *v10; // rcx\n  unsigned __int64 v11; // rbp\n  size_t v12; // r14\n  const void *v13; // rcx\n  __int64 v14; // rax\n  SongInfoObject *v15; // rax\n  __int128 Buf2; // [rsp+38h] [rbp-60h] BYREF\n  __int64 v17; // [rsp+48h] [rbp-50h]\n  __int64 v18; // [rsp+50h] [rbp-48h]\n\n  v6 = a3;\n  if ( *((_QWORD *)a3 + 3) > 0xFu )\n    v6 = *(const char **)a3;\n  v7 = atoi(v6);\n  v8 = cocos2d::CCString::createWithFormat(\"i_%i\", v7);\n  CString = cocos2d::CCString::getCString(v8);\n  MusicDownloadManager::removeDLFromActive(a1, CString);\n  Buf2 = 0;\n  v17 = 2;\n  v18 = 15;\n  strcpy((char *)&Buf2, \"-1\");\n  v10 = a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v10 = *a2;\n  v11 = (unsigned __int64)a2[2];\n  v12 = v11;\n  if ( v11 > 2 )\n    v12 = 2;\n  if ( !memcmp(v10, &Buf2, v12) && v11 == 2 )\n  {\nLABEL_15:\n    MusicDownloadManager::loadSongInfoFailed(a1, v7, FailedToFetch);\n    goto LABEL_17;\n  }\n  Buf2 = 0;\n  v17 = 2;\n  v18 = 15;\n  strcpy((char *)&Buf2, \"-2\");\n  v13 = a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v13 = *a2;\n  if ( memcmp(v13, &Buf2, v12) || v11 != 2 )\n  {\n    v14 = sub_14003BDB0((__int64)&Buf2, (__int64)a2);\n    v15 = (SongInfoObject *)MusicDownloadManager::addSongObjectFromString(a1, v14);\n    if ( v15 )\n    {\n      MusicDownloadManager::loadSongInfoFinished(a1, v15);\n      goto LABEL_17;\n    }\n    goto LABEL_15;\n  }\n  MusicDownloadManager::loadSongInfoFailed(a1, v7, NotAllowed);\nLABEL_17:\n  sub_14003A830((__int64)a2);\n  sub_14003A830((__int64)a3);\n}", "assembly": "; \n; MusicDownloadManager::onGetSongInfoCompleted from 0x14033d8b0 to 0x14033da37 (391 bytes)\n; \n; 2 xrefs:\n; > MusicDownloadManager::handleIt @ 0x14033d19e\n; > <???> @ 0x1406d5600\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\npush    rbx                                                            ; +0x0, 0x14033d8b0\npush    rbp                                                            ; +0x2, 0x14033d8b2\npush    rsi                                                            ; +0x3, 0x14033d8b3\npush    rdi                                                            ; +0x4, 0x14033d8b4\npush    r13                                                            ; +0x5, 0x14033d8b5\npush    r14                                                            ; +0x7, 0x14033d8b7\npush    r15                                                            ; +0x9, 0x14033d8b9\nsub     rsp, 60h                                                       ; +0xb, 0x14033d8bb\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x14033d8bf\nxor     rax, rsp                                                       ; +0x16, 0x14033d8c6\nmov     [rsp+98h+var_40], rax                                          ; +0x19, 0x14033d8c9\nmov     rdi, r8                                                        ; +0x1e, 0x14033d8ce\nmov     rbx, rdx                                                       ; +0x21, 0x14033d8d1\nmov     rsi, rcx                                                       ; +0x24, 0x14033d8d4\nmov     [rsp+98h+var_70], rdx                                          ; +0x27, 0x14033d8d7\nmov     [rsp+98h+var_68], r8                                           ; +0x2c, 0x14033d8dc\nmov     rcx, r8                                                        ; +0x31, 0x14033d8e1\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x34, 0x14033d8e4\njbe     short loc_14033D8EE                                            ; +0x39, 0x14033d8e9\nmov     rcx, [r8]; String                                              ; +0x3b, 0x14033d8eb\ncall    cs:atoi                                                        ; +0x3e, 0x14033d8ee\nmov     r15d, eax                                                      ; +0x44, 0x14033d8f4\nmov     edx, eax                                                       ; +0x47, 0x14033d8f7\nlea     rcx, aII_3; \"i_%i\"                                             ; +0x49, 0x14033d8f9\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x50, 0x14033d900\nmov     rcx, rax                                                       ; +0x56, 0x14033d906\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x59, 0x14033d909\nmov     rdx, rax                                                       ; +0x5f, 0x14033d90f\nmov     rcx, rsi                                                       ; +0x62, 0x14033d912\ncall    MusicDownloadManager__removeDLFromActive                       ; +0x65, 0x14033d915\nxorps   xmm0, xmm0                                                     ; +0x6a, 0x14033d91a\nmovups  [rsp+98h+Buf2], xmm0                                           ; +0x6d, 0x14033d91d\nmov     r13d, 2                                                        ; +0x72, 0x14033d922\nmov     [rsp+98h+var_50], r13                                          ; +0x78, 0x14033d928\nmov     [rsp+98h+var_48], 0Fh                                          ; +0x7d, 0x14033d92d\nmov     eax, 312Dh                                                     ; +0x86, 0x14033d936\nmov     word ptr [rsp+98h+Buf2], ax                                    ; +0x8b, 0x14033d93b\nmov     byte ptr [rsp+98h+Buf2+2], 0                                   ; +0x90, 0x14033d940\nmov     rcx, rbx                                                       ; +0x95, 0x14033d945\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x98, 0x14033d948\njbe     short loc_14033D952                                            ; +0x9d, 0x14033d94d\nmov     rcx, [rbx]; Buf1                                               ; +0x9f, 0x14033d94f\nmov     rbp, [rbx+10h]                                                 ; +0xa2, 0x14033d952\nmov     r14, rbp                                                       ; +0xa6, 0x14033d956\ncmp     rbp, r13                                                       ; +0xa9, 0x14033d959\ncmova   r14, r13                                                       ; +0xac, 0x14033d95c\nmov     r8, r14; Size                                                  ; +0xb0, 0x14033d960\nlea     rdx, [rsp+98h+Buf2]; Buf2                                      ; +0xb3, 0x14033d963\ncall    memcmp                                                         ; +0xb8, 0x14033d968\ntest    eax, eax                                                       ; +0xbd, 0x14033d96d\njnz     short loc_14033D976                                            ; +0xbf, 0x14033d96f\ncmp     rbp, r13                                                       ; +0xc1, 0x14033d971\njz      short loc_14033D9EB                                            ; +0xc4, 0x14033d974\nxorps   xmm0, xmm0                                                     ; +0xc6, 0x14033d976\nmovups  [rsp+98h+Buf2], xmm0                                           ; +0xc9, 0x14033d979\nmov     [rsp+98h+var_50], r13                                          ; +0xce, 0x14033d97e\nmov     [rsp+98h+var_48], 0Fh                                          ; +0xd3, 0x14033d983\nmov     eax, 322Dh                                                     ; +0xdc, 0x14033d98c\nmov     word ptr [rsp+98h+Buf2], ax                                    ; +0xe1, 0x14033d991\nmov     byte ptr [rsp+98h+Buf2+2], 0                                   ; +0xe6, 0x14033d996\nmov     rcx, rbx                                                       ; +0xeb, 0x14033d99b\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0xee, 0x14033d99e\njbe     short loc_14033D9A8                                            ; +0xf3, 0x14033d9a3\nmov     rcx, [rbx]; Buf1                                               ; +0xf5, 0x14033d9a5\nmov     r8, r14; Size                                                  ; +0xf8, 0x14033d9a8\nlea     rdx, [rsp+98h+Buf2]; Buf2                                      ; +0xfb, 0x14033d9ab\ncall    memcmp                                                         ; +0x100, 0x14033d9b0\ntest    eax, eax                                                       ; +0x105, 0x14033d9b5\njnz     short loc_14033D9CE                                            ; +0x107, 0x14033d9b7\ncmp     rbp, r13                                                       ; +0x109, 0x14033d9b9\njnz     short loc_14033D9CE                                            ; +0x10c, 0x14033d9bc\nmov     r8d, r13d                                                      ; +0x10e, 0x14033d9be\nmov     edx, r15d                                                      ; +0x111, 0x14033d9c1\nmov     rcx, rsi                                                       ; +0x114, 0x14033d9c4\ncall    MusicDownloadManager__loadSongInfoFailed                       ; +0x117, 0x14033d9c7\njmp     short loc_14033DA0A                                            ; +0x11c, 0x14033d9cc\nmov     rdx, rbx                                                       ; +0x11e, 0x14033d9ce\nlea     rcx, [rsp+98h+Buf2]                                            ; +0x121, 0x14033d9d1\ncall    sub_14003BDB0                                                  ; +0x126, 0x14033d9d6\nmov     rdx, rax                                                       ; +0x12b, 0x14033d9db\nmov     rcx, rsi                                                       ; +0x12e, 0x14033d9de\ncall    MusicDownloadManager__addSongObjectFromString                  ; +0x131, 0x14033d9e1\ntest    rax, rax                                                       ; +0x136, 0x14033d9e6\njnz     short loc_14033D9FE                                            ; +0x139, 0x14033d9e9\nmov     r8d, 1                                                         ; +0x13b, 0x14033d9eb\nmov     edx, r15d                                                      ; +0x141, 0x14033d9f1\nmov     rcx, rsi                                                       ; +0x144, 0x14033d9f4\ncall    MusicDownloadManager__loadSongInfoFailed                       ; +0x147, 0x14033d9f7\njmp     short loc_14033DA0A                                            ; +0x14c, 0x14033d9fc\nmov     rdx, rax                                                       ; +0x14e, 0x14033d9fe\nmov     rcx, rsi                                                       ; +0x151, 0x14033da01\ncall    MusicDownloadManager__loadSongInfoFinished                     ; +0x154, 0x14033da04\nnop                                                                    ; +0x159, 0x14033da09\nmov     rcx, rbx                                                       ; +0x15a, 0x14033da0a\ncall    sub_14003A830                                                  ; +0x15d, 0x14033da0d\nnop                                                                    ; +0x162, 0x14033da12\nmov     rcx, rdi                                                       ; +0x163, 0x14033da13\ncall    sub_14003A830                                                  ; +0x166, 0x14033da16\nmov     rcx, [rsp+98h+var_40]                                          ; +0x16b, 0x14033da1b\nxor     rcx, rsp; StackCookie                                          ; +0x170, 0x14033da20\ncall    __security_check_cookie                                        ; +0x173, 0x14033da23\nadd     rsp, 60h                                                       ; +0x178, 0x14033da28\npop     r15                                                            ; +0x17c, 0x14033da2c\npop     r14                                                            ; +0x17e, 0x14033da2e\npop     r13                                                            ; +0x180, 0x14033da30\npop     rdi                                                            ; +0x182, 0x14033da32\npop     rsi                                                            ; +0x183, 0x14033da33\npop     rbp                                                            ; +0x184, 0x14033da34\npop     rbx                                                            ; +0x185, 0x14033da35\nretn                                                                   ; +0x186, 0x14033da36", "xrefs": ["MusicDownloadManager::handleIt @ 0x14033d19e", "<???> @ 0x1406d5600"], "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"}