//
// sub_10060D2F4 from 0x10060d2f4 to 0x10060d3e4 (240 bytes)
//
// 1 xrefs:
// > ??> @ 0x100864a88
//
// 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_10060D2F4(__int64 a1, __int64 a2, int a3)
{
__int64 v3; // x8
__int64 result; // x0
__int64 v5; // x8
v3 = *(_QWORD *)(a2 + 72);
if ( (v3 & 4) != 0 && (*(_BYTE *)(a2 + 88) & 0x11) == 0 )
return 0;
if ( !a3 )
return ((v3 & 8) == 0 || (*(_BYTE *)(a2 + 96) & 0x40) != 0) && ((v3 & 2) == 0 || (*(_BYTE *)(a2 + 80) & 0xA8) != 0);
if ( (v3 & 2) != 0 && (*(_BYTE *)(a2 + 80) & 4) == 0 )
return 0;
if ( (v3 & 1) != 0 )
{
result = ((unsigned int)v3 >> 4) & 1;
}
else
{
if ( (*(_QWORD *)(a2 + 72) & 0x2040LL) == 0x2040 )
result = 3;
else
result = 4;
if ( (*(_QWORD *)(a2 + 72) & 0x2040LL) != 0x2040 && (v3 & 2) == 0 )
{
if ( (v3 & 8) == 0 )
return 0;
v5 = *(_QWORD *)(a2 + 96);
if ( (v5 & 7) == 0 )
return 0;
goto LABEL_29;
}
}
if ( !(_DWORD)result )
return 0;
if ( (_DWORD)result == 5 )
{
v5 = *(_QWORD *)(a2 + 96);
LABEL_29:
if ( (v5 & 4) != 0 )
return 5;
else
return 0;
}
return result;
}