//
// SSL_set_wfd from 0xfbdc40 to 0xfbdd18 (216 bytes)
//
// 1 xrefs:
// > ??> @ 0xb1940
//
// 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:19 +0000
//
__int64 __fastcall SSL_set_wfd(__int64 a1, unsigned int a2)
{
__int64 rbio; // x19
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x19
rbio = SSL_get_rbio(a1);
if ( rbio && (unsigned int)BIO_method_type() == 1285 && a2 == (unsigned int)BIO_ctrl(rbio, 105, 0, 0) )
{
BIO_up_ref(rbio);
SSL_set0_wbio(a1, rbio);
return 1;
}
else
{
v5 = BIO_s_socket();
v6 = BIO_new(v5);
v7 = v6;
if ( v6 )
{
BIO_int_ctrl(v6, 104, 0, a2);
SSL_set0_wbio(a1, v7);
return 1;
}
else
{
ERR_put_error(20, 196, 7, "ssl/ssl_lib.c", 1180);
return 0;
}
}
}