//
// BIO_read from 0xff4aa8 to 0xff4bc0 (280 bytes)
//
// 20 xrefs:
// > ssl3_read_n @ 0xfb02d0
// > DTLSv1_listen @ 0xfdb874
// > DTLSv1_listen @ 0xfdb908
// > DTLSv1_listen @ 0xfdbb84
// > sub_FF4288 @ 0xff4398
// > sub_FF43E8 @ 0xff44a0
// > sub_FF43E8 @ 0xff44f4
// > sub_107D408 @ 0x107d798
// > ASN1_d2i_bio @ 0x1086428
// > ASN1_d2i_bio @ 0x1086520
// > ASN1_item_d2i_bio @ 0x1086894
// > ASN1_item_d2i_bio @ 0x108698c
// > sub_10DC9C8 @ 0x10dcc14
// > sub_10DD5E4 @ 0x10dd624
// > OCSP_REQ_CTX_nbio @ 0x10e18c4
// > SMIME_crlf_copy @ 0x10ef988
// > SMIME_text @ 0x10f0454
// > sub_10FB90C @ 0x10fba50
// > sub_10FEB70 @ 0x10feb94
// > ??> @ 0xc2b60
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:47 +0000
//
__int64 __fastcall BIO_read(__int64 a1, __int64 a2, unsigned int a3)
{
__int64 (*v6)(void); // x20
__int64 result; // x0
int v8; // w5
if ( a1 && *(_QWORD *)a1 && *(_QWORD *)(*(_QWORD *)a1 + 24LL) )
{
v6 = *(__int64 (**)(void))(a1 + 8);
if ( !v6 || (result = v6(), (int)result > 0) )
{
if ( *(_DWORD *)(a1 + 24) )
{
v8 = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 24LL))(a1, a2, a3);
if ( v8 > 0 )
*(_QWORD *)(a1 + 80) += v8;
if ( v6 )
return ((__int64 (__fastcall *)(__int64, __int64, __int64, _QWORD, _QWORD))v6)(a1, 130, a2, a3, 0);
else
return (unsigned int)v8;
}
else
{
ERR_put_error(32, 111, 120, "crypto/bio/bio_lib.c", 193);
return 4294967294LL;
}
}
}
else
{
ERR_put_error(32, 111, 121, "crypto/bio/bio_lib.c", 183);
return 4294967294LL;
}
return result;
}