//
// ssl_add_serverhello_renegotiate_ext from 0xfda1d0 to 0xfda28c (188 bytes)
//
// 3 xrefs:
// > ssl_add_serverhello_tlsext @ 0xfd4a88
// > ssl_add_serverhello_tlsext @ 0xfd4b00
// > ??> @ 0x89038
//
// 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:34 +0000
//
__int64 __fastcall ssl_add_serverhello_renegotiate_ext(__int64 a1, _BYTE *a2, _DWORD *a3, int a4)
{
__int64 v6; // x0
int v7; // w5
char *v8; // x0
if ( !a2 )
goto LABEL_4;
v6 = *(_QWORD *)(a1 + 144);
v7 = *(unsigned __int8 *)(v6 + 896);
if ( v7 + *(unsigned __int8 *)(v6 + 961) < a4 )
{
*a2 = v7 + *(_BYTE *)(v6 + 961);
v8 = (char *)memcpy(
a2 + 1,
(const void *)(*(_QWORD *)(a1 + 144) + 832LL),
*(unsigned __int8 *)(*(_QWORD *)(a1 + 144) + 896LL));
memcpy(
&v8[*(unsigned __int8 *)(*(_QWORD *)(a1 + 144) + 896LL)],
(const void *)(*(_QWORD *)(a1 + 144) + 897LL),
*(unsigned __int8 *)(*(_QWORD *)(a1 + 144) + 961LL));
LABEL_4:
*a3 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 144) + 896LL) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 144) + 961LL) + 1;
return 1;
}
ERR_put_error(20, 299, 335, "ssl/t1_reneg.c", 84);
return 0;
}