//
// GameLevelManager::onAcceptFriendRequestCompleted from 0x4c2684 to 0x4c2784 (256 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4dab8a
//
// 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
//
int __fastcall GameLevelManager::onAcceptFriendRequestCompleted(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
int v11; // r5
_BOOL4 v12; // r8
int result; // r0
int v14; // r0
int v15; // r1
int v16; // r0
void (__fastcall ***v17)(_DWORD, int, int); // r0
int v18; // r2
int v19; // r3
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 = v10;
std::string::__init(&v20, "-1", 2u);
v12 = sub_4A9CC4(a2, (unsigned __int8 *)&v20);
std::string::~string((int)&v20);
if ( v12 )
{
result = *((_DWORD *)a1 + 222);
if ( result )
return (*(int (__fastcall **)(int, int, int))(*(_DWORD *)result + 4))(result, v11, 37);
}
else
{
v14 = GameLevelManager::userInfoForAccountID((cocos2d::CCDictionary **)a1, SplitIntFromKey);
v15 = v14;
if ( v14 )
{
*(_DWORD *)(v14 + 520) = 1;
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, v11, 37);
GameLevelManager::friendRequestWasRemoved((cocos2d::CCDictionary **)a1, SplitIntFromKey, nullptr);
return GameLevelManager::resetStoredUserList((int)a1, 0, v18, v19);
}
return result;
}