//
// GameLevelManager::friendRequestWasRemoved from 0x3c2b14 to 0x3c2be0 (204 bytes)
//
// 3 xrefs:
// > GameLevelManager::onAcceptFriendRequestCompleted @ 0x3c2c9a
// > GameLevelManager::onBlockUserCompleted @ 0x3c2d76
// > GameLevelManager::onDeleteFriendRequestCompleted @ 0x3c2f24
//
// 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 GameLevelManager::friendRequestWasRemoved(GameLevelManager *a1, int a2, bool a3)
{
int v6; // r8
char *FriendRequestKey; // r9
cocos2d::CCArray *StoredOnlineLevels; // r4
int v9; // r3
unsigned int i; // r6
int v11; // r6
FriendRequestDelegate *m_friendRequestDelegate; // r0
cocos2d::CCDictionary *m_storedLevels; // [sp+4h] [bp-18h]
_BYTE v14[4]; // [sp+10h] [bp-Ch] BYREF
v6 = 0;
do
{
FriendRequestKey = (char *)GameLevelManager::getFriendRequestKey(a1, a3, v6);
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(a1, FriendRequestKey);
if ( StoredOnlineLevels )
{
for ( i = 0; i < cocos2d::CCArray::count(StoredOnlineLevels); ++i )
{
if ( *(_DWORD *)(cocos2d::CCArray::objectAtIndex(StoredOnlineLevels, i) + 280) == a2 )
{
cocos2d::CCArray::removeObjectAtIndex(StoredOnlineLevels, i, 1);
v9 = 1;
goto LABEL_8;
}
}
v9 = 0;
v11 = 1;
}
else
{
v9 = 0;
LABEL_8:
v11 = 0;
}
++v6;
if ( v9 )
{
m_friendRequestDelegate = a1->m_friendRequestDelegate;
if ( m_friendRequestDelegate )
{
m_friendRequestDelegate->loadFRequestsFinished(
m_friendRequestDelegate,
StoredOnlineLevels,
(const unsigned __int8 *)FriendRequestKey);
if ( !cocos2d::CCArray::count(StoredOnlineLevels) )
{
m_storedLevels = a1->m_storedLevels;
sub_776584((int)v14, FriendRequestKey);
cocos2d::CCDictionary::removeObjectForKey(m_storedLevels);
sub_774008(v14);
}
}
}
}
while ( v11 );
}