//
// dtls_process_hello_verify from 0xd4919c to 0xd49260 (196 bytes)
//
// 2 xrefs:
// > ossl_statem_client_process_message @ 0xd4c2d4
// > ??> @ 0x36438
//
// 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
//
__int64 __fastcall dtls_process_hello_verify(__int64 a1, __int64 *a2)
{
unsigned __int64 v3; // x2
__int64 v5; // x1
int v7; // w20
char *v8; // x1
v3 = a2[1];
if ( v3 <= 1
|| (v5 = *a2, a2[1] = v3 - 2, *a2 = v5 + 2, v3 == 2)
|| (v7 = *(unsigned __int8 *)(v5 + 2), v8 = (char *)(v5 + 3), v3 - 3 < (unsigned __int8)v7) )
{
ERR_put_error(20, 386, 159, "ssl/statem/statem_clnt.c", 883);
ssl3_send_alert(a1, 2, 0x32u);
ossl_statem_set_error(a1);
return 0;
}
else
{
*a2 = (__int64)&v8[(unsigned __int8)v7];
a2[1] = v3 - 3 - (unsigned __int8)v7;
memcpy(*(void **)(a1 + 152), v8, (unsigned __int8)v7);
*(_DWORD *)(*(_QWORD *)(a1 + 152) + 256LL) = v7;
return 1;
}
}