//
// ProfilePage::FLAlert_Clicked from 0x1403c4af0 to 0x1403c4ddb (747 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405cb398
// > ??> @ 0x1406d77d8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=6
void ProfilePage::FLAlert_Clicked(ProfilePage *a1, FLAlertLayer *a2, bool a3)
{
int *p_m_uIndexInArray; // rsi
GameLevelManager *v6; // rcx
int *p_m_unknown2; // rcx
cocos2d::CCGridBase *v8; // rax
int *v9; // rsi
GameLevelManager *v10; // rcx
void **p_m_pUserData; // rsi
int *v12; // rbx
GameLevelManager *v13; // rcx
__int128 v14; // [rsp+20h] [rbp-20h] BYREF
__int64 v15; // [rsp+30h] [rbp-10h]
__int64 v16; // [rsp+38h] [rbp-8h]
void *v17; // [rsp+78h] [rbp+38h]
void *v18; // [rsp+78h] [rbp+38h]
void *v19; // [rsp+78h] [rbp+38h]
if ( a3 )
{
if ( a2->getTag(a2) == 1 )
{
p_m_uIndexInArray = &a1->m_uIndexInArray;
if ( a1 == (ProfilePage *)632 )
p_m_uIndexInArray = nullptr;
v6 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v17 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v17);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v6 = (GameLevelManager *)qword_1406C2EC0;
}
v6->m_uploadActionDelegate = (UploadActionDelegate *)p_m_uIndexInArray;
if ( GameLevelManager::deleteFriendRequests(v6, LODWORD(a1->m_fScaleX), nullptr, 1) )
{
v14 = 0;
*(_QWORD *)&v14 = sub_14003AA10(0x20u);
v15 = 26;
v16 = 31;
strcpy((char *)v14, "Removing Friend Request...");
p_m_unknown2 = &a1->m_unknown2;
if ( a1 == (ProfilePage *)632 )
p_m_unknown2 = nullptr;
LABEL_10:
v8 = (cocos2d::CCGridBase *)UploadActionPopup::create((__int64)p_m_unknown2, (__int64)&v14);
a1->m_pGrid = v8;
LABEL_27:
v8->__vftable[10].reuse(v8);
}
}
else if ( a2->getTag(a2) == 2 )
{
v9 = &a1->m_uIndexInArray;
if ( a1 == (ProfilePage *)632 )
v9 = nullptr;
v10 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v18 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v18);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v10 = (GameLevelManager *)qword_1406C2EC0;
}
v10->m_uploadActionDelegate = (UploadActionDelegate *)v9;
if ( GameLevelManager::removeFriend(v10, LODWORD(a1->m_fScaleX)) )
{
v14 = 0;
*(_QWORD *)&v14 = sub_14003AA10(0x20u);
v15 = 18;
v16 = 31;
strcpy((char *)v14, "Removing Friend...");
p_m_unknown2 = &a1->m_unknown2;
if ( a1 == (ProfilePage *)632 )
p_m_unknown2 = nullptr;
goto LABEL_10;
}
}
else if ( a2->getTag(a2) == 3 )
{
p_m_pUserData = &a1[-1].m_pUserData;
v12 = &a1->m_uIndexInArray;
if ( !p_m_pUserData )
v12 = nullptr;
v13 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v19 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v19);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v13 = (GameLevelManager *)qword_1406C2EC0;
}
v13->m_uploadActionDelegate = (UploadActionDelegate *)v12;
if ( GameLevelManager::blockUser(v13, *((_DWORD *)p_m_pUserData[86] + 98)) )
{
v14 = 0;
*(_QWORD *)&v14 = sub_14003AA10(0x20u);
v15 = 16;
v16 = 31;
strcpy((char *)v14, "Blocking user...");
v8 = (cocos2d::CCGridBase *)UploadActionPopup::create((__int64)(p_m_pUserData + 84), (__int64)&v14);
p_m_pUserData[104] = v8;
goto LABEL_27;
}
}
}
}