{"type": "func", "start": 4301393024, "end": 4301393443, "name": "CustomSongWidget::downloadSongFailed", "pseudocode": "// \n// CustomSongWidget::downloadSongFailed from 0x100620c80 to 0x100620e23 (419 bytes)\n// \n// 2 xrefs:\n// > sub_100620E90 @ 0x100620e9c\n// > <???> @ 0x100982258\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\nvoid __fastcall CustomSongWidget::downloadSongFailed(CustomSongWidget *a1, int a2, GJSongError a3)\n{\n  std::__vector_base<GJAssetDownloadAction>::pointer begin; // r14\n  std::__vector_base<GJAssetDownloadAction>::pointer end; // rax\n  size_t v6; // r15\n  __int64 v7; // rcx\n  cocos2d::CCLabelBMFont *m_errorLabel; // rdi\n  cocos2d::CCLabelBMFont *v10; // rdi\n  void (__cdecl *setString)(cocos2d::CCLabelBMFont *__hidden, const char *); // rax\n  cocos2d::CCLabelBMFont *v12; // rdi\n  float v13; // xmm0_4\n  float v14; // xmm1_4\n  __int128 v15; // [rsp+0h] [rbp-30h] BYREF\n\n  if ( !a1->m_hasSFX )\n  {\n    if ( a1->m_customSongID != a2 || a1->m_customSongID == 0 )\n      return;\n    m_errorLabel = a1->m_errorLabel;\n    BYTE2(v15) = 25;\n    LOWORD(v15) = 13055;\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))m_errorLabel->setColor)(m_errorLabel, &v15);\n    v10 = a1->m_errorLabel;\n    setString = v10->setString;\n    if ( (unsigned int)(a3 - 1) > 2 )\n    {\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))setString)(\n        v10,\n        \"Download failed. Please try later.\");\n      v12 = a1->m_errorLabel;\n      if ( !a1->m_isMusicLibrary )\n        goto LABEL_13;\n    }\n    else\n    {\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))setString)(v10, off_100982350[a3 - 1]);\n      v12 = a1->m_errorLabel;\n      if ( !a1->m_isMusicLibrary )\n      {\nLABEL_13:\n        v13 = 230.0;\n        v14 = 0.40000001;\nLABEL_16:\n        cocos2d::CCLabelBMFont::limitLabelWidth(v12, v13, v14, 0.0);\n        CustomSongWidget::showError(a1, 0);\n        ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_sliderGroove->setVisible)(a1->m_sliderGroove, 0);\n        cocos2d::CCNode::unschedule(\n          a1,\n          (cocos2d::SEL_SCHEDULE)(unsigned __int64)CustomSongWidget::updateDownloadProgress);\n        a1->m_isNotDownloading = 0;\n        CustomSongWidget::updateSongInfo(a1);\n        return;\n      }\n    }\n    v13 = 140.0;\n    v14 = 0.34999999;\n    goto LABEL_16;\n  }\n  begin = a1->m_undownloadedAssets.__begin_;\n  end = a1->m_undownloadedAssets.__end_;\n  if ( begin != end )\n  {\n    v6 = (char *)end - (char *)begin - 19;\n    while ( begin->m_id != a2 || begin->m_assetType != 1 )\n    {\n      begin = (std::__vector_base<GJAssetDownloadAction>::pointer)((char *)begin + 16);\n      v6 -= 16LL;\n      if ( begin == end )\n        return;\n    }\n    ++begin->m_status;\n    LOBYTE(begin[1].m_id) = 0;\n    if ( &begin[1].m_assetType != (GJAssetType *)end )\n    {\n      v15 = *(_OWORD *)&begin->m_id;\n      memmove(begin, &begin[1].m_assetType, v6);\n      v7 = *(_QWORD *)((char *)&v15 + 5);\n      *(_QWORD *)((char *)&begin->m_id + v6 + 3) = v15;\n      *(_QWORD *)((char *)&begin->m_status + v6) = v7;\n    }\n    CustomSongWidget::processNextMultiAsset(a1);\n  }\n}", "assembly": "; \n; CustomSongWidget::downloadSongFailed from 0x100620c80 to 0x100620e23 (419 bytes)\n; \n; 2 xrefs:\n; > sub_100620E90 @ 0x100620e9c\n; > <???> @ 0x100982258\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    rbp                                                            ; +0x0, 0x100620c80\nmov     rbp, rsp                                                       ; +0x1, 0x100620c81\npush    r15                                                            ; +0x4, 0x100620c84\npush    r14                                                            ; +0x6, 0x100620c86\npush    rbx                                                            ; +0x8, 0x100620c88\nsub     rsp, 18h                                                       ; +0x9, 0x100620c89\nmov     rbx, rdi                                                       ; +0xd, 0x100620c8d\ncmp     byte ptr [rdi+209h], 1                                         ; +0x10, 0x100620c90\njnz     loc_100620D26                                                  ; +0x17, 0x100620c97\nmov     r14, [rbx+240h]                                                ; +0x1d, 0x100620c9d\nmov     rax, [rbx+248h]                                                ; +0x24, 0x100620ca4\ncmp     r14, rax                                                       ; +0x2b, 0x100620cab\njz      loc_100620E18                                                  ; +0x2e, 0x100620cae\nmov     r15, rax                                                       ; +0x34, 0x100620cb4\nsub     r15, r14                                                       ; +0x37, 0x100620cb7\nadd     r15, 0FFFFFFFFFFFFFFEDh                                        ; +0x3a, 0x100620cba\njmp     short loc_100620CD1                                            ; +0x3e, 0x100620cbe\nadd     r14, 10h                                                       ; +0x40, 0x100620cc0\nadd     r15, 0FFFFFFFFFFFFFFF0h                                        ; +0x44, 0x100620cc4\ncmp     r14, rax                                                       ; +0x48, 0x100620cc8\njz      loc_100620E18                                                  ; +0x4b, 0x100620ccb\ncmp     [r14], esi                                                     ; +0x51, 0x100620cd1\njnz     short loc_100620CC0                                            ; +0x54, 0x100620cd4\ncmp     dword ptr [r14+4], 1                                           ; +0x56, 0x100620cd6\njnz     short loc_100620CC0                                            ; +0x5b, 0x100620cdb\ninc     dword ptr [r14+8]                                              ; +0x5d, 0x100620cdd\nmov     byte ptr [r14+0Ch], 0                                          ; +0x61, 0x100620ce1\nlea     rsi, [r14+10h]; __src                                          ; +0x66, 0x100620ce6\ncmp     rsi, rax                                                       ; +0x6a, 0x100620cea\njz      short loc_100620D14                                            ; +0x6d, 0x100620ced\nmovups  xmm0, xmmword ptr [r14]                                        ; +0x6f, 0x100620cef\nmovaps  [rbp+var_30], xmm0                                             ; +0x73, 0x100620cf3\nmov     rdi, r14; __dst                                                ; +0x77, 0x100620cf7\nmov     rdx, r15; __len                                                ; +0x7a, 0x100620cfa\ncall    _memmove                                                       ; +0x7d, 0x100620cfd\nmov     rax, qword ptr [rbp+var_30]                                    ; +0x82, 0x100620d02\nmov     rcx, qword ptr [rbp+var_30+5]                                  ; +0x86, 0x100620d06\nmov     [r15+r14+3], rax                                               ; +0x8a, 0x100620d0a\nmov     [r15+r14+8], rcx                                               ; +0x8f, 0x100620d0f\nmov     rdi, rbx                                                       ; +0x94, 0x100620d14\nadd     rsp, 18h                                                       ; +0x97, 0x100620d17\npop     rbx                                                            ; +0x9b, 0x100620d1b\npop     r14                                                            ; +0x9c, 0x100620d1c\npop     r15                                                            ; +0x9e, 0x100620d1e\npop     rbp                                                            ; +0xa0, 0x100620d20\njmp     CustomSongWidget__processNextMultiAsset                        ; +0xa1, 0x100620d21\nmov     eax, [rbx+1F0h]                                                ; +0xa6, 0x100620d26\ncmp     eax, esi                                                       ; +0xac, 0x100620d2c\nsetnz   cl                                                             ; +0xae, 0x100620d2e\ntest    eax, eax                                                       ; +0xb1, 0x100620d31\nsetz    al                                                             ; +0xb3, 0x100620d33\nor      al, cl                                                         ; +0xb6, 0x100620d36\njnz     loc_100620E18                                                  ; +0xb8, 0x100620d38\nmov     rdi, [rbx+178h]                                                ; +0xbe, 0x100620d3e\nmov     byte ptr [rbp+var_30+2], 19h                                   ; +0xc5, 0x100620d45\nmov     word ptr [rbp+var_30], 32FFh                                   ; +0xc9, 0x100620d49\nmov     rax, [rdi]                                                     ; +0xcf, 0x100620d4f\nlea     rsi, [rbp+var_30]                                              ; +0xd2, 0x100620d52\nmov     r14d, edx                                                      ; +0xd6, 0x100620d56\ncall    qword ptr [rax+420h]                                           ; +0xd9, 0x100620d59\nmov     ecx, r14d                                                      ; +0xdf, 0x100620d5f\nmov     rdi, [rbx+178h]                                                ; +0xe2, 0x100620d62\nmov     rax, [rdi]                                                     ; +0xe9, 0x100620d69\nmov     rax, [rax+390h]                                                ; +0xec, 0x100620d6c\ndec     ecx                                                            ; +0xf3, 0x100620d73\ncmp     ecx, 2                                                         ; +0xf5, 0x100620d75\nja      short loc_100620DAB                                            ; +0xf8, 0x100620d78\nmov     ecx, ecx                                                       ; +0xfa, 0x100620d7a\nlea     rdx, off_100982350; \"Failed to fetch song info.\"               ; +0xfc, 0x100620d7c\nmov     rsi, [rdx+rcx*8]                                               ; +0x103, 0x100620d83\ncall    rax                                                            ; +0x107, 0x100620d87\nmov     rdi, [rbx+178h]                                                ; +0x109, 0x100620d89\ncmp     byte ptr [rbx+1EDh], 1                                         ; +0x110, 0x100620d90\njz      short loc_100620DC4                                            ; +0x117, 0x100620d97\nmovss   xmm0, cs:dword_100817F18                                       ; +0x119, 0x100620d99\nmovss   xmm1, cs:dword_100815004                                       ; +0x121, 0x100620da1\njmp     short loc_100620DD4                                            ; +0x129, 0x100620da9\nlea     rsi, aDownloadFailed_0; \"Download failed. Please try later.\"   ; +0x12b, 0x100620dab\ncall    rax                                                            ; +0x132, 0x100620db2\nmov     rdi, [rbx+178h]                                                ; +0x134, 0x100620db4\ncmp     byte ptr [rbx+1EDh], 1                                         ; +0x13b, 0x100620dbb\njnz     short loc_100620D99                                            ; +0x142, 0x100620dc2\nmovss   xmm0, cs:dword_100815734                                       ; +0x144, 0x100620dc4\nmovss   xmm1, cs:dword_100816000                                       ; +0x14c, 0x100620dcc\nxorps   xmm2, xmm2                                                     ; +0x154, 0x100620dd4\ncall    cocos2d__CCLabelBMFont__limitLabelWidth                        ; +0x157, 0x100620dd7\nmov     rdi, rbx                                                       ; +0x15c, 0x100620ddc\nxor     esi, esi                                                       ; +0x15f, 0x100620ddf\ncall    CustomSongWidget__showError                                    ; +0x161, 0x100620de1\nmov     rdi, [rbx+1C0h]                                                ; +0x166, 0x100620de6\nmov     rax, [rdi]                                                     ; +0x16d, 0x100620ded\nxor     esi, esi                                                       ; +0x170, 0x100620df0\ncall    qword ptr [rax+148h]                                           ; +0x172, 0x100620df2\nlea     rsi, CustomSongWidget__updateDownloadProgress                  ; +0x178, 0x100620df8\nmov     rdi, rbx                                                       ; +0x17f, 0x100620dff\nxor     edx, edx                                                       ; +0x182, 0x100620e02\ncall    cocos2d__CCNode__unschedule                                    ; +0x184, 0x100620e04\nmov     byte ptr [rbx+1EBh], 0                                         ; +0x189, 0x100620e09\nmov     rdi, rbx                                                       ; +0x190, 0x100620e10\ncall    CustomSongWidget__updateSongInfo                               ; +0x193, 0x100620e13\nadd     rsp, 18h                                                       ; +0x198, 0x100620e18\npop     rbx                                                            ; +0x19c, 0x100620e1c\npop     r14                                                            ; +0x19d, 0x100620e1d\npop     r15                                                            ; +0x19f, 0x100620e1f\npop     rbp                                                            ; +0x1a1, 0x100620e21\nretn                                                                   ; +0x1a2, 0x100620e22", "xrefs": ["sub_100620E90 @ 0x100620e9c", "<???> @ 0x100982258"], "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"}