//
// sub_100966920 from 0x100966920 to 0x1009670a9 (1929 bytes)
//
// 1 xrefs:
// > sub_100964B50 @ 0x100965467
//
// 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:48 +0000
//
void __fastcall sub_100966920(__int64 a1)
{
void *v1; // r14
unsigned int *v2; // r15
__int64 v3; // rbx
__int64 v4; // r14
unsigned __int64 v5; // rax
const std::string::value_type *v6; // rsi
int v7; // eax
const char *v8; // r14
__int64 v9; // rax
const std::string::value_type *v10; // r15
size_t v11; // rax
std::string::size_type v12; // r12
char *data; // r13
size_t v14; // rbx
unsigned int v15; // eax
size_t v16; // rdx
unsigned int v17; // ebx
_BYTE *v18; // r14
const void *v19; // rdi
std::string::size_type size; // rax
std::string *v21; // rax
unsigned int v22; // edx
const std::string::value_type *v23; // rsi
std::string::size_type v24; // rdx
std::string *v25; // rax
std::string *v26; // rax
char *v27; // rsi
std::string::size_type v28; // rdx
std::string *v29; // rax
char *v30; // rsi
std::string::size_type v31; // rdx
const char *v32; // rsi
const char *v33; // rdx
char *v34; // rax
const char *CString; // r14
size_t v36; // rax
size_t v37; // r15
char *v38; // r12
char *v39; // r14
size_t v40; // rbx
size_t v41; // rax
size_t v42; // r15
char *v43; // r12
size_t v44; // rbx
__int64 *v45; // rbx
void *v46; // [rsp+8h] [rbp-118h] BYREF
_BYTE *v47; // [rsp+10h] [rbp-110h]
std::string v48; // [rsp+20h] [rbp-100h] BYREF
__int128 v49; // [rsp+38h] [rbp-E8h] BYREF
void *__p; // [rsp+48h] [rbp-D8h]
std::string v51; // [rsp+50h] [rbp-D0h] BYREF
__int128 v52; // [rsp+68h] [rbp-B8h] BYREF
void *v53; // [rsp+78h] [rbp-A8h]
std::string v54; // [rsp+80h] [rbp-A0h] BYREF
std::string v55; // [rsp+A0h] [rbp-80h] BYREF
std::string __dst; // [rsp+B8h] [rbp-68h] BYREF
std::string::value_type __s[16]; // [rsp+D0h] [rbp-50h] BYREF
char *v58; // [rsp+E0h] [rbp-40h]
__int64 v59; // [rsp+F0h] [rbp-30h]
v59 = a1;
sub_100967240(&v46);
v1 = v46;
if ( v46 != v47 )
{
memset(&v54, 0, sizeof(v54));
v2 = (unsigned int *)v46;
v3 = ((v47 - (_BYTE *)v46) >> 2 == 0) + ((v47 - (_BYTE *)v46) >> 2);
v4 = 0;
do
{
std::string::append(&v54, "\n- ");
v5 = v2[v4];
v6 = "?";
if ( v5 <= 7 )
v6 = off_100BCBEB0[v5];
std::string::append(&v54, v6);
std::string::append(&v54, "");
++v4;
}
while ( v3 != v4 );
v7 = *(_DWORD *)(v59 + 1024);
switch ( v7 )
{
case 3:
case 7:
v8 = "comment";
break;
case 4:
v8 = "post";
break;
case 5:
v8 = "message";
break;
case 6:
v8 = "friend request";
break;
case 8:
v8 = "";
if ( *(__int64 *)(v59 + 1088) > 0 )
v8 = "message";
break;
default:
v8 = "";
break;
}
v10 = "";
if ( !v7 )
v10 = "";
v11 = strlen(v8);
if ( v11 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v12 = v11;
if ( v11 >= 0x17 )
{
v14 = 26;
if ( (v11 | 7) != 0x17 )
v14 = (v11 | 7) + 1;
data = (char *)operator new(v14);
__dst.__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst.__r_.__value_.__r.__words[0] = v14 | 1;
__dst.__r_.__value_.__l.__size_ = v12;
}
else
{
__dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v11);
data = __dst.__r_.__value_.__s.__data_;
if ( !v11 )
{
LABEL_27:
data[v12] = 0;
v15 = *(unsigned __int8 *)(v59 + 1040);
if ( (v15 & 1) != 0 )
{
v16 = *(_QWORD *)(v59 + 1048);
v17 = *(unsigned __int8 *)(v59 + 1096);
if ( (v17 & 1) == 0 )
goto LABEL_29;
}
else
{
v16 = v15 >> 1;
v17 = *(unsigned __int8 *)(v59 + 1096);
if ( (v17 & 1) == 0 )
{
LABEL_29:
v18 = (_BYTE *)(v59 + 1096);
if ( v16 != v17 >> 1 )
{
LABEL_36:
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
size = __dst.__r_.__value_.__l.__size_;
else
size = *(_BYTE *)&__dst.__r_.__value_.__l.0 >> 1;
v51.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(8 * (size != 0));
if ( size )
*(_DWORD *)((char *)&v51.__r_.__value_.__l.0 + 1) = 544106784;
*((_BYTE *)&v51.__r_.__value_.__l.0 + 4 * (size != 0) + 1) = 0;
v21 = std::string::append(&v51, v10);
v48 = *v21;
*(_OWORD *)&v21->__r_.__value_.__l.0 = 0;
v21->__r_.__value_.__r.__words[2] = 0;
v22 = *(unsigned __int8 *)(v59 + 1040);
if ( (v22 & 1) != 0 )
{
v23 = *(const std::string::value_type **)(v59 + 1056);
v24 = *(_QWORD *)(v59 + 1048);
}
else
{
v23 = (const std::string::value_type *)(v59 + 1041);
v24 = v22 >> 1;
}
v25 = std::string::append(&v48, v23, v24);
v55 = *v25;
*(_OWORD *)&v25->__r_.__value_.__l.0 = 0;
v25->__r_.__value_.__r.__words[2] = 0;
v26 = std::string::append(&v55, "");
v58 = v26->__r_.__value_.__l.__data_;
*(_OWORD *)__s = *(_OWORD *)&v26->__r_.__value_.__l.0;
*(_OWORD *)&v26->__r_.__value_.__l.0 = 0;
v26->__r_.__value_.__r.__words[2] = 0;
if ( (__s[0] & 1) != 0 )
{
v27 = v58;
v28 = *(_QWORD *)&__s[8];
}
else
{
v28 = (unsigned __int8)__s[0] >> 1;
v27 = &__s[1];
}
std::string::append(&__dst, v27, v28);
if ( (__s[0] & 1) != 0 )
{
operator delete(v58);
if ( (*(_BYTE *)&v55.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_49:
if ( (*(_BYTE *)&v48.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_50;
goto LABEL_57;
}
}
else if ( (*(_BYTE *)&v55.__r_.__value_.__s.0 & 1) == 0 )
{
goto LABEL_49;
}
operator delete(v55.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v48.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_50:
if ( (*(_BYTE *)&v51.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_52;
goto LABEL_51;
}
LABEL_57:
operator delete(v48.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v51.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_52:
LOBYTE(v17) = *v18;
if ( (*v18 & 1) != 0 )
goto LABEL_53;
goto LABEL_62;
}
LABEL_51:
operator delete(v51.__r_.__value_.__l.__data_);
goto LABEL_52;
}
LABEL_33:
if ( (v15 & 1) != 0 )
{
v19 = *(const void **)(v59 + 1056);
if ( (v17 & 1) == 0 )
goto LABEL_35;
}
else
{
v19 = (const void *)(v59 + 1041);
if ( (v17 & 1) == 0 )
{
LABEL_35:
if ( memcmp(v19, (const void *)(v59 + 1097), v16) )
goto LABEL_36;
goto LABEL_61;
}
}
if ( memcmp(v19, *(const void **)(v59 + 1112), v16) )
goto LABEL_36;
LABEL_61:
if ( (v17 & 1) != 0 )
{
LABEL_53:
if ( !*(_QWORD *)(v59 + 1104) )
goto LABEL_70;
goto LABEL_63;
}
LABEL_62:
if ( !((unsigned __int8)v17 >> 1) )
goto LABEL_70;
LABEL_63:
std::operator+(&v55, " by ", v18);
v29 = std::string::append(&v55, "");
v58 = v29->__r_.__value_.__l.__data_;
*(_OWORD *)__s = *(_OWORD *)&v29->__r_.__value_.__l.0;
*(_OWORD *)&v29->__r_.__value_.__l.0 = 0;
v29->__r_.__value_.__r.__words[2] = 0;
if ( (__s[0] & 1) != 0 )
{
v30 = v58;
v31 = *(_QWORD *)&__s[8];
}
else
{
v31 = (unsigned __int8)__s[0] >> 1;
v30 = &__s[1];
}
std::string::append(&__dst, v30, v31);
if ( (__s[0] & 1) != 0 )
operator delete(v58);
if ( (*(_BYTE *)&v55.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v55.__r_.__value_.__l.__data_);
LABEL_70:
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
{
v32 = __dst.__r_.__value_.__l.__data_;
if ( (*(_BYTE *)&v54.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_72:
v33 = v54.__r_.__value_.__s.__data_;
goto LABEL_75;
}
}
else
{
v32 = __dst.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v54.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_72;
}
v33 = v54.__r_.__value_.__l.__data_;
LABEL_75:
v34 = sub_10088E820(
"Report %s for:%s\nFalse reports may result in action against your own account.",
v32,
v33);
CString = (const char *)cocos2d::CCString::getCString((__int64)v34);
v36 = strlen(CString);
if ( v36 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v37 = v36;
if ( v36 >= 0x17 )
{
v40 = 26;
if ( (v36 | 7) != 0x17 )
v40 = (v36 | 7) + 1;
v38 = (char *)operator new(v40);
v58 = v38;
*(_QWORD *)__s = v40 | 1;
*(_QWORD *)&__s[8] = v37;
}
else
{
__s[0] = 2 * v36;
v38 = &__s[1];
if ( !v36 )
{
__s[1] = 0;
if ( (__s[0] & 1) != 0 )
{
LABEL_79:
v39 = v58;
goto LABEL_85;
}
LABEL_84:
v39 = &__s[1];
LABEL_85:
v41 = strlen(v39);
if ( v41 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v42 = v41;
if ( v41 >= 0x17 )
{
v44 = 26;
if ( (v41 | 7) != 0x17 )
v44 = (v41 | 7) + 1;
v43 = (char *)operator new(v44);
v53 = v43;
*(_QWORD *)&v52 = v44 | 1;
*((_QWORD *)&v52 + 1) = v42;
}
else
{
LOBYTE(v52) = 2 * v41;
v43 = (char *)&v52 + 1;
if ( !v41 )
{
LABEL_93:
v43[v42] = 0;
v45 = (__int64 *)FLAlertLayer::create(
(int)v59 + 1016,
(int)"Confirm Report",
&v52,
(int)"Cancel",
(int)"Report",
0,
380.0,
0.0,
1.0);
if ( (v52 & 1) != 0 )
operator delete(v53);
(*(void (__fastcall **)(__int64 *, __int64))(*v45 + 72))(v45, 1);
ButtonSprite::updateBGImage(v45[77], (__int64)"GJ_button_06.png");
(*(void (__fastcall **)(__int64 *))(*v45 + 1312))(v45);
if ( (__s[0] & 1) != 0 )
{
operator delete(v58);
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_97:
if ( (*(_BYTE *)&v54.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_99:
v1 = v46;
goto LABEL_100;
}
LABEL_98:
operator delete(v54.__r_.__value_.__l.__data_);
goto LABEL_99;
}
}
else if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 )
{
goto LABEL_97;
}
operator delete(__dst.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v54.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_99;
goto LABEL_98;
}
}
memmove(v43, v39, v42);
goto LABEL_93;
}
}
memmove(v38, CString, v37);
v38[v37] = 0;
if ( (__s[0] & 1) != 0 )
goto LABEL_79;
goto LABEL_84;
}
}
v18 = (_BYTE *)(v59 + 1096);
if ( v16 != *(_QWORD *)(v59 + 1104) )
goto LABEL_36;
goto LABEL_33;
}
}
memcpy(data, v8, v12);
goto LABEL_27;
}
__p = operator new(0x28u);
*(_QWORD *)&v49 = 41;
*((_QWORD *)&v49 + 1) = 34;
strcpy((char *)__p, "Please select at least one reason.");
v9 = sub_100493AB0(0, (__int64)"Report", &v49, (__int64)"OK", 0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 1312LL))(v9);
if ( (v49 & 1) != 0 )
operator delete(__p);
LABEL_100:
if ( v1 )
operator delete(v1);
}