//
// BIO_callback_ctrl from 0xff50b4 to 0xff519c (232 bytes)
//
// 8 xrefs:
// > sub_FAD86C @ 0xfad89c
// > sub_FF3CA4 @ 0xff3cac
// > sub_FF5B30 @ 0xff5c54
// > sub_10DC870 @ 0x10dc894
// > sub_10DD2CC @ 0x10dd2f0
// > sub_10FB7B8 @ 0x10fb7dc
// > sub_10FEA84 @ 0x10feaa8
// > ??> @ 0x678e8
//
// 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_callback_ctrl(__int64 result, unsigned int a2, __int64 a3)
{
__int64 v3; // x19
__int64 (*v5)(void); // x3
__int64 (*v6)(void); // x21
__int64 v7; // x0
__int64 v8; // [xsp+38h] [xbp+38h] BYREF
v8 = a3;
v3 = result;
if ( result )
{
if ( *(_QWORD *)result && (v5 = *(__int64 (**)(void))(*(_QWORD *)result + 72LL)) != nullptr )
{
v6 = *(__int64 (**)(void))(result + 8);
if ( v6 )
{
result = v6();
if ( result > 0 )
{
v7 = (*(__int64 (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v3 + 72LL))(v3, a2, v8);
return ((__int64 (__fastcall *)(__int64, __int64, __int64 *, _QWORD, _QWORD, __int64))v6)(
v3,
134,
&v8,
a2,
0,
v7);
}
}
else
{
return v5();
}
}
else
{
ERR_put_error(32, 131, 121, "crypto/bio/bio_lib.c", 364);
return -2;
}
}
return result;
}