//
// GJUserScore::isCurrentUser from 0x10058cdc0 to 0x10058ceb1 (241 bytes)
//
// 4 xrefs:
// > GJScoreCell::loadFromScore @ 0x10022fcbe
// > GJScoreCell::loadFromScore @ 0x10022fd39
// > GJLevelScoreCell::loadFromScore @ 0x100231309
// > CustomListView::setupList @ 0x100235682
//
// 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:25 +0000
//
__int64 __fastcall GJUserScore::isCurrentUser(__int64 a1, __int64 a2)
{
unsigned int v2; // r15d
__int64 v3; // rax
int v4; // ecx
__int64 v5; // rax
__int64 v6; // rax
char v7; // r12
void *v8; // r14
unsigned int v9; // eax
size_t v10; // rax
const void *v11; // rbx
size_t v12; // rdx
char *v13; // rsi
bool v14; // zf
bool v15; // r13
bool v16; // r15
__int128 v18; // [rsp+0h] [rbp-40h] BYREF
void *__s2; // [rsp+10h] [rbp-30h]
v3 = GJAccountManager::sharedState(a1, a2);
v4 = *(_DWORD *)(v3 + 352) - *(_DWORD *)(v3 + 356);
if ( !v4 || (LOBYTE(v2) = 1, v4 != *(_DWORD *)(a1 + 376)) )
{
v5 = GameManager::sharedState();
if ( (*(_BYTE *)(v5 + 608) & 1) != 0 )
{
sub_10001AD30(&v18, *(const void **)(v5 + 624), *(_QWORD *)(v5 + 616));
}
else
{
v6 = v5 + 608;
__s2 = *(void **)(v6 + 16);
v18 = *(_OWORD *)v6;
}
v7 = v18;
v8 = __s2;
v9 = *(unsigned __int8 *)(a1 + 344);
if ( (v9 & 1) != 0 )
{
v10 = *(_QWORD *)(a1 + 352);
v11 = *(const void **)(a1 + 360);
}
else
{
v10 = v9 >> 1;
v11 = (const void *)(a1 + 345);
}
v12 = (unsigned __int8)v18 >> 1;
if ( (v18 & 1) != 0 )
v12 = *((_QWORD *)&v18 + 1);
v13 = (char *)&v18 + 1;
if ( (v18 & 1) != 0 )
v13 = (char *)__s2;
v14 = v12 == v10;
if ( v12 >= v10 )
v12 = v10;
v15 = v14;
v16 = memcmp(v11, v13, v12) == 0;
if ( (v7 & 1) != 0 )
operator delete(v8);
LOBYTE(v2) = v15 && v16;
}
return v2;
}