//
// ThreadOptionsPopup::onHide from 0x1400f5620 to 0x1400f5798 (376 bytes)
//
// 3 xrefs:
// > ThreadOptionsPopup::init @ 0x1400f4a9b
// > ??> @ 0x140915224
// > ??> @ 0x140915230
//
// 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:38 +0000
//
__int64 __fastcall ThreadOptionsPopup::onHide(__int64 a1)
{
__int64 v1; // rax
const char *v3; // rdx
int v4; // edi
const char *CString; // rax
cocos2d::CCString *v6; // rax
cocos2d::CCString *v7; // rax
int v8; // esi
size_t v9; // r8
const char *v10; // rax
const char *v11; // rdx
__int64 *v12; // rbx
__int128 v14; // [rsp+50h] [rbp-28h] BYREF
__int64 v15; // [rsp+60h] [rbp-18h]
__int64 v16; // [rsp+68h] [rbp-10h]
v1 = *(_QWORD *)(a1 + 1016);
v3 = (const char *)(v1 + 64);
v4 = *(_DWORD *)(a1 + 1036);
if ( *(_QWORD *)(v1 + 88) > 0xFu )
v3 = *(const char **)v3;
if ( *(_BYTE *)(v1 + 320) )
{
if ( v4 == 1 )
{
v6 = cocos2d::CCString::createWithFormat(
"Clear this conversation?\n"
"Your message history will be permanently deleted.\n"
"%s can still message you unless you block or unfriend them.",
v3);
CString = cocos2d::CCString::getCString(v6);
}
else if ( v4 )
{
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
{
v7 = cocos2d::CCString::createWithFormat(
"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.",
v3);
CString = cocos2d::CCString::getCString(v7);
}
}
else
{
CString = "Clears the conversation on your side.\nIt comes back when a new message arrives.";
}
v8 = a1 + 1008;
v15 = 0;
v16 = 0;
if ( !a1 )
v8 = 0;
v9 = -1;
v14 = 0;
do
++v9;
while ( CString[v9] );
sub_14003D230(&v14, CString, v9);
v10 = "Clear";
v11 = "Clear Messages";
if ( !v4 )
{
v10 = "Leave";
v11 = "Leave Conversation";
}
v12 = (__int64 *)FLAlertLayer::create(
v8,
(int)v11,
(__int64)&v14,
(__int64)"Back",
(__int64)v10,
1136525312,
0,
0,
1065353216);
(*(void (__fastcall **)(__int64 *, __int64))(*v12 + 64))(v12, 1);
ButtonSprite::updateBGImage(v12[77], "GJ_button_06.png");
return (*(__int64 (__fastcall **)(__int64 *))(*v12 + 1064))(v12);
}