//
// sub_100942CF0 from 0x100942cf0 to 0x100942ec3 (467 bytes)
//
// 1 xrefs:
// > MemberListPopup::buildRows @ 0x100942201
//
// 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 12:38:32 +0000
//
__int64 __fastcall sub_100942CF0(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // rax
const char *v4; // rsi
char *v5; // rax
const char *CString; // r14
size_t v7; // rax
size_t v8; // r15
char *v9; // r12
size_t v10; // r13
char *v11; // rbx
__int128 __dst; // [rsp+8h] [rbp-58h] BYREF
void *__p; // [rsp+18h] [rbp-48h]
__int128 v14; // [rsp+20h] [rbp-40h] BYREF
void *v15; // [rsp+30h] [rbp-30h]
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 640LL))(a2);
if ( *(_BYTE *)(a1 + 864)
|| *(int *)(a1 + 868) > 0
|| *(int *)(a1 + 872) > 0
|| *(int *)(a1 + 876) > 0
|| *(_BYTE *)(a1 + 848) | (result == 0) )
{
return result;
}
*(_DWORD *)(a1 + 876) = *(_DWORD *)(result + 376);
if ( (*(_BYTE *)(result + 320) & 1) != 0 )
{
sub_10001AD30(&v14, *(const void **)(result + 336), *(_QWORD *)(result + 328));
}
else
{
v3 = result + 320;
v15 = *(void **)(v3 + 16);
v14 = *(_OWORD *)v3;
}
if ( (v14 & 1) != 0 )
v4 = (const char *)v15;
else
v4 = (char *)&v14 + 1;
v5 = sub_10088E820("Take back the invite for %s?", v4);
CString = (const char *)cocos2d::CCString::getCString((__int64)v5);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v8 = v7;
if ( v7 >= 0x17 )
{
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
v9 = (char *)operator new(v10);
__p = v9;
*(_QWORD *)&__dst = v10 | 1;
*((_QWORD *)&__dst + 1) = v8;
}
else
{
LOBYTE(__dst) = 2 * v7;
v9 = (char *)&__dst + 1;
if ( !v7 )
goto LABEL_20;
}
memmove(v9, CString, v8);
LABEL_20:
v9[v8] = 0;
v11 = FLAlertLayer::create(
(int)a1 + 792,
(int)"Cancel Invite",
&__dst,
(int)"Back",
(int)"Take Back",
0,
380.0,
0.0,
1.0);
if ( (__dst & 1) != 0 )
operator delete(__p);
if ( (v14 & 1) != 0 )
operator delete(v15);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v11 + 72LL))(v11, 7);
return (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v11 + 1312LL))(v11);
}