//
// GameManager::isIconLoaded from 0x10036a3e0 to 0x10036a4b1 (209 bytes)
//
// 2 xrefs:
// > SimplePlayer::asyncLoadIcon @ 0x100359bff
// > GJItemIcon::init @ 0x10035a811
//
// 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:28:59 +0000
//
bool __fastcall GameManager::isIconLoaded(__int64 a1, int a2, int a3)
{
__int64 v3; // rax
int v4; // r15d
_QWORD *v5; // r12
__int64 *v6; // r14
int v7; // eax
__int64 *v8; // r13
__int64 v9; // rax
v3 = *(_QWORD *)(a1 + 1168);
v4 = a2 + *(_DWORD *)(*(_QWORD *)(a1 + 1232) + 4LL * a3) - 1;
if ( v3 )
{
while ( 1 )
{
while ( 1 )
{
v6 = (__int64 *)v3;
v7 = *(_DWORD *)(v3 + 28);
if ( v4 >= v7 )
break;
v3 = *v6;
v5 = v6;
if ( !*v6 )
goto LABEL_8;
}
if ( v4 <= v7 )
break;
v3 = v6[1];
if ( !v3 )
{
v5 = v6 + 1;
goto LABEL_8;
}
}
}
else
{
v5 = (_QWORD *)(a1 + 1168);
v6 = (__int64 *)(a1 + 1168);
LABEL_8:
v8 = v6;
v6 = (__int64 *)operator new(0x28u);
*((_DWORD *)v6 + 7) = v4;
*((_DWORD *)v6 + 8) = 0;
*(_OWORD *)v6 = 0;
v6[2] = (__int64)v8;
*v5 = v6;
v9 = **(_QWORD **)(a1 + 1160);
if ( v9 )
*(_QWORD *)(a1 + 1160) = v9;
sub_10001B680(*(__int64 **)(a1 + 1168), v6);
++*(_QWORD *)(a1 + 1176);
}
return *((_DWORD *)v6 + 8) > 0;
}