//
// sub_D787DC from 0xd787dc to 0xd78888 (172 bytes)
//
// 1 xrefs:
// > ??> @ 0x1122430
//
// 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_D787DC(__int64 a1, void *ptr, int a3)
{
unsigned int v4; // w20
unsigned int *v6; // x0
if ( !ptr || !*(_DWORD *)(a1 + 24) )
return 0;
v4 = fread(ptr, 1u, a3, *(FILE **)(a1 + 48));
if ( ferror(*(FILE **)(a1 + 48)) )
{
v6 = (unsigned int *)__errno();
v4 = -1;
ERR_put_error(2, 11, *v6, "crypto/bio/bss_file.c", 154);
ERR_put_error(32, 130, 2, "crypto/bio/bss_file.c", 155);
}
return v4;
}