//
// ThreadViewPopup::threadMessagesFailed from 0x749628 to 0x7496fe (214 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'ThreadViewPopup::threadMessagesFailed @ 0x749714
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:58:45 +0000
//
int __fastcall ThreadViewPopup::threadMessagesFailed(int this, int a2)
{
int v2; // r4
int v3; // r2
cocos2d::CCNode **v4; // r0
__int64 v5; // r0
const char *v6; // r2
int v7; // r0
int v8; // r0
int v9; // r0
void (__fastcall *v10)(int, _DWORD *); // r2
_DWORD v11[2]; // [sp+0h] [bp-8h] BYREF
v11[0] = this;
v11[1] = a2;
v2 = this;
v3 = *(_DWORD *)(*(_DWORD *)(this + 564) + 52);
if ( a2 == v3 )
{
v4 = *(cocos2d::CCNode ***)(this + 624);
if ( v4 )
LoadingCircle::fadeAndRemove(v4, a2, v3);
v5 = *(_QWORD *)(v2 + 864);
if ( v5 )
{
*(_QWORD *)(v2 + 864) = 0;
LODWORD(v5) = GameToolbox::lastResponseHadServerPopup(nullptr);
if ( !(_DWORD)v5 )
LODWORD(v5) = ThreadViewPopup::jumpToLatest(v2);
}
this = GameToolbox::lastResponseHadServerPopup((GameToolbox *)v5);
if ( this )
{
*(_BYTE *)(v2 + 598) = 1;
ThreadViewPopup::setPollInterval(v2, 0.0);
this = ThreadViewPopup::setSendPending((ThreadViewPopup *)v2, 1);
}
if ( !*(_BYTE *)(v2 + 597) )
{
v7 = *(_DWORD *)(v2 + 644);
if ( v7 )
(*(void (__fastcall **)(int))(*(_DWORD *)v7 + 260))(v7);
v8 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Failed to load messages.", "chatFont.fnt", v6);
*(_DWORD *)(v2 + 644) = v8;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v8 + 80))(v8, 1058642330);
v9 = *(_DWORD *)(v2 + 644);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 536);
LOWORD(v11[0]) = -26986;
BYTE2(v11[0]) = -106;
v10(v9, v11);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v2 + 644) + 92))(*(_DWORD *)(v2 + 644), v2 + 636);
return (*(int (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(v2 + 460) + 228))(
*(_DWORD *)(v2 + 460),
*(_DWORD *)(v2 + 644));
}
}
return this;
}