//
// ssl3_setup_read_buffer from 0xfb1f00 to 0xfb1fd0 (208 bytes)
//
// 5 xrefs:
// > RECORD_LAYER_set_data @ 0xfaff50
// > ssl3_read_n @ 0xfb044c
// > ssl3_read_bytes @ 0xfb1ad8
// > ssl3_setup_buffers @ 0xfb210c
// > ??> @ 0x93088
//
// 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:12 +0000
//
__int64 __fastcall ssl3_setup_read_buffer(_QWORD *a1)
{
__int64 v1; // x1
unsigned __int64 v2; // x19
__int64 v3; // x21
unsigned __int64 v6; // x21
__int64 v7; // x0
v1 = a1[119];
v2 = 17736;
v3 = 16712;
if ( (*(_DWORD *)(*(_QWORD *)(a1[1] + 192LL) + 104LL) & 8) != 0 )
{
v2 = 17744;
v3 = 16720;
}
if ( v1 )
goto LABEL_4;
if ( !(unsigned int)ssl_allow_compression() )
v2 = v3;
v6 = a1[120];
if ( v2 >= v6 )
v6 = v2;
v7 = CRYPTO_malloc(v6, "ssl/record/ssl3_buffer.c", 63);
if ( v7 )
{
a1[119] = v7;
v1 = v7;
a1[121] = v6;
LABEL_4:
a1[539] = v1;
return 1;
}
ERR_put_error(20, 156, 65, "ssl/record/ssl3_buffer.c", 73);
return 0;
}