//
// sub_100521918 from 0x100521918 to 0x100521e0c (1268 bytes)
//
// 1 xrefs:
// > sub_10051FFE8 @ 0x1005206f8
//
// 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:07:12 +0000
//
void __fastcall sub_100521918(__int64 a1)
{
unsigned __int64 v2; // x22
__int64 v3; // x8
const std::string::value_type *v4; // x1
int v5; // w8
char *v6; // x1
__int64 v7; // x0
void *v8; // x0
const std::string::value_type *v9; // x21
int v10; // w8
size_t v11; // x2
__int64 v12; // x9
int v13; // w24
const void *v14; // x0
const void *v15; // x1
std::string::size_type size; // x8
char *v17; // x1
std::string *v18; // x0
__int128 v19; // q0
int v20; // w9
const std::string::value_type *v21; // x1
std::string::size_type v22; // x2
std::string *v23; // x0
__int128 v24; // q0
std::string *v25; // x0
__int128 v26; // q0
void **v27; // x1
std::string::size_type v28; // x2
std::string *v29; // x0
__int128 v30; // q0
void **v31; // x1
std::string::size_type v32; // x2
std::string *v33; // x8
std::string *v34; // x9
void *v35; // x0
char *CString; // x0
char *v37; // x1
__int64 *v38; // x19
void *v39[2]; // [xsp+10h] [xbp-130h] BYREF
char v40; // [xsp+27h] [xbp-119h]
std::string v41; // [xsp+28h] [xbp-118h] BYREF
std::string v42; // [xsp+40h] [xbp-100h] BYREF
std::string v43; // [xsp+60h] [xbp-E0h] BYREF
void *__p[2]; // [xsp+80h] [xbp-C0h] BYREF
signed __int64 v45; // [xsp+90h] [xbp-B0h]
std::string v46; // [xsp+A0h] [xbp-A0h] BYREF
std::string v47; // [xsp+B8h] [xbp-88h] BYREF
_QWORD v48[2]; // [xsp+D0h] [xbp-70h] BYREF
char v49; // [xsp+E7h] [xbp-59h]
unsigned int *v50; // [xsp+E8h] [xbp-58h] BYREF
unsigned int *v51; // [xsp+F0h] [xbp-50h]
sub_100521F30(&v50);
if ( v50 == v51 )
{
sub_100009900(v48, "Please select at least one reason.");
v7 = sub_10034A8F8(0, (__int64)"Report", (__int64)v48, (__int64)"OK", 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);
if ( (v49 & 0x80000000) == 0 )
goto LABEL_94;
v8 = (void *)v48[0];
goto LABEL_93;
}
v2 = 0;
memset(&v47, 0, sizeof(v47));
do
{
std::string::append(&v47, "\n- ");
v3 = v50[v2];
v4 = "?";
if ( (unsigned int)v3 <= 7 )
v4 = off_10099EB38[v3];
std::string::append(&v47, v4);
std::string::append(&v47, "");
++v2;
}
while ( v2 < v51 - v50 );
v5 = *(_DWORD *)(a1 + 1024);
if ( v5 <= 5 )
{
if ( v5 != 3 )
{
if ( v5 == 4 )
{
v6 = "post";
}
else
{
v6 = "";
if ( v5 == 5 )
v6 = "message";
}
goto LABEL_22;
}
LABEL_19:
v6 = "comment";
goto LABEL_22;
}
if ( v5 == 6 )
{
v6 = "friend request";
goto LABEL_22;
}
if ( v5 == 7 )
goto LABEL_19;
v6 = "";
if ( v5 == 8 )
{
if ( *(__int64 *)(a1 + 1088) <= 0 )
v6 = "";
else
v6 = "message";
}
LABEL_22:
if ( v5 )
v9 = "";
else
v9 = "";
sub_100009900(&v46, v6);
v10 = *(char *)(a1 + 1063);
if ( v10 >= 0 )
v11 = *(unsigned __int8 *)(a1 + 1063);
else
v11 = *(_QWORD *)(a1 + 1048);
v12 = *(unsigned __int8 *)(a1 + 1119);
v13 = (char)v12;
if ( (v12 & 0x80u) != 0LL )
v12 = *(_QWORD *)(a1 + 1104);
if ( v11 != v12
|| (v10 >= 0 ? (v14 = (const void *)(a1 + 1040)) : (v14 = *(const void **)(a1 + 1040)),
v13 >= 0 ? (v15 = (const void *)(a1 + 1096)) : (v15 = *(const void **)(a1 + 1096)),
memcmp(v14, v15, v11)) )
{
size = HIBYTE(v46.__r_.__value_.__r.__words[2]);
if ( (v46.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = v46.__r_.__value_.__l.__size_;
if ( size )
v17 = " in ";
else
v17 = "";
sub_100009900(&v41, v17);
v18 = std::string::append(&v41, v9);
v19 = *(_OWORD *)&v18->__r_.__value_.__l.__data_;
v42.__r_.__value_.__r.__words[2] = v18->__r_.__value_.__r.__words[2];
*(_OWORD *)&v42.__r_.__value_.__l.__data_ = v19;
v18->__r_.__value_.__l.__size_ = 0;
v18->__r_.__value_.__r.__words[2] = 0;
v18->__r_.__value_.__r.__words[0] = 0;
v20 = *(char *)(a1 + 1063);
if ( v20 >= 0 )
v21 = (const std::string::value_type *)(a1 + 1040);
else
v21 = *(const std::string::value_type **)(a1 + 1040);
if ( v20 >= 0 )
v22 = *(unsigned __int8 *)(a1 + 1063);
else
v22 = *(_QWORD *)(a1 + 1048);
v23 = std::string::append(&v42, v21, v22);
v24 = *(_OWORD *)&v23->__r_.__value_.__l.__data_;
v43.__r_.__value_.__r.__words[2] = v23->__r_.__value_.__r.__words[2];
*(_OWORD *)&v43.__r_.__value_.__l.__data_ = v24;
v23->__r_.__value_.__l.__size_ = 0;
v23->__r_.__value_.__r.__words[2] = 0;
v23->__r_.__value_.__r.__words[0] = 0;
v25 = std::string::append(&v43, "");
v26 = *(_OWORD *)&v25->__r_.__value_.__l.__data_;
v45 = v25->__r_.__value_.__r.__words[2];
*(_OWORD *)__p = v26;
v25->__r_.__value_.__l.__size_ = 0;
v25->__r_.__value_.__r.__words[2] = 0;
v25->__r_.__value_.__r.__words[0] = 0;
if ( v45 >= 0 )
v27 = __p;
else
v27 = (void **)__p[0];
if ( v45 >= 0 )
v28 = HIBYTE(v45);
else
v28 = (std::string::size_type)__p[1];
std::string::append(&v46, (const std::string::value_type *)v27, v28);
if ( SHIBYTE(v45) < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v43.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v43.__r_.__value_.__l.__data_);
if ( SHIBYTE(v42.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v42.__r_.__value_.__l.__data_);
if ( SHIBYTE(v41.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v41.__r_.__value_.__l.__data_);
LOBYTE(v13) = *(_BYTE *)(a1 + 1119);
}
if ( (v13 & 0x80) != 0 )
{
if ( !*(_QWORD *)(a1 + 1104) )
goto LABEL_78;
}
else if ( !(_BYTE)v13 )
{
goto LABEL_78;
}
std::operator+(&v43, " by ", a1 + 1096);
v29 = std::string::append(&v43, "");
v30 = *(_OWORD *)&v29->__r_.__value_.__l.__data_;
v45 = v29->__r_.__value_.__r.__words[2];
*(_OWORD *)__p = v30;
v29->__r_.__value_.__l.__size_ = 0;
v29->__r_.__value_.__r.__words[2] = 0;
v29->__r_.__value_.__r.__words[0] = 0;
if ( v45 >= 0 )
v31 = __p;
else
v31 = (void **)__p[0];
if ( v45 >= 0 )
v32 = HIBYTE(v45);
else
v32 = (std::string::size_type)__p[1];
std::string::append(&v46, (const std::string::value_type *)v31, v32);
if ( SHIBYTE(v45) < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v43.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v43.__r_.__value_.__l.__data_);
LABEL_78:
v33 = &v46;
if ( (v46.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v33 = (std::string *)v46.__r_.__value_.__r.__words[0];
v34 = &v47;
if ( (v47.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v34 = (std::string *)v47.__r_.__value_.__r.__words[0];
v35 = sub_1003065B0(
"Report %s for:%s\nFalse reports may result in action against your own account.",
(const char *)v33,
(const char *)v34);
CString = (char *)cocos2d::CCString::getCString((__int64)v35);
sub_100009900(__p, CString);
if ( v45 >= 0 )
v37 = (char *)__p;
else
v37 = (char *)__p[0];
sub_100009900(v39, v37);
v38 = (__int64 *)FLAlertLayer::create(
a1 + 1016,
(__int64)"Confirm Report",
(__int64)v39,
(__int64)"Cancel",
(__int64)"Report",
0,
380.0,
0.0,
1.0);
if ( v40 < 0 )
operator delete(v39[0]);
(*(void (__fastcall **)(__int64 *, __int64))(*v38 + 72))(v38, 1);
ButtonSprite::updateBGImage(v38[77], (__int64)"GJ_button_06.png");
(*(void (__fastcall **)(__int64 *))(*v38 + 1312))(v38);
if ( SHIBYTE(v45) < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v46.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v46.__r_.__value_.__l.__data_);
if ( SHIBYTE(v47.__r_.__value_.__r.__words[2]) < 0 )
{
v8 = (void *)v47.__r_.__value_.__r.__words[0];
LABEL_93:
operator delete(v8);
}
LABEL_94:
if ( v50 )
{
v51 = v50;
operator delete(v50);
}
}