//
// sub_100457EB4 from 0x100457eb4 to 0x100457f94 (224 bytes)
//
// 1 xrefs:
// > ??> @ 0x100827810
//
// 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_100457EB4(__int64 a1, _BYTE *a2)
{
int v4; // w8
unsigned int v5; // w9
__int64 v7; // x0
int v8; // w8
if ( !a2 )
return 31;
v4 = *(_DWORD *)(a1 + 60);
if ( (v4 & 0x10) != 0 )
goto LABEL_6;
v5 = *(_DWORD *)(a1 + 768);
if ( v5 != -1 )
{
if ( (v4 & 0x10000) == 0 && *(_DWORD *)(*(_QWORD *)(a1 + 8) + 69864LL) < v5 )
goto LABEL_6;
goto LABEL_17;
}
v7 = *(_QWORD *)(a1 + 736);
if ( v7 || (v7 = *(_QWORD *)(a1 + 728)) != 0 )
{
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v7 + 48LL))(v7, a2);
goto LABEL_11;
}
if ( !*(_QWORD *)(a1 + 656) )
{
LABEL_6:
*a2 = 1;
return 0;
}
if ( !*(_QWORD *)(a1 + 40) )
{
LABEL_17:
*a2 = 0;
goto LABEL_18;
}
sub_1004A0884(a1 + 112, a2);
LABEL_11:
v8 = (unsigned __int8)*a2;
*a2 = v8 ^ 1;
if ( !v8 )
return 0;
v4 = *(_DWORD *)(a1 + 60);
LABEL_18:
*(_DWORD *)(a1 + 60) = v4 & 0xFFFFFFAF;
return 0;
}