//
// GameLevelManager::onRemoveFriendCompleted from 0x3c286c to 0x3c2974 (264 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x3d7344
//
// 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
//
cocos2d::CCArray *__fastcall GameLevelManager::onRemoveFriendCompleted(GameLevelManager *a1, int a2, char **a3, int a4)
{
const char *v4; // r7
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // r10
int SplitIntFromKey; // r7
_BOOL4 v9; // r6
cocos2d::CCArray *result; // r0
int (*v11)(void); // r3
GJUserScore *v12; // r0
GJUserScore *v13; // r1
UserInfoDelegate *m_userInfoDelegate; // r0
cocos2d::CCArray *v15; // r4
unsigned int i; // r6
_DWORD v19[2]; // [sp+8h] [bp-8h] BYREF
v19[0] = a3;
v19[1] = a4;
v4 = *a3;
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
sub_776584((int)v19, *a3);
cocos2d::CCDictionary::removeObjectForKey(m_friendReqAndUserBlocks);
sub_774008(v19);
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(a1, v4, 1);
sub_776584((int)v19, "-1");
v9 = sub_3BE0D8(a2, (int)v19);
sub_774008(v19);
result = (cocos2d::CCArray *)a1->m_uploadActionDelegate;
if ( v9 )
{
if ( result )
{
v11 = (int (*)(void))result->~CCArray;
return (cocos2d::CCArray *)v11();
}
}
else
{
if ( result )
((void (__fastcall *)(cocos2d::CCArray *, int, int, cocos2d::CCObject *(__fastcall *)(cocos2d::CCArray *__hidden, cocos2d::CCZone *), GameLevelManager *, int))result->copyWithZone)(
result,
SplitIntFromKey,
33,
result->copyWithZone,
a1,
a2);
v12 = GameLevelManager::userInfoForAccountID(a1, SplitIntFromKey);
v13 = v12;
if ( v12 )
{
v12->m_friendReqStatus = 0;
m_userInfoDelegate = a1->m_userInfoDelegate;
if ( m_userInfoDelegate )
m_userInfoDelegate->userInfoChanged(m_userInfoDelegate, v13);
}
result = GameLevelManager::getStoredUserList(a1, (UserListType)0);
v15 = result;
if ( result )
{
for ( i = 0; ; ++i )
{
result = (cocos2d::CCArray *)cocos2d::CCArray::count(v15);
if ( i >= (unsigned int)result )
break;
if ( *(_DWORD *)(cocos2d::CCArray::objectAtIndex(v15, i) + 280) == SplitIntFromKey )
{
cocos2d::CCArray::removeObjectAtIndex(v15, i, 1);
result = (cocos2d::CCArray *)a1->m_userListDelegate;
if ( !result )
return result;
v11 = (int (*)(void))result->~CCArray_0;
return (cocos2d::CCArray *)v11();
}
}
}
}
return result;
}