//
// ssl_parse_clienthello_renegotiate_ext from 0x9c9b98 to 0x9c9ca0 (264 bytes)
//
// 2 xrefs:
// > sub_9C703C @ 0x9c74f4
// > ??> @ 0x773dc
//
// 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:07:08 +0000
//
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;
}
}