//
// GJMessagePopup::onBlock from 0x1403a4660 to 0x1403a489b (571 bytes)
//
// 2 xrefs:
// > GJMessagePopup::loadFromGJMessage @ 0x1403a43f2
// > ??> @ 0x1409236cc
//
// 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:31:18 +0000
//
// Hidden C++ exception states: #wind=4
void __fastcall GJMessagePopup::onBlock(__int64 a1)
{
const char *v2; // r8
const char *v3; // rdx
cocos2d::CCString *v4; // rax
const char *CString; // rax
size_t v6; // rbx
size_t v7; // r8
void **v8; // rdx
__int64 *v9; // rbx
__int64 v10; // rax
void *v11; // rcx
void *v12; // [rsp+58h] [rbp-41h]
__int128 v13; // [rsp+60h] [rbp-39h] BYREF
__int64 v14; // [rsp+70h] [rbp-29h]
__int64 v15; // [rsp+78h] [rbp-21h]
_BYTE v16[32]; // [rsp+80h] [rbp-19h] BYREF
void *Block[2]; // [rsp+A0h] [rbp+7h] BYREF
__int64 v18; // [rsp+B0h] [rbp+17h]
unsigned __int64 v19; // [rsp+B8h] [rbp+1Fh]
_QWORD v20[3]; // [rsp+C0h] [rbp+27h] BYREF
unsigned __int64 v21; // [rsp+D8h] [rbp+3Fh]
sub_14003F4F0((__int64)v20, *(_QWORD *)(a1 + 712) + 400LL);
v2 = (const char *)v20;
if ( v21 > 0xF )
v2 = (const char *)v20[0];
v3 = (const char *)v20;
if ( v21 > 0xF )
v3 = (const char *)v20[0];
v4 = 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",
v3,
v2);
CString = cocos2d::CCString::getCString(v4);
*(_OWORD *)Block = 0;
v18 = 0;
v19 = 0;
v6 = -1;
v7 = -1;
do
++v7;
while ( CString[v7] );
sub_14003D230(Block, CString, v7);
v8 = Block;
if ( v19 > 0xF )
v8 = (void **)Block[0];
v13 = 0;
v14 = 0;
v15 = 0;
do
++v6;
while ( *((_BYTE *)v8 + v6) );
sub_14003D230(&v13, v8, v6);
v12 = operator new(0x298u);
v9 = (__int64 *)FLAlertLayer::FLAlertLayer((__int64)v12);
if ( v9 )
{
v10 = sub_14003F4F0((__int64)v16, (__int64)&v13);
if ( FLAlertLayer::init(
(cocos2d::CCLayerColor *)v9,
a1 + 680,
"Confirm Block",
v10,
(__int64)"Back",
(__int64)"Block",
380.0,
0,
0,
1.0) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v9);
}
else
{
(*(void (__fastcall **)(__int64 *, __int64))(*v9 + 8))(v9, 1);
v9 = nullptr;
}
}
sub_14003D310((__int64)&v13);
ButtonSprite::updateBGImage(v9[77], "GJ_button_06.png");
(*(void (__fastcall **)(__int64 *, __int64))(*v9 + 64))(v9, 1);
(*(void (__fastcall **)(__int64 *))(*v9 + 1064))(v9);
if ( v19 > 0xF )
{
v11 = Block[0];
if ( v19 + 1 >= 0x1000 )
{
v11 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v11);
}
sub_14003D310((__int64)v20);
}