//
// sub_C063BC from 0xc063bc to 0xc06458 (156 bytes)
//
// 1 xrefs:
// > jpeg_stdio_dest @ 0xc06490
//
// 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_C063BC(void (__fastcall ***a1)(_QWORD))
{
void (__fastcall **v2)(_QWORD); // x19
size_t v3; // x20
__int64 result; // x0
__int64 (__fastcall *v5)(_QWORD); // x2
void (__fastcall *v6)(_QWORD); // x2
v2 = a1[5];
v3 = 4096LL - (_QWORD)v2[1];
if ( v3 && fwrite(v2[6], 1u, v3, (FILE *)v2[5]) != v3 )
{
v6 = **a1;
*((_DWORD *)*a1 + 10) = 38;
v6(a1);
}
fflush((FILE *)v2[5]);
result = ferror((FILE *)v2[5]);
if ( (_DWORD)result )
{
v5 = (__int64 (__fastcall *)(_QWORD))**a1;
*((_DWORD *)*a1 + 10) = 38;
return v5(a1);
}
return result;
}