//
// ThreadViewPopup::threadUpdateFinished from 0x1400dd240 to 0x1400dd5e9 (937 bytes)
//
// 3 xrefs:
// > ??> @ 0x14072a1e0
// > ??> @ 0x1409149cc
// > ??> @ 0x1409149d8
//
// 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=2
void __fastcall ThreadViewPopup::threadUpdateFinished(__int64 a1, int a2, int a3)
{
__int64 v3; // r14
__int64 v4; // rcx
__int64 v5; // rsi
unsigned int v6; // ebx
struct cocos2d::CCObject *v7; // rax
__int64 v8; // rcx
__int64 v9; // rdx
__int64 *v10; // rdi
__int64 v11; // r8
unsigned int v12; // ebx
struct cocos2d::CCObject *v13; // rax
cocos2d::CCArray *v14; // rcx
__int64 v15; // rcx
__int64 *v16; // rdi
__int64 v17; // rbx
__int64 v18; // rdx
__int64 v19; // r8
__int64 v20; // rax
__int64 v21; // rax
char v22; // cl
const char *v23; // rdx
size_t v24; // r8
__int64 v25; // rbx
__int64 v26; // rax
__int128 v27; // [rsp+30h] [rbp-40h] BYREF
__int64 v28; // [rsp+40h] [rbp-30h]
__int64 v29; // [rsp+48h] [rbp-28h]
__int128 v30; // [rsp+50h] [rbp-20h] BYREF
__int64 v31; // [rsp+60h] [rbp-10h]
__int64 v32; // [rsp+68h] [rbp-8h]
void *v33; // [rsp+A0h] [rbp+30h]
v3 = a1;
v4 = *(_QWORD *)(a1 + 72);
if ( a2 == *(_DWORD *)(v4 + 56) )
{
switch ( a3 )
{
case 103:
v5 = *(_QWORD *)(v3 + 424);
if ( !v5 )
return;
v6 = 0;
if ( (int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 80)) > 0 )
{
while ( 1 )
{
v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v3 + 80), v6);
if ( *((_QWORD *)v7 + 7) == v5 )
break;
if ( (int)++v6 >= (int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 80)) )
goto LABEL_10;
}
if ( v7 )
*((_BYTE *)v7 + 112) = 1;
}
LABEL_10:
*(_QWORD *)(v3 + 424) = 0;
ThreadViewPopup::buildRows(v3 - 672, 0);
v10 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v8) + 272);
v30 = 0;
v31 = 0;
v32 = 15;
LOBYTE(v30) = 0;
v28 = 15;
v29 = 15;
strcpy((char *)&v27, "Message deleted");
goto LABEL_33;
case 12:
if ( *(_QWORD *)(v3 + 424) )
{
v12 = 0;
if ( (int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 80)) > 0 )
{
while ( 1 )
{
v13 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v3 + 80), v12);
v14 = *(cocos2d::CCArray **)(v3 + 80);
if ( *((_QWORD *)v13 + 7) == *(_QWORD *)(v3 + 424) )
break;
if ( (int)++v12 >= (int)cocos2d::CCArray::count(v14) )
goto LABEL_18;
}
cocos2d::CCArray::removeObjectAtIndex(v14, v12, 1);
}
LABEL_18:
*(_QWORD *)(v3 + 424) = 0;
ThreadViewPopup::buildRows(v3 - 672, 0);
v16 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v15) + 272);
v30 = 0;
v31 = 0;
v32 = 15;
LOBYTE(v30) = 0;
v28 = 15;
v29 = 15;
strcpy((char *)&v27, "Message deleted");
v17 = *v16;
v20 = TextAlertPopup::create(&v27, v18, v19, 150, &v30);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(v17 + 456))(v16, v20, 1000);
if ( v3 == 672 )
v3 = 0;
v21 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v33 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v33);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v21 = *(_QWORD *)&qword_14090BFB0;
}
*(_QWORD *)(v21 + 1392) = v3;
}
break;
case 4:
if ( *(_BYTE *)(v3 + 329) )
{
*(_BYTE *)(v3 + 329) = 0;
MemberListPopup::applyAddOutcome();
ThreadViewPopup::buildMemberButton(v3 - 672);
ThreadViewPopup::refetchLatest(v3 - 672);
}
break;
default:
if ( a3 == 10 && *(_BYTE *)(v3 + 328) )
{
*(_BYTE *)(v3 + 328) = 0;
*(_BYTE *)(v4 + 244) = *(_BYTE *)(v4 + 244) == 0;
v10 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v4) + 272);
v22 = *(_BYTE *)(*(_QWORD *)(v3 + 72) + 244LL);
v30 = 0;
v31 = 0;
v32 = 15;
LOBYTE(v30) = 0;
v23 = "Conversation unmuted";
if ( v22 )
v23 = "Conversation muted";
v27 = 0;
v28 = 0;
v29 = 0;
v24 = -1;
do
++v24;
while ( v23[v24] );
sub_14003D230(&v27, v23, v24);
LABEL_33:
v25 = *v10;
v26 = TextAlertPopup::create(&v27, v9, v11, 150, &v30);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(v25 + 456))(v10, v26, 1000);
}
break;
}
}
}