//
// sub_1006B3110 from 0x1006b3110 to 0x1006b32df (463 bytes)
//
// 1 xrefs:
// > ProfilePage::onFriend @ 0x1008a24f6
//
// 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:35:25 +0000
//
__int64 __fastcall sub_1006B3110(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
__int64 v4; // rdi
const char *v5; // r14
size_t v6; // rax
size_t v7; // r15
char *v8; // r12
size_t v9; // r13
char *v10; // r14
__int64 v11; // rax
__int64 v13; // [rsp+0h] [rbp-50h] BYREF
__int128 __dst; // [rsp+8h] [rbp-48h] BYREF
void *__p; // [rsp+18h] [rbp-38h]
float v16; // [rsp+24h] [rbp-2Ch]
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 704) + 344LL))(*(_QWORD *)(a1 + 704), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 704) + 1000LL))(*(_QWORD *)(a1 + 704), 0);
v3 = *(_QWORD *)(a1 + 712);
if ( v3 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 344LL))(v3, 0);
v4 = *(_QWORD *)(a1 + 776);
if ( v4 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 344LL))(v4, 0);
if ( (*(_BYTE *)a2 & 1) != 0 )
v5 = *(const char **)(a2 + 16);
else
v5 = (const char *)(a2 + 1);
v6 = strlen(v5);
if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v7 = v6;
if ( v6 >= 0x17 )
{
v9 = 26;
if ( (v6 | 7) != 0x17 )
v9 = (v6 | 7) + 1;
v8 = (char *)operator new(v9);
__p = v8;
*(_QWORD *)&__dst = v9 + 1;
*((_QWORD *)&__dst + 1) = v7;
goto LABEL_15;
}
LOBYTE(__dst) = 2 * v6;
v8 = (char *)&__dst + 1;
if ( v6 )
LABEL_15:
memmove(v8, v5, v7);
v8[v7] = 0;
v16 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 704) + 328LL))(*(_QWORD *)(a1 + 704));
sub_100278250((float *)&v13, 0.5, 0.5);
v10 = TextArea::create(
&__dst,
(__int64)"chatFont.fnt",
&v13,
0,
0,
1.0,
(float)((float)(v16 + -40.0) * 1.1) / 0.80000001,
20.0);
if ( (__dst & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v10 + 160LL))(v10, 0.80000001);
v11 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 704) + 192LL))(*(_QWORD *)(a1 + 704));
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v10 + 184LL))(v10, v11);
return (*(__int64 (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v10,
2);
}