//
// ssl_init_wbio_buffer from 0x7996c0 to 0x79975c (156 bytes)
//
// 2 xrefs:
// > sub_79ED8C @ 0x79f34c
// > ??> @ 0x5c15c
//
// 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
//
int __fastcall ssl_init_wbio_buffer(int a1)
{
int v1; // r3
int v4; // r0
int v5; // r0
int v6; // r6
int v7; // r0
if ( *(_DWORD *)(a1 + 16) )
return 1;
v4 = BIO_f_buffer();
v5 = BIO_new(v4);
v6 = v5;
if ( v5 && BIO_int_ctrl(v5, 117, 1, 0) )
{
*(_DWORD *)(a1 + 16) = v6;
v7 = BIO_push(v6, *(_DWORD *)(a1 + 12));
v1 = 1;
*(_DWORD *)(a1 + 12) = v7;
}
else
{
BIO_free(v6);
ERR_put_error(20, 184, 7, "ssl/ssl_lib.c", 3311);
return 0;
}
return v1;
}