//
// GameLevelManager::onUploadFriendRequestCompleted from 0x4c2478 to 0x4c2562 (234 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4dab2a
//
// 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 ***__fastcall GameLevelManager::onUploadFriendRequestCompleted(
GameLevelManager *a1,
unsigned __int8 *a2,
char *a3))(_DWORD, int, int)
{
cocos2d::CCDictionary *v5; // r8
char v6; // r1
const char *v7; // r4
size_t v8; // r0
int SplitIntFromKey; // r0
int v10; // r8
_BOOL4 v11; // r9
int v12; // r0
int (__fastcall ***result)(_DWORD, int, int); // r0
int v14; // r0
int v15; // r1
int v16; // r0
int v17; // [sp+0h] [bp-14h] BYREF
int v18; // [sp+4h] [bp-10h]
int v19; // [sp+8h] [bp-Ch]
v5 = *((cocos2d::CCDictionary **)a1 + 187);
v17 = 0;
v6 = *a3;
v18 = 0;
v19 = 0;
if ( (v6 & 1) != 0 )
v7 = *((const char **)a3 + 2);
else
v7 = a3 + 1;
v8 = strlen(v7);
std::string::__init(&v17, v7, v8);
cocos2d::CCDictionary::removeObjectForKey(v5);
std::string::~string((int)&v17);
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(a1, v7, 1u);
v17 = 0;
v18 = 0;
v19 = 0;
v10 = SplitIntFromKey;
std::string::__init(&v17, "-1", 2u);
v11 = sub_4A9CC4(a2, (unsigned __int8 *)&v17);
std::string::~string((int)&v17);
if ( v11 )
{
v12 = *((_DWORD *)a1 + 222);
if ( v12 )
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)v12 + 4))(v12, v10, 35);
return (int (__fastcall ***)(_DWORD, int, int))GameLevelManager::resetTimerForKey(a1, v7);
}
else
{
v14 = GameLevelManager::userInfoForAccountID((cocos2d::CCDictionary **)a1, v10);
v15 = v14;
if ( v14 )
{
*(_DWORD *)(v14 + 520) = 4;
v16 = *((_DWORD *)a1 + 221);
if ( v16 )
(*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 8))(v16, v15);
}
result = *((int (__fastcall ****)(_DWORD, int, int))a1 + 222);
if ( result )
return (int (__fastcall ***)(_DWORD, int, int))(**result)(result, v10, 35);
}
return result;
}