//
// sub_1004F6674 from 0x1004f6674 to 0x1004f674c (216 bytes)
//
// 4 xrefs:
// > sub_1004F51C4 @ 0x1004f51f0
// > sub_1004F5368 @ 0x1004f53d0
// > sub_1004F540C @ 0x1004f54e0
// > MessageThreadsPage::friendPickerClosed @ 0x1004f6b18
//
// This function is hookable on this platform (idp: arm, 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:06:48 +0000
//
__int64 __fastcall sub_1004F6674(__int64 a1)
{
__int64 v2; // x0
char v3; // w21
size_t size; // x2
__int64 v5; // x9
int v6; // w8
std::string *v7; // x0
const void *v8; // x1
__int64 v9; // x19
std::string __str; // [xsp+8h] [xbp-38h] BYREF
v2 = *(_QWORD *)(a1 + 784);
if ( v2 )
CCTextInputNode::getString(v2, &__str);
else
sub_100009900(&__str, "");
v3 = HIBYTE(__str.__r_.__value_.__r.__words[2]);
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
size = HIBYTE(__str.__r_.__value_.__r.__words[2]);
else
size = __str.__r_.__value_.__l.__size_;
v5 = *(unsigned __int8 *)(a1 + 831);
v6 = (char)v5;
if ( (v5 & 0x80u) != 0LL )
v5 = *(_QWORD *)(a1 + 816);
if ( size == v5 )
{
v7 = (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL
? &__str
: (std::string *)__str.__r_.__value_.__r.__words[0];
v8 = v6 >= 0 ? (const void *)(a1 + 808) : *(const void **)(a1 + 808);
if ( !memcmp(v7, v8, size) )
{
v9 = 0;
if ( (v3 & 0x80) == 0 )
return v9;
goto LABEL_18;
}
}
std::string::operator=((std::string *)(a1 + 808), &__str);
v9 = 1;
if ( (*((_BYTE *)&__str.__r_.__value_.__s + 23) & 0x80) != 0 )
LABEL_18:
operator delete(__str.__r_.__value_.__l.__data_);
return v9;
}