//
// MessageThreadsPage::updateInviteButton from 0x1400d6430 to 0x1400d65bc (396 bytes)
//
// 3 xrefs:
// > MessageThreadsPage::threadListFinished @ 0x1400d873c
// > MessageThreadsPage::applyThreadList @ 0x1400d8c31
// > ??> @ 0x140914654
//
// 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:26 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall MessageThreadsPage::updateInviteButton(__int64 a1, __int64 a2)
{
__int64 result; // rax
int v4; // esi
__int64 v5; // rcx
void (__fastcall **v6)(__int64, const char *); // rdi
__int64 v7; // rbx
__int64 v8; // rdx
cocos2d::CCString *v9; // rax
const char *CString; // rax
float v11; // xmm8_4
__int64 v12; // rdi
float v13; // xmm7_4
float *v14; // rax
__int64 v15; // rbx
__int64 v16; // rax
void *v17; // [rsp+50h] [rbp+8h] BYREF
result = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v17 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v17);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
result = *(_QWORD *)&qword_14090BFB0;
}
v4 = *(_DWORD *)(result + 548);
v5 = *(_QWORD *)(a1 + 768);
if ( v5 )
{
LOBYTE(a2) = v4 > 0;
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 336LL))(v5, a2);
if ( v4 > 0 )
{
v6 = *(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 776) + 360LL);
v7 = *(_QWORD *)(a1 + 776);
v8 = 99;
if ( v4 < 99 )
v8 = (unsigned int)v4;
v9 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v8);
CString = cocos2d::CCString::getCString(v9);
(*v6)(v7 + 360, CString);
v11 = 0.0;
cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 776), 28.0, 0.80000001, 0.0);
if ( v4 == 1 )
v11 = -0.5;
v12 = **(_QWORD **)(a1 + 776);
v13 = (float)(*(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 768) + 320LL))(*(_QWORD *)(a1 + 768))
+ 4)
* 0.5)
+ 1.0;
v14 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 768) + 320LL))(*(_QWORD *)(a1 + 768));
v15 = *(_QWORD *)(a1 + 776);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, (float)(*v14 * 0.5) + v11, v13);
return (*(__int64 (__fastcall **)(__int64, __int64))(v12 + 184))(v15, v16);
}
}
return result;
}