//
// ssl_parse_clienthello_renegotiate_ext from 0x7b4f94 to 0x7b509c (264 bytes)
//
// 2 xrefs:
// > sub_7B2438 @ 0x7b28f0
// > ??> @ 0x5d95c
//
// 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
//
int __fastcall ssl_parse_clienthello_renegotiate_ext(int a1, unsigned __int8 **a2, _DWORD *a3)
{
unsigned __int8 *v3; // r3
unsigned __int8 *v5; // r3
char *v6; // r12
unsigned int v7; // lr
int v9; // r5
size_t v10; // r2
v3 = a2[1];
if ( v3
&& (v5 = v3 - 1, v6 = (char *)(*a2 + 1), v7 = **a2, *a2 = (unsigned __int8 *)v6, a2[1] = v5, v7 <= (unsigned int)v5) )
{
v9 = *(_DWORD *)(a1 + 104);
*a2 = (unsigned __int8 *)&v6[v7];
a2[1] = &v5[-v7];
v10 = *(unsigned __int8 *)(v9 + 764);
if ( v10 == v7 )
{
if ( !memcmp(v6, (const void *)(v9 + 700), v10) )
{
*(_DWORD *)(v9 + 832) = 1;
return 1;
}
else
{
ERR_put_error(20, 300, 337, "ssl/t1_reneg.c", 66);
*a3 = 40;
return 0;
}
}
else
{
ERR_put_error(20, 300, 337, "ssl/t1_reneg.c", 58);
*a3 = 40;
return 0;
}
}
else
{
ERR_put_error(20, 300, 336, "ssl/t1_reneg.c", 50);
*a3 = 47;
return 0;
}
}