//
// ssl3_renegotiate_check from 0xfb64ac to 0xfb6534 (136 bytes)
//
// 28 xrefs:
// > dtls1_read_bytes @ 0xfaf3dc
// > ssl3_read_bytes @ 0xfb1734
// > ssl3_write @ 0xfb6568
// > ssl3_read @ 0xfb6678
// > ssl3_peek @ 0xfb6764
// > ??> @ 0x4f1c8
// > ??> @ 0x1536f98
// > ??> @ 0x1537078
// > ??> @ 0x1537158
// > ??> @ 0x1537238
// > ??> @ 0x1537318
// > ??> @ 0x15373f8
// > ??> @ 0x15374d8
// > ??> @ 0x15375b8
// > ??> @ 0x1537698
// > ??> @ 0x1537778
// > ??> @ 0x1537858
// > ??> @ 0x1537938
// > ??> @ 0x1537a18
// > ??> @ 0x1537af8
// > ??> @ 0x1537bd8
// > ??> @ 0x1537cb8
// > ??> @ 0x1537d98
// > ??> @ 0x1537e78
// > ??> @ 0x1537f58
// > ??> @ 0x1538038
// > ??> @ 0x1538118
// > ??> @ 0x15381f8
//
// 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:15 +0000
//
__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;
}