//
// ProfilePage::onBlockUser from 0x1405573e0 to 0x14055764b (619 bytes)
//
// 2 xrefs:
// > ProfilePage::setupAccountButtons @ 0x1405527f3
// > ??> @ 0x14092bec8
//
// 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:34:11 +0000
//
// Hidden C++ exception states: #wind=4
void __fastcall ProfilePage::onBlockUser(__int64 a1)
{
__int64 v2; // rax
__int64 v3; // rcx
const char *v4; // r8
const char *v5; // rdx
cocos2d::CCString *v6; // rax
const char *CString; // rax
size_t v8; // rbx
size_t v9; // r8
void **v10; // rdx
__int64 *v11; // rbx
__int64 v12; // rax
void *v13; // rcx
void *v14; // [rsp+58h] [rbp-41h]
__int128 v15; // [rsp+60h] [rbp-39h] BYREF
__int64 v16; // [rsp+70h] [rbp-29h]
__int64 v17; // [rsp+78h] [rbp-21h]
_BYTE v18[32]; // [rsp+80h] [rbp-19h] BYREF
void *Block[2]; // [rsp+A0h] [rbp+7h] BYREF
__int64 v20; // [rsp+B0h] [rbp+17h]
unsigned __int64 v21; // [rsp+B8h] [rbp+1Fh]
_QWORD v22[3]; // [rsp+C0h] [rbp+27h] BYREF
unsigned __int64 v23; // [rsp+D8h] [rbp+3Fh]
v2 = GJAccountManager::sharedState();
if ( *(_DWORD *)(v2 + 360) - *(_DWORD *)(v2 + 364) > 0 )
{
sub_14003F4F0((__int64)v22, *(_QWORD *)(a1 + 728) + 320LL);
v4 = (const char *)v22;
if ( v23 > 0xF )
v4 = (const char *)v22[0];
v5 = (const char *)v22;
if ( v23 > 0xF )
v5 = (const char *)v22[0];
v6 = cocos2d::CCString::createWithFormat(
"Are you sure you want to block %s?\n"
"%s will no longer be able to:\n"
"- View your profile\n"
"- Send messages\n"
"- Send friend requests\n"
"- Messages from this user will be removed\n"
"You will leave group chats they own or group chats with only the two of you. Other shared group chats"
" are not affected.",
v5,
v4);
CString = cocos2d::CCString::getCString(v6);
*(_OWORD *)Block = 0;
v20 = 0;
v21 = 0;
v8 = -1;
v9 = -1;
do
++v9;
while ( CString[v9] );
sub_14003D230(Block, CString, v9);
v10 = Block;
if ( v21 > 0xF )
v10 = (void **)Block[0];
v15 = 0;
v16 = 0;
v17 = 0;
do
++v8;
while ( *((_BYTE *)v10 + v8) );
sub_14003D230(&v15, v10, v8);
v14 = operator new(0x298u);
v11 = (__int64 *)FLAlertLayer::FLAlertLayer((__int64)v14);
if ( v11 )
{
v12 = sub_14003F4F0((__int64)v18, (__int64)&v15);
if ( FLAlertLayer::init(
(cocos2d::CCLayerColor *)v11,
a1 + 664,
"Confirm Block",
v12,
(__int64)"Back",
(__int64)"Block",
380.0,
0,
0,
1.0) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v11);
}
else
{
(*(void (__fastcall **)(__int64 *, __int64))(*v11 + 8))(v11, 1);
v11 = nullptr;
}
}
sub_14003D310((__int64)&v15);
ButtonSprite::updateBGImage(v11[77], "GJ_button_06.png");
(*(void (__fastcall **)(__int64 *, __int64))(*v11 + 64))(v11, 3);
(*(void (__fastcall **)(__int64 *))(*v11 + 1064))(v11);
if ( v21 > 0xF )
{
v13 = Block[0];
if ( v21 + 1 >= 0x1000 )
{
v13 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v13);
}
sub_14003D310((__int64)v22);
}
else
{
GJAccountManager::sharedState();
GJAccountManager::showAccountNeededAlert(v3, "block users");
}
}