//
// ThreadViewPopup::threadMessagesFailed from 0xc65d6c to 0xc65ec4 (344 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ThreadViewPopup::threadMessagesFailed @ 0xc65ecc
// > ??> @ 0x46be8
// > ??> @ 0x14eca98
//
// 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 13:05:24 +0000
//
__int64 __fastcall ThreadViewPopup::threadMessagesFailed(ThreadViewPopup *this, int a2)
{
cocos2d::CCNode **v4; // x0
__int64 ResponseHadServerPopup; // x0
const char *v6; // x2
__int64 v7; // x0
__int64 v8; // x0
__int64 *v9; // x0
__int64 v10; // x3
_BYTE v11[8]; // [xsp+30h] [xbp+30h] BYREF
if ( *(_DWORD *)(*((_QWORD *)this + 94) + 56LL) == a2 )
{
v4 = *((cocos2d::CCNode ***)this + 104);
if ( v4 )
LoadingCircle::fadeAndRemove(v4);
ResponseHadServerPopup = *((_QWORD *)this + 147);
if ( ResponseHadServerPopup )
{
*((_QWORD *)this + 147) = 0;
ResponseHadServerPopup = (unsigned __int8)GameToolbox::lastResponseHadServerPopup((GameToolbox *)ResponseHadServerPopup);
if ( !(_BYTE)ResponseHadServerPopup )
ResponseHadServerPopup = ThreadViewPopup::jumpToLatest((__int64)this);
}
if ( (unsigned __int8)GameToolbox::lastResponseHadServerPopup((GameToolbox *)ResponseHadServerPopup) )
{
*((_BYTE *)this + 790) = 1;
ThreadViewPopup::setPollInterval((__int64)this, 0.0);
ThreadViewPopup::setSendPending((__int64)this, 1u);
}
if ( !*((_BYTE *)this + 789) )
{
v7 = *((_QWORD *)this + 107);
if ( v7 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 520LL))(v7);
v8 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Failed to load messages.", "chatFont.fnt", v6);
*((_QWORD *)this + 107) = v8;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 160LL))(v8, 0.6);
v9 = *((__int64 **)this + 107);
v10 = *v9;
memset(v11, 150, 3);
(*(void (__fastcall **)(__int64 *, _BYTE *))(v10 + 1072))(v9, v11);
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 107) + 184LL))(
*((_QWORD *)this + 107),
(char *)this + 848);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 73) + 456LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 107));
}
}
return _stack_chk_guard;
}