//
// ssl_parse_clienthello_tlsext from 0x7b2fc8 to 0x7b30e4 (284 bytes)
//
// 2 xrefs:
// > tls_process_client_hello @ 0x7a91f4
// > ??> @ 0x5d51c
//
// 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_tlsext(_DWORD *a1, unsigned __int8 **a2)
{
int *v4; // r0
int v5; // r3
int (__fastcall *v6)(_DWORD *, int *, _DWORD); // r12
int v7; // r0
int v9; // [sp+8h] [bp-8h] BYREF
int v10; // [sp+Ch] [bp-4h] BYREF
v4 = (int *)(a1[50] + 216);
v9 = -1;
custom_ext_init(v4);
if ( sub_7B2438(a1, a2, &v9) <= 0 )
{
ssl3_send_alert(a1, 2, v9);
return 0;
}
else
{
v5 = a1[69];
v10 = 112;
if ( !v5 || (v6 = *(int (__fastcall **)(_DWORD *, int *, _DWORD))(v5 + 280)) == nullptr )
{
v5 = a1[111];
if ( !v5 )
goto LABEL_11;
v6 = *(int (__fastcall **)(_DWORD *, int *, _DWORD))(v5 + 280);
if ( !v6 )
goto LABEL_11;
}
v7 = v6(a1, &v10, *(_DWORD *)(v5 + 284));
if ( v7 != 2 )
{
if ( v7 != 3 )
{
if ( v7 == 1 )
ssl3_send_alert(a1, 1, v10);
return 1;
}
LABEL_11:
a1[88] = 0;
return 1;
}
ssl3_send_alert(a1, 2, v10);
ERR_put_error(20, 302, 226, "ssl/t1_lib.c", 2371);
return 0;
}
}