//
// InvitesPopup::threadUpdateFinished from 0x75d258 to 0x75d3d4 (380 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'InvitesPopup::threadUpdateFinished @ 0x75d3ec
//
// 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:59:00 +0000
//
ScrollableContentLayer *__fastcall InvitesPopup::threadUpdateFinished(ScrollableContentLayer *this, int a2, int a3)
{
ScrollableContentLayer **v3; // r4
signed int v5; // r5
ScrollableContentLayer *v6; // r0
int *v7; // r0
int v8; // r0
cocos2d::CCDirector *v9; // r0
int v10; // r9
void (__fastcall *v11)(int, cocos2d::CCNode *, int); // r10
const char *v12; // r7
size_t v13; // r0
cocos2d::CCNode *v14; // r0
GJMessageThread *v15; // r1
ScrollableContentLayer *v16; // r5
ThreadViewPopup *v17; // r0
int v18[3]; // [sp+Ch] [bp-1Ch] BYREF
int v19[3]; // [sp+18h] [bp-10h] BYREF
v3 = (ScrollableContentLayer **)this;
if ( a2 == *((_DWORD *)this + 153) )
{
v5 = *((unsigned __int8 *)this + 616);
if ( *((_BYTE *)this + 616) )
{
if ( a3 != 8 )
return this;
*((_DWORD *)this + 153) = 0;
*((_BYTE *)this + 616) = 0;
InvitesPopup::removeInviteRow((cocos2d::CCArray **)this, a2);
if ( v3[152] )
{
v10 = *(_DWORD *)(cocos2d::CCDirector::sharedDirector(v9) + 220);
v11 = *(void (__fastcall **)(int, cocos2d::CCNode *, int))(*(_DWORD *)v10 + 232);
if ( *((_BYTE *)v3[152] + 168) )
v12 = "Request accepted";
else
v12 = "Joined group chat";
memset(v18, 0, sizeof(v18));
v13 = strlen(v12);
std::string::__init(v18, v12, v13);
memset(v19, 0, sizeof(v19));
std::string::__init(v19, &unk_B6B226, 0);
v14 = TextAlertPopup::create((int)v18, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v19);
v11(v10, v14, 1000);
std::string::~string((int)v19);
std::string::~string((int)v18);
v16 = v3[152];
if ( *((_BYTE *)v16 + 168) )
{
*((_BYTE *)v16 + 169) = 0;
*((_DWORD *)v3[152] + 43) = 0;
}
else
{
++*((_DWORD *)v16 + 29);
}
v17 = ThreadViewPopup::create(v3[152], v15);
(*(void (__fastcall **)(ThreadViewPopup *))(*(_DWORD *)v17 + 656))(v17);
}
}
else
{
if ( a3 != 9 )
return this;
*((_DWORD *)this + 153) = v5;
*((_BYTE *)this + 616) = v5;
while ( 1 )
{
v6 = v3[151];
if ( !v6 )
break;
v6 = (ScrollableContentLayer *)cocos2d::CCArray::count(v6);
if ( v5 >= (int)v6 )
break;
v6 = (ScrollableContentLayer *)cocos2d::CCArray::objectAtIndex(v3[151], v5);
if ( *((_DWORD *)v6 + 13) == a2 )
{
*((_BYTE *)v6 + 177) = 1;
break;
}
++v5;
}
v7 = (int *)GameLevelManager::sharedState(v6);
if ( v7[87] > 0 )
{
v8 = GameLevelManager::sharedState((GameLevelManager *)v7);
--*(_DWORD *)(v8 + 348);
}
InvitesPopup::buildRows(v3);
}
this = v3[152];
if ( this )
{
this = (ScrollableContentLayer *)cocos2d::CCObject::release(this);
v3[152] = nullptr;
}
}
return this;
}