//
// sub_100579760 from 0x100579760 to 0x10057980c (172 bytes)
//
// 2 xrefs:
// > ??> @ 0x10082e9b0
// > ??> @ 0x10082ea30
//
// 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_100579760(__int64 a1, char a2)
{
__int64 v3; // x8
if ( (a2 & 1) == 0 )
{
v3 = *(_QWORD *)(a1 + 1424);
if ( v3 )
{
if ( *(_BYTE *)(v3 + 748) && !(unsigned int)sub_10057A8EC(a1 + 1336, "%s", "QUIT") )
{
*(_DWORD *)(a1 + 1448) = 12;
while ( !(unsigned int)sub_10057A59C(a1 + 1336, 1) && *(_DWORD *)(a1 + 1448) )
;
}
}
}
sub_10057AC90(a1 + 1336);
sub_10057FDE0(a1, *(unsigned int *)(a1 + 1484));
off_10085DEB8(*(void **)(a1 + 1456));
*(_QWORD *)(a1 + 1456) = 0;
return 0;
}