{"type": "func", "start": 4301147200, "end": 4301147391, "name": "CustomSFXWidget::downloadSFXFailed", "pseudocode": "// \n// CustomSFXWidget::downloadSFXFailed from 0x1005e4c40 to 0x1005e4cff (191 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x100977068\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 CustomSFXWidget::downloadSFXFailed(CustomSFXWidget *a1, int a2, GJSongError a3)\n{\n  cocos2d::CCLabelBMFont *m_errorLabel; // rdi\n  unsigned __int32 v6; // r14d\n  const char *v7; // rsi\n  __int16 v8; // [rsp-1Ch] [rbp-1Ch] BYREF\n  char v9; // [rsp-1Ah] [rbp-1Ah]\n\n  if ( a1->m_sfxID == a2 && a1->m_sfxID != 0 )\n  {\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))a1->m_errorLabel->setVisible)(a1->m_errorLabel, 1);\n    m_errorLabel = a1->m_errorLabel;\n    v9 = 25;\n    v8 = 13055;\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))m_errorLabel->setColor)(m_errorLabel, &v8);\n    v6 = a3 - 1;\n    if ( v6 > 2 )\n      v7 = \"Download failed. Please try again later.\";\n    else\n      v7 = off_100977140[v6];\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_errorLabel->setString)(a1->m_errorLabel, v7);\n    cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_errorLabel, 230.0, 0.40000001, 0.0);\n    CustomSFXWidget::downloadFailed(a1);\n  }\n}", "assembly": "; \n; CustomSFXWidget::downloadSFXFailed from 0x1005e4c40 to 0x1005e4cff (191 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x100977068\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     eax, [rdi+1C8h]                                                ; +0x0, 0x1005e4c40\ncmp     eax, esi                                                       ; +0x6, 0x1005e4c46\nsetnz   cl                                                             ; +0x8, 0x1005e4c48\ntest    eax, eax                                                       ; +0xb, 0x1005e4c4b\nsetz    al                                                             ; +0xd, 0x1005e4c4d\nor      al, cl                                                         ; +0x10, 0x1005e4c50\njnz     locret_1005E4CFE                                               ; +0x12, 0x1005e4c52\npush    rbp                                                            ; +0x18, 0x1005e4c58\nmov     rbp, rsp                                                       ; +0x19, 0x1005e4c59\npush    r14                                                            ; +0x1c, 0x1005e4c5c\npush    rbx                                                            ; +0x1e, 0x1005e4c5e\nsub     rsp, 10h                                                       ; +0x1f, 0x1005e4c5f\nmov     r14d, edx                                                      ; +0x23, 0x1005e4c63\nmov     rbx, rdi                                                       ; +0x26, 0x1005e4c66\nmov     rdi, [rdi+170h]                                                ; +0x29, 0x1005e4c69\nmov     rax, [rdi]                                                     ; +0x30, 0x1005e4c70\nmov     esi, 1                                                         ; +0x33, 0x1005e4c73\ncall    qword ptr [rax+148h]                                           ; +0x38, 0x1005e4c78\nmov     rdi, [rbx+170h]                                                ; +0x3e, 0x1005e4c7e\nmov     byte ptr [rbp-12h], 19h                                        ; +0x45, 0x1005e4c85\nmov     word ptr [rbp-14h], 32FFh                                      ; +0x49, 0x1005e4c89\nmov     rax, [rdi]                                                     ; +0x4f, 0x1005e4c8f\nlea     rsi, [rbp-14h]                                                 ; +0x52, 0x1005e4c92\ncall    qword ptr [rax+420h]                                           ; +0x56, 0x1005e4c96\nmov     rdi, [rbx+170h]                                                ; +0x5c, 0x1005e4c9c\nmov     rax, [rdi]                                                     ; +0x63, 0x1005e4ca3\nmov     rax, [rax+390h]                                                ; +0x66, 0x1005e4ca6\ndec     r14d                                                           ; +0x6d, 0x1005e4cad\ncmp     r14d, 2                                                        ; +0x70, 0x1005e4cb0\nja      short loc_1005E4CC6                                            ; +0x74, 0x1005e4cb4\nmov     ecx, r14d                                                      ; +0x76, 0x1005e4cb6\nlea     rdx, off_100977140; \"Failed to fetch SFX info.\"                ; +0x79, 0x1005e4cb9\nmov     rsi, [rdx+rcx*8]                                               ; +0x80, 0x1005e4cc0\njmp     short loc_1005E4CCD                                            ; +0x84, 0x1005e4cc4\nlea     rsi, aDownloadFailed; \"Download failed. Please try again later\"... ; +0x86, 0x1005e4cc6\ncall    rax                                                            ; +0x8d, 0x1005e4ccd\nmov     rdi, [rbx+170h]                                                ; +0x8f, 0x1005e4ccf\nmovss   xmm0, cs:dword_100817F18                                       ; +0x96, 0x1005e4cd6\nmovss   xmm1, cs:dword_100815004                                       ; +0x9e, 0x1005e4cde\nxorps   xmm2, xmm2                                                     ; +0xa6, 0x1005e4ce6\ncall    cocos2d__CCLabelBMFont__limitLabelWidth                        ; +0xa9, 0x1005e4ce9\nmov     rdi, rbx                                                       ; +0xae, 0x1005e4cee\ncall    CustomSFXWidget__downloadFailed                                ; +0xb1, 0x1005e4cf1\nadd     rsp, 10h                                                       ; +0xb6, 0x1005e4cf6\npop     rbx                                                            ; +0xba, 0x1005e4cfa\npop     r14                                                            ; +0xbb, 0x1005e4cfb\npop     rbp                                                            ; +0xbd, 0x1005e4cfd\nretn                                                                   ; +0xbe, 0x1005e4cfe", "xrefs": ["<???> @ 0x100977068"], "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"}