//
// GameLevelManager::friendRequestWasRemoved from 0x1000a8b78 to 0x1000a8cc8 (336 bytes)
//
// 3 xrefs:
// > GameLevelManager::onDeleteFriendRequestCompleted @ 0x10008d06c
// > GameLevelManager::onAcceptFriendRequestCompleted @ 0x10008d1e0
// > GameLevelManager::onBlockUserCompleted @ 0x10008d558
//
// 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 GameLevelManager::friendRequestWasRemoved(GameLevelManager *a1, int a2, bool a3)
{
_BOOL4 v3; // w20
cocos2d::CCString *v6; // x0
char *CString; // x22
cocos2d::CCArray *StoredOnlineLevels; // x0
cocos2d::CCArray *v9; // x23
int v10; // w26
__int64 v11; // x25
cocos2d::CCString *v12; // x0
FriendRequestDelegate *m_friendRequestDelegate; // x0
cocos2d::CCDictionary *m_storedLevels; // x19
void *__p[2]; // [xsp+18h] [xbp-58h] BYREF
char v16; // [xsp+2Fh] [xbp-41h]
v3 = a3;
v6 = (cocos2d::CCString *)sub_100268F4C("fReq_%i_%i", a3, 0);
CString = (char *)cocos2d::CCString::getCString(v6);
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(a1, CString);
if ( StoredOnlineLevels )
{
v9 = StoredOnlineLevels;
v10 = 0;
while ( !(unsigned int)sub_10024A36C(v9) )
{
LABEL_7:
v12 = (cocos2d::CCString *)sub_100268F4C("fReq_%i_%i", v3, ++v10);
CString = (char *)cocos2d::CCString::getCString(v12);
v9 = GameLevelManager::getStoredOnlineLevels(a1, CString);
if ( !v9 )
return;
}
v11 = 0;
while ( *(_DWORD *)(sub_10024A388(v9, v11) + 376) != a2 )
{
v11 = (unsigned int)(v11 + 1);
if ( (unsigned int)v11 >= (unsigned int)sub_10024A36C(v9) )
goto LABEL_7;
}
sub_10024A44C(v9, v11, 1);
m_friendRequestDelegate = a1->m_friendRequestDelegate;
if ( m_friendRequestDelegate )
{
((void (__fastcall *)(FriendRequestDelegate *, cocos2d::CCArray *, char *))m_friendRequestDelegate->loadFRequestsFinished)(
m_friendRequestDelegate,
v9,
CString);
if ( !(unsigned int)sub_10024A36C(v9) )
{
m_storedLevels = a1->m_storedLevels;
sub_100009900(__p, CString);
cocos2d::CCDictionary::removeObjectForKey_1((int)m_storedLevels, (char *)__p);
if ( v16 < 0 )
operator delete(__p[0]);
}
}
}
}