//
// ssl3_renegotiate_check from 0xd38158 to 0xd381e0 (136 bytes)
//
// 28 xrefs:
// > dtls1_read_bytes @ 0xd31088
// > ssl3_read_bytes @ 0xd333e0
// > ssl3_write @ 0xd38214
// > ssl3_read @ 0xd38324
// > ssl3_peek @ 0xd38410
// > ??> @ 0x35f70
// > ??> @ 0x121f210
// > ??> @ 0x121f2f0
// > ??> @ 0x121f3d0
// > ??> @ 0x121f4b0
// > ??> @ 0x121f590
// > ??> @ 0x121f670
// > ??> @ 0x121f750
// > ??> @ 0x121f830
// > ??> @ 0x121f910
// > ??> @ 0x121f9f0
// > ??> @ 0x121fad0
// > ??> @ 0x121fbb0
// > ??> @ 0x121fc90
// > ??> @ 0x121fd70
// > ??> @ 0x121fe50
// > ??> @ 0x121ff30
// > ??> @ 0x1220010
// > ??> @ 0x12200f0
// > ??> @ 0x12201d0
// > ??> @ 0x12202b0
// > ??> @ 0x1220390
// > ??> @ 0x1220470
//
// 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 ssl3_renegotiate_check(__int64 a1)
{
__int64 v2; // x20
_DWORD *v4; // x1
int v5; // w2
int v6; // w3
if ( !*(_DWORD *)(*(_QWORD *)(a1 + 144) + 252LL) )
return 0;
v2 = a1 + 928;
if ( RECORD_LAYER_read_pending(a1 + 928)
|| (unsigned int)RECORD_LAYER_write_pending(v2)
|| (unsigned int)SSL_in_init(a1) )
{
return 0;
}
ossl_statem_set_renegotiate(a1);
v4 = *(_DWORD **)(a1 + 144);
v5 = v4[64];
v6 = v4[65] + 1;
v4[63] = 0;
v4[65] = v6;
v4[64] = v5 + 1;
return 1;
}