//
// sub_1005345D0 from 0x1005345d0 to 0x1005346f4 (292 bytes)
//
// 2 xrefs:
// > sub_10051EB5C @ 0x10051f180
// > sub_1005261F4 @ 0x100526430
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1005345D0(_BYTE *a1, int *a2, __int64 a3)
{
int v5; // w0
__int64 v6; // x9
int v8; // w9
int v9; // w10
__int64 v10; // x11
int v11; // w8
if ( !a3 )
return 0;
v5 = sub_1005EB2A0(a3);
if ( dword_10085B91C == v5 )
{
v6 = 0;
}
else
{
v6 = 1;
if ( dword_10085B924 != v5 )
{
v6 = 2;
if ( dword_10085B92C != v5 )
{
v6 = 3;
if ( dword_10085B934 != v5 )
{
v6 = 4;
if ( dword_10085B93C != v5 )
{
v6 = 5;
if ( dword_10085B944 != v5 )
return 0;
}
}
}
}
}
v8 = *((_DWORD *)&unk_10085B8E0 + 2 * v6 + 16);
if ( v8 == -1 )
return 0;
v9 = *a2;
if ( dword_10085B8E4 == *a2 )
{
v10 = 0;
}
else
{
v10 = 1;
if ( dword_10085B8EC != v9 )
{
v10 = 2;
if ( dword_10085B8F4 != v9 )
return 0;
}
}
v11 = *((_DWORD *)&unk_10085B8E0 + 2 * v10 + 2);
if ( v11 == -1 )
return 0;
*a1 = v8;
a1[1] = v11;
return 1;
}