//
// sub_100579698 from 0x100579698 to 0x100579758 (192 bytes)
//
// 2 xrefs:
// > ??> @ 0x10082e988
// > ??> @ 0x10082ea08
//
// 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_100579698(__int64 a1, _BYTE *a2)
{
__int64 v4; // x21
_BYTE *v5; // x22
__int64 result; // x0
int v7; // w8
v4 = a1 + 1336;
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 800) + 124LL) & 1) == 0 )
goto LABEL_5;
v5 = (_BYTE *)(a1 + 1452);
if ( *(_BYTE *)(a1 + 1452) )
goto LABEL_5;
result = sub_100587124(a1, 0, a1 + 1452);
if ( (_DWORD)result )
return result;
if ( *v5 )
{
LABEL_5:
result = sub_10057A59C(v4, 0);
v7 = *(_DWORD *)(a1 + 1448) == 0;
*a2 = v7;
if ( (_DWORD)result )
return result;
}
else
{
v7 = (unsigned __int8)*a2;
}
if ( v7 )
{
if ( **(_DWORD **)(*(_QWORD *)a1 + 536LL) )
sub_100567898(a1, -1, -1, 0, 0, -1, 0);
}
return 0;
}