//
// FRequestProfilePage::onDeleteSelected from 0x100790a60 to 0x100790c13 (435 bytes)
//
// 1 xrefs:
// > FRequestProfilePage::init @ 0x100790304
//
// 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
//
void __fastcall FRequestProfilePage::onDeleteSelected(FRequestProfilePage *a1, cocos2d::CCObject *a2)
{
GameLevelManager *v2; // rax
cocos2d::CCArray *StoredOnlineLevels; // rax
cocos2d::ccArray *data; // rax
__int64 num; // rcx
unsigned __int64 arr; // rax
unsigned __int64 v7; // rcx
ButtonSprite **v8; // rbx
__int128 v9; // [rsp+0h] [rbp-40h] BYREF
void *v10; // [rsp+10h] [rbp-30h]
__int128 v11[2]; // [rsp+18h] [rbp-28h] BYREF
v2 = GameLevelManager::sharedState();
if ( (a1->m_key.m_data.m_short.sizex2 & 1) != 0 )
{
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v2, a1->m_key.m_data.m_long.longStorage);
if ( !StoredOnlineLevels )
goto LABEL_10;
}
else
{
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v2, a1->m_key.m_data.m_short.shortStorage.__elems_);
if ( !StoredOnlineLevels )
goto LABEL_10;
}
data = StoredOnlineLevels->data;
num = data->num;
if ( data->num )
{
arr = (unsigned __int64)data->arr;
v7 = arr + 8 * num - 8;
while ( *(_QWORD *)arr )
{
if ( *(_BYTE *)(*(_QWORD *)arr + 689LL) )
{
v10 = operator new(0x48u);
*(_QWORD *)&v9 = 73;
*((_QWORD *)&v9 + 1) = 70;
strcpy((char *)v10, "Are you sure you want to delete the selected requests?");
v8 = (ButtonSprite **)FLAlertLayer::create(
(int)a1 + 632,
(int)"Delete",
&v9,
(int)"Back",
(int)"Delete",
0,
380.0,
0.0,
1.0);
if ( (v9 & 1) != 0 )
operator delete(v10);
ButtonSprite::updateBGImage(v8[75], "GJ_button_06.png");
(*(void (__fastcall **)(ButtonSprite **, __int64))&(*v8)->m_fVertexZ)(v8, 3);
goto LABEL_15;
}
arr += 8LL;
if ( arr > v7 )
break;
}
}
LABEL_10:
strcpy((char *)v11, "*No requests selected.");
v8 = (ButtonSprite **)sub_10049B0F0(0, (__int64)"Nothing here...", v11, (__int64)"OK", 0, 5.56111701593374e180);
if ( (v11[0] & 1) != 0 )
operator delete(*(void **)&v11[1]);
LABEL_15:
(*(void (__fastcall **)(ButtonSprite **))&(*v8)[1].m_fTextureTop)(v8);
}