//
// dtls_process_hello_verify from 0x9b5730 to 0x9b57ec (188 bytes)
//
// 2 xrefs:
// > ossl_statem_client_process_message @ 0x9b8eb8
// > ??> @ 0x76a4c
//
// 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:06:59 +0000
//
int __fastcall dtls_process_hello_verify(int a1, int *a2)
{
unsigned int v2; // r3
int v4; // r0
size_t v6; // r5
size_t v7; // r3
char *v8; // r0
v2 = a2[1];
if ( v2 <= 1
|| (v4 = *a2, *a2 += 2, a2[1] = v2 - 2, v2 == 2)
|| (v6 = *(unsigned __int8 *)(v4 + 2), v7 = v2 - 3, v8 = (char *)(v4 + 3), v6 > v7) )
{
ERR_put_error(20, 386, 159, "ssl/statem/statem_clnt.c", 883);
ssl3_send_alert((_DWORD *)a1, 2, 50);
ossl_statem_set_error(a1);
return 0;
}
else
{
*a2 = (int)&v8[v6];
a2[1] = v7 - v6;
memcpy(*(void **)(a1 + 108), v8, v6);
*(_DWORD *)(*(_DWORD *)(a1 + 108) + 256) = v6;
return 1;
}
}