//
// GameLevelManager::storedFriendForAccountID from 0x10057ce50 to 0x10057cef4 (164 bytes)
//
// 1 xrefs:
// > GJCompactUserCell::buildUserRow @ 0x10023f7d1
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:32:19 +0000
//
__int64 __fastcall GameLevelManager::storedFriendForAccountID(__int64 a1, int a2)
{
__int64 v2; // rdi
__int64 v3; // r14
unsigned int *v4; // rax
__int64 *v5; // rcx
unsigned __int64 v6; // rdx
__int64 result; // rax
char v8; // [rsp+8h] [rbp-28h] BYREF
void *v9[4]; // [rsp+9h] [rbp-27h] BYREF
v2 = *(_QWORD *)(a1 + 1040);
v8 = 22;
strcpy((char *)v9, "get_friends");
v3 = cocos2d::CCDictionary::objectForKey(v2, &v8);
if ( (v8 & 1) != 0 )
operator delete(*(void **)((char *)&v9[1] + 7));
if ( v3 != 0 && a2 > 0 )
{
v4 = *(unsigned int **)(v3 + 56);
if ( *v4 )
{
v5 = *((__int64 **)v4 + 2);
v6 = (unsigned __int64)&v5[*v4 - 1];
do
{
result = *v5;
if ( !*v5 )
break;
if ( *(_DWORD *)(result + 376) == a2 )
return result;
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
}
}
return 0;
}