//
// GameLevelManager::storedFriendForAccountID from 0x80953c to 0x8095d0 (148 bytes)
//
// 2 xrefs:
// > GJCompactUserCell::buildUserRow @ 0x74505c
// > ??> @ 0x83440
//
// 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 12:54:46 +0000
//
__int64 __fastcall GameLevelManager::storedFriendForAccountID(GameLevelManager *this, int a2)
{
__int64 StoredUserList; // x0
unsigned int *v4; // x1
unsigned int v5; // w0
__int64 *v6; // x1
__int64 v7; // x3
__int64 result; // x0
char *v9; // x3
__int64 v10; // x2
StoredUserList = GameLevelManager::getStoredUserList((__int64)this, 0);
if ( !StoredUserList )
return 0;
if ( a2 <= 0 )
return 0;
v4 = *(unsigned int **)(StoredUserList + 56);
v5 = *v4;
if ( !*v4 )
return 0;
v6 = *((__int64 **)v4 + 2);
v7 = 8LL * v5 - 8;
result = 0;
v9 = (char *)v6 + v7;
if ( v6 <= (__int64 *)v9 )
{
v10 = *v6;
if ( *v6 )
{
while ( a2 != *(_DWORD *)(v10 + 376) )
{
if ( v9 >= (char *)++v6 )
{
v10 = *v6;
if ( *v6 )
continue;
}
return 0;
}
return v10;
}
}
return result;
}