//
// sub_885878 from 0x885878 to 0x8858c8 (80 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:03:13 +0000
//
int __fastcall sub_885878(_DWORD *a1)
{
int v2; // r4
int v3; // r3
int result; // r0
v2 = a1[6];
v3 = *(_DWORD *)(v2 + 4);
if ( v3 != 4096 && fwrite(*(const void **)(v2 + 24), 1u, 4096 - v3, *(FILE **)(v2 + 20)) != 4096 - v3 )
{
*(_DWORD *)(*a1 + 20) = 38;
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
fflush(*(FILE **)(v2 + 20));
result = ferror(*(FILE **)(v2 + 20));
if ( result )
{
*(_DWORD *)(*a1 + 20) = 38;
return (*(int (__fastcall **)(_DWORD *))*a1)(a1);
}
return result;
}