//
// sub_D7877C from 0xd7877c to 0xd787dc (96 bytes)
//
// 1 xrefs:
// > ??> @ 0x1122458
//
// 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_D7877C(__int64 result)
{
__int64 v1; // x19
int v2; // w1
FILE *v3; // x0
v1 = result;
if ( result )
{
v2 = *(_DWORD *)(result + 28);
result = 1;
if ( v2 )
{
if ( *(_DWORD *)(v1 + 24) )
{
v3 = *(FILE **)(v1 + 48);
if ( v3 )
{
fclose(v3);
*(_QWORD *)(v1 + 48) = 0;
*(_DWORD *)(v1 + 32) = 0;
}
}
*(_DWORD *)(v1 + 24) = 0;
return 1;
}
}
return result;
}