//
// ssl_init_wbio_buffer from 0xd42174 to 0xd42210 (156 bytes)
//
// 2 xrefs:
// > sub_D47644 @ 0xd47c3c
// > ??> @ 0x8c238
//
// 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 ssl_init_wbio_buffer(__int64 a1)
{
unsigned int v1; // w21
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x22
__int64 v7; // x1
v1 = 1;
if ( !*(_QWORD *)(a1 + 32) )
{
v4 = BIO_f_buffer();
v5 = BIO_new(v4);
v6 = v5;
if ( v5 && BIO_int_ctrl(v5, 117, 1, 0) )
{
v7 = *(_QWORD *)(a1 + 24);
*(_QWORD *)(a1 + 32) = v6;
*(_QWORD *)(a1 + 24) = BIO_push(v6, v7);
}
else
{
v1 = 0;
BIO_free(v6);
ERR_put_error(20, 184, 7, "ssl/ssl_lib.c", 3311);
}
}
return v1;
}