//
// ssl_free_wbio_buffer from 0x799764 to 0x799798 (52 bytes)
//
// 4 xrefs:
// > ssl3_clear @ 0x78e304
// > SSL_free @ 0x799f70
// > tls_finish_handshake @ 0x7a688c
// > ??> @ 0x5acfc
//
// 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_free_wbio_buffer(int result)
{
int v1; // r4
if ( *(_DWORD *)(result + 16) )
{
v1 = result;
*(_DWORD *)(result + 12) = BIO_pop(*(_DWORD *)(result + 12));
result = BIO_free(*(_DWORD *)(v1 + 16));
*(_DWORD *)(v1 + 16) = 0;
}
return result;
}