//
// GameLevelManager::storedFriendForAccountID from 0x1000cb2a4 to 0x1000cb318 (116 bytes)
//
// 1 xrefs:
// > GJCompactUserCell::buildUserRow @ 0x100139578
//
// This function is hookable on this platform (idp: arm, 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 10:58:51 +0000
//
__int64 __fastcall GameLevelManager::storedFriendForAccountID(__int64 a1, int a2)
{
__int64 StoredUserList; // x8
__int64 result; // x0
unsigned int *v5; // x8
__int64 v6; // x9
__int64 *v7; // x8
unsigned __int64 v8; // x9
StoredUserList = GameLevelManager::getStoredUserList(a1, 0);
result = 0;
if ( a2 >= 1 && StoredUserList )
{
v5 = *(unsigned int **)(StoredUserList + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v7 = *((__int64 **)v5 + 2);
v8 = (unsigned __int64)&v7[v6 - 1];
while ( 1 )
{
result = *v7;
if ( !*v7 || *(_DWORD *)(result + 376) == a2 )
break;
if ( (unsigned __int64)++v7 > v8 )
return 0;
}
}
else
{
return 0;
}
}
return result;
}