//
// ssl3_setup_read_buffer from 0x99f1dc to 0x99f29c (192 bytes)
//
// 5 xrefs:
// > RECORD_LAYER_set_data @ 0x99d03c
// > ssl3_read_n @ 0x99d54c
// > ssl3_read_bytes @ 0x99ec40
// > ssl3_setup_buffers @ 0x99f3c4
// > ??> @ 0x742cc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:06:47 +0000
//
int __fastcall ssl3_setup_read_buffer(_DWORD *a1)
{
int v1; // r12
unsigned int v2; // r5
int v3; // r6
int v6; // r0
v1 = a1[144];
v2 = 17736;
if ( (*(_DWORD *)(*(_DWORD *)(a1[1] + 100) + 52) & 8) != 0 )
{
v3 = 16720;
v2 = 17744;
}
else
{
v3 = 16712;
}
if ( v1 )
goto LABEL_5;
if ( !ssl_allow_compression() )
v2 = v3;
if ( v2 < a1[145] )
v2 = a1[145];
v6 = CRYPTO_malloc(v2, "ssl/record/ssl3_buffer.c", 63);
if ( v6 )
{
v1 = v6;
a1[144] = v6;
a1[146] = v2;
LABEL_5:
a1[693] = v1;
return 1;
}
ERR_put_error(20, 156, 65, "ssl/record/ssl3_buffer.c", 73);
return 0;
}