//
// CustomSFXWidget::downloadSFXFailed from 0x140163870 to 0x140163963 (243 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407425d0
// > ??> @ 0x140917dec
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:27:26 +0000
//
__int64 __fastcall CustomSFXWidget::downloadSFXFailed(__int64 a1, __int64 a2, int a3)
{
__int64 result; // rax
void (__fastcall ***v6)(_QWORD, __int16 *); // rcx
int v7; // ebx
int v8; // ebx
const char *v9; // rdx
__int16 v10; // [rsp+38h] [rbp+10h] BYREF
char v11; // [rsp+3Ah] [rbp+12h]
result = *(unsigned int *)(a1 + 176);
if ( (_DWORD)result == (_DWORD)a2 && (_DWORD)result )
{
LOBYTE(a2) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 48) + 336LL))(*(_QWORD *)(a1 + 48), a2);
v6 = (void (__fastcall ***)(_QWORD, __int16 *))(*(_QWORD *)(a1 + 48) + 368LL);
v10 = 13055;
v11 = 25;
(**v6)(v6, &v10);
v7 = a3 - 1;
if ( v7 )
{
v8 = v7 - 1;
if ( v8 )
{
if ( v8 == 1 )
v9 = "Download canceled.";
else
v9 = "Download failed. Please try again later.";
}
else
{
v9 = "SFX is not allowed for use.";
}
}
else
{
v9 = "Failed to fetch SFX info.";
}
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 48) + 360LL))(*(_QWORD *)(a1 + 48) + 360LL, v9);
cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 48), 230.0, 0.40000001, 0.0);
CustomSFXWidget::hideLoadingArt(a1 - 320);
cocos2d::CCNode::unschedule(a1 - 320, CustomSFXWidget::updateDownloadProgress);
*(_BYTE *)(a1 + 171) = 0;
return CustomSFXWidget::updateSFXInfo(a1 - 320);
}
return result;
}