//
// FRequestProfilePage::onDeleteSelected from 0xa4d09c to 0xa4d304 (616 bytes)
//
// 3 xrefs:
// > ??> @ 0x104ba8
// > FRequestProfilePage::init @ 0xa4e8ac
// > ??> @ 0x1547f78
//
// 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:03 +0000
//
__int64 __fastcall FRequestProfilePage::onDeleteSelected(FRequestProfilePage *this, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
const char *v4; // x1
__int64 StoredOnlineLevels; // x0
int *v6; // x0
unsigned int v7; // w1
unsigned __int64 v8; // x0
unsigned __int64 v9; // x2
ButtonSprite **v10; // x19
__int64 v12[2]; // [xsp+38h] [xbp+38h] BYREF
void *v13; // [xsp+48h] [xbp+48h]
__int64 v14; // [xsp+50h] [xbp+50h] BYREF
__int64 v15; // [xsp+58h] [xbp+58h]
void *v16; // [xsp+60h] [xbp+60h]
v3 = (GameLevelManager *)GameLevelManager::sharedState(_stack_chk_guard);
v4 = (char *)this + 713;
if ( (*((_BYTE *)this + 712) & 1) != 0 )
v4 = *((const char **)this + 91);
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v3, v4);
if ( StoredOnlineLevels )
{
v6 = *(int **)(StoredOnlineLevels + 56);
v7 = *v6;
if ( *v6 )
{
v8 = *((_QWORD *)v6 + 2);
v9 = v8 + 8LL * v7 - 8;
if ( v8 <= v9 )
{
while ( *(_QWORD *)v8 )
{
if ( *(_BYTE *)(*(_QWORD *)v8 + 725LL) )
{
if ( *((_BYTE *)this + 704) )
{
v12[0] = 0;
v12[1] = 0;
v13 = nullptr;
std::string::__init(v12, "Are you sure you want to delete the selected requests?", 0x46u);
v10 = (ButtonSprite **)FLAlertLayer::create(
(__int64)this + 664,
(cocos2d::CCLabelBMFont *)"Delete",
(char *)v12,
(ButtonSprite *)"Back",
(ButtonSprite *)"Delete",
0,
380.0,
0.0,
1.0);
if ( (v12[0] & 1) != 0 )
operator delete(v13);
}
else
{
v14 = 0;
v15 = 0;
v16 = nullptr;
std::string::__init(
&v14,
"Ignore the selected requests?\n"
"They won't be notified.\n"
"Change your mind under Ignored.",
0x65u);
v10 = (ButtonSprite **)FLAlertLayer::create(
(__int64)this + 664,
(cocos2d::CCLabelBMFont *)"Ignore",
(char *)&v14,
(ButtonSprite *)"Back",
(ButtonSprite *)"Ignore",
0,
380.0,
0.0,
1.0);
if ( (v14 & 1) != 0 )
operator delete(v16);
}
ButtonSprite::updateBGImage(v10[77], "GJ_button_06.png");
(*((void (__fastcall **)(ButtonSprite **, __int64))*v10 + 9))(v10, 3);
goto LABEL_11;
}
v8 += 8LL;
if ( v9 < v8 )
break;
}
}
}
}
v14 = 0;
v15 = 0;
v16 = nullptr;
std::string::__init(&v14, "No requests selected.", 0x15u);
v10 = (ButtonSprite **)FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"Nothing here...",
(char *)&v14,
(ButtonSprite *)"OK",
nullptr);
if ( (v14 & 1) != 0 )
operator delete(v16);
LABEL_11:
(*((void (__fastcall **)(ButtonSprite **))*v10 + 164))(v10);
return _stack_chk_guard;
}