{"type": "func", "start": 5370165360, "end": 5370165603, "name": "CustomSFXWidget::downloadSFXFailed", "pseudocode": "// \n// CustomSFXWidget::downloadSFXFailed from 0x140163870 to 0x140163963 (243 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1407425d0\n// > <???> @ 0x140917dec\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:27:26 +0000\n// \n\n__int64 __fastcall CustomSFXWidget::downloadSFXFailed(__int64 a1, __int64 a2, int a3)\n{\n  __int64 result; // rax\n  void (__fastcall ***v6)(_QWORD, __int16 *); // rcx\n  int v7; // ebx\n  int v8; // ebx\n  const char *v9; // rdx\n  __int16 v10; // [rsp+38h] [rbp+10h] BYREF\n  char v11; // [rsp+3Ah] [rbp+12h]\n\n  result = *(unsigned int *)(a1 + 176);\n  if ( (_DWORD)result == (_DWORD)a2 && (_DWORD)result )\n  {\n    LOBYTE(a2) = 1;\n    (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 48) + 336LL))(*(_QWORD *)(a1 + 48), a2);\n    v6 = (void (__fastcall ***)(_QWORD, __int16 *))(*(_QWORD *)(a1 + 48) + 368LL);\n    v10 = 13055;\n    v11 = 25;\n    (**v6)(v6, &v10);\n    v7 = a3 - 1;\n    if ( v7 )\n    {\n      v8 = v7 - 1;\n      if ( v8 )\n      {\n        if ( v8 == 1 )\n          v9 = \"Download canceled.\";\n        else\n          v9 = \"Download failed. Please try again later.\";\n      }\n      else\n      {\n        v9 = \"SFX is not allowed for use.\";\n      }\n    }\n    else\n    {\n      v9 = \"Failed to fetch SFX info.\";\n    }\n    (**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 48) + 360LL))(*(_QWORD *)(a1 + 48) + 360LL, v9);\n    cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 48), 230.0, 0.40000001, 0.0);\n    CustomSFXWidget::hideLoadingArt(a1 - 320);\n    cocos2d::CCNode::unschedule(a1 - 320, CustomSFXWidget::updateDownloadProgress);\n    *(_BYTE *)(a1 + 171) = 0;\n    return CustomSFXWidget::updateSFXInfo(a1 - 320);\n  }\n  return result;\n}", "assembly": "; \n; CustomSFXWidget::downloadSFXFailed from 0x140163870 to 0x140163963 (243 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1407425d0\n; > <???> @ 0x140917dec\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:27:26 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140163870\npush    rdi                                                            ; +0x5, 0x140163875\nsub     rsp, 20h                                                       ; +0x6, 0x140163876\nmov     eax, [rcx+0B0h]                                                ; +0xa, 0x14016387a\nmov     ebx, r8d                                                       ; +0x10, 0x140163880\nmov     rdi, rcx                                                       ; +0x13, 0x140163883\ncmp     eax, edx                                                       ; +0x16, 0x140163886\njnz     loc_140163958                                                  ; +0x18, 0x140163888\ntest    eax, eax                                                       ; +0x1e, 0x14016388e\njz      loc_140163958                                                  ; +0x20, 0x140163890\nmov     rcx, [rcx+30h]                                                 ; +0x26, 0x140163896\nmov     dl, 1                                                          ; +0x2a, 0x14016389a\nmov     rax, [rcx]                                                     ; +0x2c, 0x14016389c\ncall    qword ptr [rax+150h]                                           ; +0x2f, 0x14016389f\nmov     rcx, [rdi+30h]                                                 ; +0x35, 0x1401638a5\nlea     rdx, [rsp+28h+arg_8]                                           ; +0x39, 0x1401638a9\nadd     rcx, 170h                                                      ; +0x3e, 0x1401638ae\nmov     [rsp+28h+arg_8], 32FFh                                         ; +0x45, 0x1401638b5\nmov     [rsp+28h+arg_A], 19h                                           ; +0x4c, 0x1401638bc\nmov     rax, [rcx]                                                     ; +0x51, 0x1401638c1\ncall    qword ptr [rax]                                                ; +0x54, 0x1401638c4\nmov     rcx, [rdi+30h]                                                 ; +0x56, 0x1401638c6\nadd     rcx, 168h                                                      ; +0x5a, 0x1401638ca\nmov     r8, [rcx]                                                      ; +0x61, 0x1401638d1\nsub     ebx, 1                                                         ; +0x64, 0x1401638d4\njz      short loc_1401638FE                                            ; +0x67, 0x1401638d7\nsub     ebx, 1                                                         ; +0x69, 0x1401638d9\njz      short loc_1401638F5                                            ; +0x6c, 0x1401638dc\ncmp     ebx, 1                                                         ; +0x6e, 0x1401638de\njz      short loc_1401638EC                                            ; +0x71, 0x1401638e1\nlea     rdx, aDownloadFailed; \"Download failed. Please try again later\"... ; +0x73, 0x1401638e3\njmp     short loc_140163905                                            ; +0x7a, 0x1401638ea\nlea     rdx, aDownloadCancel; \"Download canceled.\"                     ; +0x7c, 0x1401638ec\njmp     short loc_140163905                                            ; +0x83, 0x1401638f3\nlea     rdx, aSfxIsNotAllowe; \"SFX is not allowed for use.\"            ; +0x85, 0x1401638f5\njmp     short loc_140163905                                            ; +0x8c, 0x1401638fc\nlea     rdx, aFailedToFetchS; \"Failed to fetch SFX info.\"              ; +0x8e, 0x1401638fe\ncall    qword ptr [r8]                                                 ; +0x95, 0x140163905\nmovss   xmm2, cs:dword_140834EDC                                       ; +0x98, 0x140163908\nxorps   xmm3, xmm3                                                     ; +0xa0, 0x140163910\nmovss   xmm1, cs:dword_140835938                                       ; +0xa3, 0x140163913\nmov     rcx, [rdi+30h]                                                 ; +0xab, 0x14016391b\ncall    cs:?limitLabelWidth@CCLabelBMFont@cocos2d@@QEAAXMMM@Z; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0xaf, 0x14016391f\nlea     rcx, [rdi-140h]                                                ; +0xb5, 0x140163925\ncall    CustomSFXWidget__hideLoadingArt                                ; +0xbc, 0x14016392c\nlea     rdx, CustomSFXWidget__updateDownloadProgress                   ; +0xc1, 0x140163931\nlea     rcx, [rdi-140h]                                                ; +0xc8, 0x140163938\ncall    cs:?unschedule@CCNode@cocos2d@@QEAAXP8CCObject@2@EAAXM@Z@Z; cocos2d::CCNode::unschedule(void (cocos2d::CCObject::*)(float)) ; +0xcf, 0x14016393f\nlea     rcx, [rdi-140h]                                                ; +0xd5, 0x140163945\nmov     byte ptr [rdi+0ABh], 0                                         ; +0xdc, 0x14016394c\ncall    CustomSFXWidget__updateSFXInfo                                 ; +0xe3, 0x140163953\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xe8, 0x140163958\nadd     rsp, 20h                                                       ; +0xed, 0x14016395d\npop     rdi                                                            ; +0xf1, 0x140163961\nretn                                                                   ; +0xf2, 0x140163962", "xrefs": ["<???> @ 0x1407425d0", "<???> @ 0x140917dec"], "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"}