//
// sub_10094A640 from 0x10094a640 to 0x10094a7f6 (438 bytes)
//
// 1 xrefs:
// > ThreadOptionsPopup::init @ 0x100949d37
//
// 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:35 +0000
//
__int64 __fastcall sub_10094A640(__int64 a1)
{
int v1; // ebx
__int64 v2; // rax
__int64 v3; // rsi
unsigned int v4; // r15d
const char *CString; // r13
char *v6; // rdi
char *v7; // rax
const char *v8; // r14
size_t v9; // rax
size_t v10; // r12
int v11; // ebx
char *v12; // r13
size_t v13; // r15
const char *v14; // r8
__int64 *v15; // rbx
const char *__src; // [rsp+0h] [rbp-50h]
__int128 __dst; // [rsp+8h] [rbp-48h] BYREF
void *__p; // [rsp+18h] [rbp-38h]
unsigned int v20; // [rsp+24h] [rbp-2Ch]
v1 = a1;
v2 = *(_QWORD *)(a1 + 1032);
if ( (*(_BYTE *)(v2 + 64) & 1) != 0 )
{
v3 = *(_QWORD *)(v2 + 80);
v4 = *(_DWORD *)(a1 + 1052);
if ( *(_BYTE *)(v2 + 264) != 1 )
goto LABEL_3;
}
else
{
v3 = v2 + 65;
v4 = *(_DWORD *)(a1 + 1052);
if ( *(_BYTE *)(v2 + 264) != 1 )
{
LABEL_3:
CString = "Clears the conversation on your side.\nIt comes back when a new message arrives.";
goto LABEL_10;
}
}
if ( v4 > 1 )
{
CString = "Clear this conversation?\n"
"Your message history will be permanently deleted.\n"
"Friends can still message you. Non-friends will need to send a new message request.";
}
else
{
v6 = "Leave this conversation?\n"
"Your message history will be permanently deleted.\n"
"%s will need to send you a new message request to contact you again.";
if ( v4 == 1 )
v6 = "Clear this conversation?\n"
"Your message history will be permanently deleted.\n"
"%s can still message you unless you block or unfriend them.";
v7 = sub_10088E820(v6, v3);
CString = (const char *)cocos2d::CCString::getCString((__int64)v7);
}
LABEL_10:
v8 = "Clear Messages";
if ( !v4 )
v8 = "Leave Conversation";
v9 = strlen(CString);
if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v10 = v9;
__src = CString;
v11 = v1 + 1024;
if ( v9 >= 0x17 )
{
v20 = v4;
v13 = 26;
if ( (v9 | 7) != 0x17 )
v13 = (v9 | 7) + 1;
v12 = (char *)operator new(v13);
__p = v12;
*(_QWORD *)&__dst = v13 + 1;
v4 = v20;
*((_QWORD *)&__dst + 1) = v10;
goto LABEL_19;
}
LOBYTE(__dst) = 2 * v9;
v12 = (char *)&__dst + 1;
if ( v9 )
LABEL_19:
memmove(v12, __src, v10);
v12[v10] = 0;
v14 = "Clear";
if ( !v4 )
v14 = "Leave";
v15 = (__int64 *)FLAlertLayer::create(v11, (int)v8, &__dst, (int)"Back", (int)v14, 0, 380.0, 0.0, 1.0);
if ( (__dst & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64 *, __int64))(*v15 + 72))(v15, 1);
ButtonSprite::updateBGImage(v15[77], (__int64)"GJ_button_06.png");
return (*(__int64 (__fastcall **)(__int64 *))(*v15 + 1312))(v15);
}