//
// ossl_statem_client_construct_message from 0x7a4370 to 0x7a43ec (124 bytes)
//
// 4 xrefs:
// > sub_79ED8C @ 0x79ef4c
// > ??> @ 0x5ce0c
// > sub_79ED8C @ 0x79ee84
// > ??> @ 0xab84fc
//
// 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_client_construct_message(int *a1)
{
int result; // r0
switch ( a1[16] )
{
case 12:
result = tls_construct_client_hello((int)a1);
break;
case 13:
result = tls_construct_client_certificate(a1);
break;
case 14:
result = tls_construct_client_key_exchange(a1);
break;
case 15:
result = tls_construct_client_verify((int)a1);
break;
case 16:
if ( (*(_DWORD *)(*(_DWORD *)(a1[1] + 100) + 52) & 8) != 0 )
result = dtls_construct_change_cipher_spec();
else
result = tls_construct_change_cipher_spec();
break;
case 17:
result = tls_construct_next_proto((int)a1);
break;
case 18:
result = tls_construct_finished();
break;
default:
result = 0;
break;
}
return result;
}