//
// ProfilePage::FLAlert_Clicked from 0xa55720 to 0xa55900 (480 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ProfilePage::FLAlert_Clicked @ 0xa55904
// > ??> @ 0xeadd8
// > ??> @ 0x148cfc0
//
// 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 13:00:07 +0000
//
__int64 __fastcall ProfilePage::FLAlert_Clicked(ProfilePage *this, FLAlertLayer *a2, char a3)
{
GameLevelManager *v6; // x0
GameLevelManager *v7; // x0
GameLevelManager *v8; // x0
GameLevelManager *v9; // x0
GameLevelManager *v10; // x0
GameLevelManager *v11; // x0
__int64 v12; // x0
GameLevelManager *v13; // x0
GameLevelManager *v14; // x0
__int64 v15; // [xsp+30h] [xbp+30h] BYREF
__int64 v16; // [xsp+38h] [xbp+38h]
void *v17; // [xsp+40h] [xbp+40h]
if ( !a3 )
return _stack_chk_guard;
*(_QWORD *)(GameLevelManager::sharedState(_stack_chk_guard) + 1352) = (char *)this + 688;
v6 = (GameLevelManager *)(*(__int64 (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)v6 == 1 )
{
v10 = (GameLevelManager *)GameLevelManager::sharedState(v6);
*((_QWORD *)v10 + 170) = (char *)this + 696;
v11 = (GameLevelManager *)GameLevelManager::sharedState(v10);
if ( !(unsigned __int8)GameLevelManager::deleteSentFriendRequest(v11, *((unsigned int *)this + 184)) )
return _stack_chk_guard;
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Removing Friend Request...", 0x1Au);
v12 = UploadActionPopup::create((__int64)this + 704, (char *)&v15);
}
else
{
v7 = (GameLevelManager *)(*(__int64 (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)v7 != 2 )
{
v8 = (GameLevelManager *)(*(__int64 (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)v8 == 3 )
{
*(_QWORD *)(GameLevelManager::sharedState(v8) + 1360) = (char *)this + 696;
ProfilePage::blockUser(this);
}
else
{
v9 = (GameLevelManager *)(*(__int64 (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)v9 == 4 )
{
*(_QWORD *)(GameLevelManager::sharedState(v9) + 1360) = (char *)this + 696;
ProfilePage::unblockUser(this);
}
}
return _stack_chk_guard;
}
v13 = (GameLevelManager *)GameLevelManager::sharedState(v7);
*((_QWORD *)v13 + 170) = (char *)this + 696;
v14 = (GameLevelManager *)GameLevelManager::sharedState(v13);
if ( !(unsigned __int8)GameLevelManager::removeFriend(v14, (const char *)*((unsigned int *)this + 184)) )
return _stack_chk_guard;
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Removing Friend...", 0x12u);
v12 = UploadActionPopup::create((__int64)this + 704, (char *)&v15);
}
*((_QWORD *)this + 109) = v12;
if ( (v15 & 1) != 0 )
{
operator delete(v17);
v12 = *((_QWORD *)this + 109);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 1312LL))(v12);
return _stack_chk_guard;
}