//
// FriendRequestPopup::onRemove from 0xa28638 to 0xa2879c (356 bytes)
//
// 4 xrefs:
// > FriendRequestPopup::FLAlert_Clicked @ 0xa289c0
// > ??> @ 0x7f1b0
// > FriendRequestPopup::loadFromGJFriendRequest @ 0xa2bf98
// > ??> @ 0x15434d0
//
// 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 12:59:43 +0000
//
__int64 __fastcall FriendRequestPopup::onRemove(FriendRequestPopup *this, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
GameLevelManager *v4; // x0
int v5; // w0
size_t v6; // x21
const char *v7; // x1
char *v8; // x3
__int64 v9; // x0
char v10; // w1
GameLevelManager *v12; // x0
__int64 v13; // [xsp+40h] [xbp+40h] BYREF
__int64 v14; // [xsp+48h] [xbp+48h]
void *v15; // [xsp+50h] [xbp+50h]
v3 = (GameLevelManager *)*((unsigned __int8 *)this + 689);
if ( (_DWORD)v3 )
{
v4 = (GameLevelManager *)GameLevelManager::sharedState(v3);
v5 = (unsigned __int8)GameLevelManager::deleteSentFriendRequest(
v4,
*(unsigned int *)(*((_QWORD *)this + 87) + 320LL));
}
else
{
v12 = (GameLevelManager *)GameLevelManager::sharedState(v3);
v5 = (unsigned __int8)GameLevelManager::deleteFriendRequests(
v12,
*(unsigned int *)(*((_QWORD *)this + 87) + 320LL),
nullptr,
0);
}
if ( v5 )
{
if ( *((_BYTE *)this + 689) )
{
v6 = 26;
v8 = (char *)operator new(0x20u);
v15 = v8;
v14 = 26;
v13 = 33;
v7 = "Removing Friend Request...";
}
else
{
v13 = 38;
v14 = 0;
v6 = 19;
v15 = nullptr;
v7 = "Ignoring Request...";
v8 = (char *)&v13 + 1;
}
*((_BYTE *)memcpy(v8, v7, v6) + v6) = 0;
v9 = UploadActionPopup::create((__int64)this + 672, (char *)&v13);
v10 = v13;
*((_QWORD *)this + 90) = v9;
if ( (v10 & 1) != 0 )
{
operator delete(v15);
v9 = *((_QWORD *)this + 90);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 1312LL))(v9);
}
return _stack_chk_guard;
}