//
// GameLevelManager::onAcceptFriendRequestCompleted from 0x3c2be4 to 0x3c2cc4 (224 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x3d7300
//
// 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 __fastcall GameLevelManager::onAcceptFriendRequestCompleted(GameLevelManager *a1, int a2, char **a3, int a4)
{
const char *v4; // r7
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // r8
int SplitIntFromKey; // r8
int v9; // r7
_BOOL4 v10; // r9
UploadActionDelegate *m_uploadActionDelegate; // r0
GJUserScore *v12; // r0
GJUserScore *v13; // r1
UserInfoDelegate *m_userInfoDelegate; // r0
UploadActionDelegate *v15; // r0
_DWORD v18[2]; // [sp+8h] [bp-8h] BYREF
v18[0] = a3;
v18[1] = a4;
v4 = *a3;
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
sub_776584((int)v18, *a3);
cocos2d::CCDictionary::removeObjectForKey(m_friendReqAndUserBlocks);
sub_774008(v18);
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(a1, v4, 1);
v9 = GameLevelManager::getSplitIntFromKey(a1, v4, 2);
sub_776584((int)v18, "-1");
v10 = sub_3BE0D8(a2, (int)v18);
sub_774008(v18);
if ( v10 )
{
m_uploadActionDelegate = a1->m_uploadActionDelegate;
if ( m_uploadActionDelegate )
((void (__fastcall *)(UploadActionDelegate *, int, int, void (__fastcall *)(UploadActionDelegate *__hidden, int, int), GameLevelManager *, int))m_uploadActionDelegate->uploadActionFailed)(
m_uploadActionDelegate,
v9,
31,
m_uploadActionDelegate->uploadActionFailed,
a1,
a2);
}
else
{
v12 = GameLevelManager::userInfoForAccountID(a1, SplitIntFromKey);
v13 = v12;
if ( v12 )
{
v12->m_friendReqStatus = 1;
m_userInfoDelegate = a1->m_userInfoDelegate;
if ( m_userInfoDelegate )
m_userInfoDelegate->userInfoChanged(m_userInfoDelegate, v13);
}
v15 = a1->m_uploadActionDelegate;
if ( v15 )
((void (__fastcall *)(UploadActionDelegate *, int, int, void (__fastcall *)(UploadActionDelegate *__hidden, int, int), GameLevelManager *, int))v15->uploadActionFinished)(
v15,
v9,
31,
v15->uploadActionFinished,
a1,
a2);
GameLevelManager::friendRequestWasRemoved(a1, SplitIntFromKey, 0);
GameLevelManager::resetStoredUserList(a1, (UserListType)0);
}
}