//
// sub_77A0A0 from 0x77a0a0 to 0x77a0da (58 bytes)
//
// 4 xrefs:
// > sub_76FC90 @ 0x76fcf4
// > ??> @ 0x76fd2c
// > sub_77160C @ 0x771670
// > ??> @ 0x7716a8
//
// 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
//
int __fastcall sub_77A0A0(int a1)
{
if ( !*(_DWORD *)a1 )
return 0;
if ( *(_BYTE *)(a1 + 4) )
{
*(_DWORD *)_errno() = 0;
while ( fclose(*(FILE **)a1) )
{
if ( *(_DWORD *)_errno() != 4 )
{
*(_DWORD *)a1 = 0;
return 0;
}
}
}
*(_DWORD *)a1 = 0;
return a1;
}