//
// ssl_replace_hash from 0xfc0f58 to 0xfc0fc0 (104 bytes)
//
// 5 xrefs:
// > ssl3_change_cipher_state @ 0xfdcfac
// > ssl3_change_cipher_state @ 0xfdd0b8
// > tls1_change_cipher_state @ 0xfdef3c
// > tls1_change_cipher_state @ 0xfdf1b8
// > ??> @ 0xb5108
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:21 +0000
//
__int64 __fastcall ssl_replace_hash(__int64 *a1, __int64 a2)
{
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x2
int v6; // w0
v3 = ssl_clear_hash_ctx(a1);
v4 = EVP_MD_CTX_new(v3);
*a1 = v4;
v5 = v4;
if ( !v4 || a2 && (v6 = EVP_DigestInit_ex(v4, a2, 0), v5 = *a1, v6 <= 0) )
{
EVP_MD_CTX_free(v5);
*a1 = 0;
return 0;
}
return v5;
}