//
// ThreadViewPopup::threadMessagesFailed from 0x1004fe944 to 0x1004fea5c (280 bytes)
//
// 2 xrefs:
// > sub_1004FEA5C @ 0x1004fea60
// > ??> @ 0x100995888
//
// This function is hookable on this platform (idp: arm, 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:06:52 +0000
//
__int64 __fastcall ThreadViewPopup::threadMessagesFailed(__int64 result, int a2)
{
__int64 v2; // x19
__int64 v3; // x0
__int64 v4; // x0
void *v5; // x0
__int64 v6; // x0
__int16 v7; // [xsp+Ch] [xbp-14h] BYREF
char v8; // [xsp+Eh] [xbp-12h]
if ( *(_DWORD *)(*(_QWORD *)(result + 752) + 56LL) == a2 )
{
v2 = result;
v3 = *(_QWORD *)(result + 832);
if ( v3 )
LoadingCircle::fadeAndRemove(v3);
if ( *(_QWORD *)(v2 + 1176) )
{
*(_QWORD *)(v2 + 1176) = 0;
if ( (sub_1000483A4() & 1) == 0 )
sub_1004FAE64(v2);
}
result = sub_1000483A4();
if ( (_DWORD)result )
{
*(_BYTE *)(v2 + 790) = 1;
sub_1004FACFC((unsigned int *)v2, 0.0);
result = sub_1004FB318(v2, 1);
}
if ( (*(_BYTE *)(v2 + 789) & 1) == 0 )
{
v4 = *(_QWORD *)(v2 + 856);
if ( v4 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 520LL))(v4);
v5 = cocos2d::CCLabelBMFont::create_1("Failed to load messages.", "chatFont.fnt");
*(_QWORD *)(v2 + 856) = v5;
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v5 + 160LL))(v5, 0.6);
v6 = *(_QWORD *)(v2 + 856);
v8 = -106;
v7 = -26986;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v6 + 1072LL))(v6, &v7);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v2 + 856) + 184LL))(*(_QWORD *)(v2 + 856), v2 + 848);
return (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v2 + 584) + 456LL))(
*(_QWORD *)(v2 + 584),
*(_QWORD *)(v2 + 856));
}
}
return result;
}