//
// ossl_statem_server_construct_message from 0x7acd98 to 0x7ace50 (184 bytes)
//
// 4 xrefs:
// > sub_79ED8C @ 0x79ef4c
// > ??> @ 0x5ce8c
// > sub_79ED8C @ 0x79f3cc
// > ??> @ 0xab851c
//
// 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 ossl_statem_server_construct_message(int *a1)
{
int result; // r0
switch ( a1[16] )
{
case 19:
result = tls_construct_hello_request((int)a1);
break;
case 21:
result = dtls_construct_hello_verify_request(a1);
break;
case 22:
result = tls_construct_server_hello(a1);
break;
case 23:
result = tls_construct_server_certificate(a1);
break;
case 24:
result = tls_construct_server_key_exchange(a1);
break;
case 25:
result = tls_construct_certificate_request(a1);
break;
case 26:
result = tls_construct_server_done((int)a1);
break;
case 33:
result = tls_construct_new_session_ticket(a1);
break;
case 34:
result = tls_construct_cert_status((int)a1);
break;
case 35:
if ( (*(_DWORD *)(*(_DWORD *)(a1[1] + 100) + 52) & 8) != 0 )
result = dtls_construct_change_cipher_spec(a1);
else
result = tls_construct_change_cipher_spec(a1);
break;
case 36:
result = tls_construct_finished(a1);
break;
default:
result = 0;
break;
}
return result;
}