//
// ThreadViewPopup::refetchLatest from 0x1400de690 to 0x1400de840 (432 bytes)
//
// 6 xrefs:
// > ThreadViewPopup::exitSearch @ 0x1400dbf2e
// > ThreadViewPopup::threadUpdateFinished @ 0x1400dd4ea
// > ThreadViewPopup::threadSendFinished @ 0x1400de670
// > MemberListPopup::threadUpdateFinished @ 0x1400eec4d
// > ThreadDescPopup::threadUpdateFinished @ 0x1400fe391
// > ??> @ 0x140914a2c
//
// 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:26:29 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall ThreadViewPopup::refetchLatest(__int64 a1)
{
float v2; // xmm1_4
int v3; // edi
int v4; // ecx
char ThreadMessages; // di
void *v6; // r8
__int64 v7; // rbx
__int64 v8; // rax
void *v9; // [rsp+40h] [rbp-38h]
void *v10; // [rsp+40h] [rbp-38h]
void *Block[2]; // [rsp+48h] [rbp-30h] BYREF
__int64 v12; // [rsp+58h] [rbp-20h]
unsigned __int64 v13; // [rsp+60h] [rbp-18h]
if ( !*(_BYTE *)(a1 + 782) )
{
v2 = *(float *)(a1 + 936);
if ( v2 > 0.0 )
ThreadViewPopup::setPollInterval(a1, v2);
*(_OWORD *)Block = 0;
v12 = 0;
v13 = 15;
LOBYTE(Block[0]) = 0;
if ( *(__int64 *)(a1 + 768) <= 0 )
v3 = -1;
else
v3 = *(_DWORD *)(a1 + 928);
v4 = qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v9 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v9);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v4 = qword_14090BFB0;
}
ThreadMessages = GameLevelManager::getThreadMessages(
v4,
*(_DWORD *)(*(_QWORD *)(a1 + 744) + 56LL),
0,
*(_QWORD *)(a1 + 768),
v3,
0,
(__int64)Block);
if ( v13 > 0xF )
{
v6 = Block[0];
if ( v13 + 1 >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
}
if ( ThreadMessages )
{
v7 = a1 + 672;
v8 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v10 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v10);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v8 = *(_QWORD *)&qword_14090BFB0;
}
*(_QWORD *)(v8 + 1392) = v7;
}
else
{
*(_BYTE *)(a1 + 808) = 1;
}
}
}