//
// tls_process_finished from 0x7a65b8 to 0x7a6730 (376 bytes)
//
// 3 xrefs:
// > ossl_statem_client_process_message @ 0x7a42b0
// > ossl_statem_server_process_message @ 0x7acfa0
// > ??> @ 0x5d33c
//
// 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 tls_process_finished(_DWORD *a1, _DWORD *a2)
{
int v2; // r3
signed int v4; // r5
int v5; // r2
v2 = a1[26];
if ( !*(_DWORD *)(v2 + 220) )
{
ERR_put_error(20, 364, 154, "ssl/statem/statem_lib.c", 202);
v5 = 10;
goto LABEL_4;
}
*(_DWORD *)(v2 + 220) = 0;
v4 = *(_DWORD *)(v2 + 516);
if ( v4 != a2[1] )
{
ERR_put_error(20, 364, 111, "ssl/statem/statem_lib.c", 211);
v5 = 50;
LABEL_4:
ssl3_send_alert(a1, 2, v5);
ossl_statem_set_error((int)a1);
return 0;
}
if ( CRYPTO_memcmp(*a2, v2 + 388, *(_DWORD *)(v2 + 516)) )
{
ERR_put_error(20, 364, 149, "ssl/statem/statem_lib.c", 217);
v5 = 51;
goto LABEL_4;
}
if ( a1[7] )
{
if ( v4 > 64 )
OPENSSL_die("assertion failed: i <= EVP_MAX_MD_SIZE", "ssl/statem/statem_lib.c", 225);
memcpy((void *)(a1[26] + 700), (const void *)(a1[26] + 388), v4);
*(_BYTE *)(a1[26] + 764) = v4;
return 1;
}
else
{
if ( v4 > 64 )
OPENSSL_die("assertion failed: i <= EVP_MAX_MD_SIZE", "ssl/statem/statem_lib.c", 229);
memcpy((void *)(a1[26] + 765), (const void *)(a1[26] + 388), v4);
*(_BYTE *)(a1[26] + 829) = v4;
return 1;
}
}