//
// GameLevelManager::onDeleteFriendRequestCompleted from 0x4c256c to 0x4c267c (272 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4dab5a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:50:25 +0000
//
cocos2d::CCString *__fastcall GameLevelManager::onDeleteFriendRequestCompleted(
GameLevelManager *a1,
unsigned __int8 *a2,
char *a3)
{
cocos2d::CCDictionary *v5; // r7
char v6; // r1
const char *v7; // r5
size_t v8; // r0
int SplitIntFromKey; // r7
int v10; // r0
const char *v11; // r5
_BOOL4 v12; // r8
cocos2d::CCString *result; // r0
int v14; // r0
int v15; // r1
int v16; // r0
void (__fastcall ***v17)(_DWORD, int, int); // r0
const char *v18; // r1
const char *v19; // r2
int v20; // [sp+0h] [bp-14h] BYREF
int v21; // [sp+4h] [bp-10h]
int v22; // [sp+8h] [bp-Ch]
v5 = *((cocos2d::CCDictionary **)a1 + 187);
v20 = 0;
v6 = *a3;
v21 = 0;
v22 = 0;
if ( (v6 & 1) != 0 )
v7 = *((const char **)a3 + 2);
else
v7 = a3 + 1;
v8 = strlen(v7);
std::string::__init(&v20, v7, v8);
cocos2d::CCDictionary::removeObjectForKey(v5);
std::string::~string((int)&v20);
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(a1, v7, 1u);
v10 = GameLevelManager::getSplitIntFromKey(a1, v7, 2u);
v20 = 0;
v21 = 0;
v22 = 0;
v11 = (const char *)v10;
std::string::__init(&v20, "-1", 2u);
v12 = sub_4A9CC4(a2, (unsigned __int8 *)&v20);
std::string::~string((int)&v20);
if ( v12 )
{
result = *((cocos2d::CCString **)a1 + 222);
if ( result )
return (cocos2d::CCString *)(*(int (__fastcall **)(cocos2d::CCString *, int, int))(*(_DWORD *)result + 4))(
result,
SplitIntFromKey,
36);
}
else
{
v14 = GameLevelManager::userInfoForAccountID((cocos2d::CCDictionary **)a1, SplitIntFromKey);
v15 = v14;
if ( v14 )
{
*(_DWORD *)(v14 + 520) = 0;
v16 = *((_DWORD *)a1 + 221);
if ( v16 )
(*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 8))(v16, v15);
}
v17 = *((void (__fastcall ****)(_DWORD, int, int))a1 + 222);
if ( v17 )
(**v17)(v17, SplitIntFromKey, 36);
if ( SplitIntFromKey == -1 )
{
v18 = v11;
if ( v11 )
v18 = (_BYTE *)(&dword_0 + 1);
return GameLevelManager::invalidateRequests((cocos2d::CCDictionary **)a1, v18, 1);
}
else
{
v19 = v11;
if ( v11 )
v19 = (_BYTE *)(&dword_0 + 1);
return GameLevelManager::friendRequestWasRemoved((cocos2d::CCDictionary **)a1, SplitIntFromKey, v19);
}
}
return result;
}