//
// ThreadViewPopup::threadSendFinished from 0xc89da0 to 0xc89fe0 (576 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ThreadViewPopup::threadSendFinished @ 0xc89fe8
// > ??> @ 0x62d58
// > ??> @ 0x14ecab0
//
// 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:43 +0000
//
__int64 __fastcall ThreadViewPopup::threadSendFinished(ThreadViewPopup *this, int a2, __int64 a3)
{
GameLevelManager *v5; // x0
__int64 v7; // x0
unsigned __int8 v8; // w1
__int64 v9; // x0
__int64 v10; // x0
int v11; // w1
__int64 v12; // x1
const char *v13; // x2
__int64 v14; // x1
const char *v15; // x2
cocos2d::CCDirector *refreshed; // x0
__int64 *v17; // x22
__int64 v18; // x3
void (__fastcall *v19)(__int64 *, __int64, __int64); // x25
__int64 v20; // x0
__int64 v21[2]; // [xsp+58h] [xbp+58h] BYREF
void *v22; // [xsp+68h] [xbp+68h]
__int64 v23[2]; // [xsp+70h] [xbp+70h] BYREF
void *v24; // [xsp+80h] [xbp+80h]
v5 = (GameLevelManager *)*(unsigned int *)(*((_QWORD *)this + 94) + 56LL);
if ( (_DWORD)v5 == a2 )
{
if ( *(_BYTE *)(GameLevelManager::sharedState(v5) + 450) )
{
v7 = *((_QWORD *)this + 94);
if ( *(_BYTE *)(v7 + 264) && *(_DWORD *)(v7 + 268) != 2 )
{
*(_DWORD *)(v7 + 268) = 2;
*(_BYTE *)(*((_QWORD *)this + 94) + 265LL) = 1;
ThreadViewPopup::refreshDMSubLabel((__int64)this);
refreshed = (cocos2d::CCDirector *)ThreadViewPopup::refreshLockNotice(this, v14, v15);
v17 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(refreshed) + 272);
v18 = *v17;
v21[0] = 0;
v21[1] = 0;
v19 = *(void (__fastcall **)(__int64 *, __int64, __int64))(v18 + 464);
v22 = nullptr;
std::string::__init(v21, "Message request sent", 0x14u);
v23[0] = 0;
v23[1] = 0;
v24 = nullptr;
std::string::__init(v23, &byte_11B8890, 0);
v20 = TextAlertPopup::create((char *)v21, 150, (char *)v23, 0.5, 0.6);
v19(v17, v20, 1000);
if ( (v23[0] & 1) != 0 )
operator delete(v24);
if ( (v21[0] & 1) != 0 )
operator delete(v22);
}
}
else
{
v10 = *((_QWORD *)this + 94);
if ( *(_BYTE *)(v10 + 264) )
{
v11 = *(_DWORD *)(v10 + 268);
if ( (v11 & 0xFFFFFFFD) == 1 || v11 == 6 )
{
*(_DWORD *)(v10 + 268) = 0;
ThreadViewPopup::refreshDMSubLabel((__int64)this);
ThreadViewPopup::refreshLockNotice(this, v12, v13);
}
}
}
v8 = ThreadViewPopup::dmSendBlocked(this);
if ( !v8 )
v8 = *((_BYTE *)this + 790);
ThreadViewPopup::setSendPending((__int64)this, v8);
*((_QWORD *)this + 121) = 0;
if ( (*((_BYTE *)this + 976) & 1) != 0 )
{
**((_BYTE **)this + 124) = 0;
*((_QWORD *)this + 123) = 0;
}
else
{
*((_BYTE *)this + 977) = 0;
*((_BYTE *)this + 976) = 0;
}
v9 = *((_QWORD *)this + 130);
if ( v9 )
{
if ( !*(_QWORD *)(v9 + 56) )
*(_QWORD *)(v9 + 56) = a3;
*((_QWORD *)this + 130) = 0;
ThreadViewPopup::buildRows(this, 0);
}
ThreadViewPopup::refetchLatest(this);
}
return _stack_chk_guard;
}