//
// ssl_replace_hash from 0x9aed34 to 0x9aed98 (100 bytes)
//
// 5 xrefs:
// > ssl3_change_cipher_state @ 0x9ccd00
// > ssl3_change_cipher_state @ 0x9cce04
// > tls1_change_cipher_state @ 0x9cee44
// > tls1_change_cipher_state @ 0x9cf104
// > ??> @ 0x75efc
//
// 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:55 +0000
//
int __fastcall ssl_replace_hash(int *a1, int a2)
{
int v4; // r0
int v5; // r0
int v6; // r3
int v7; // r0
v4 = ssl_clear_hash_ctx(a1);
v5 = EVP_MD_CTX_new(v4);
v6 = v5;
*a1 = v5;
if ( !v5 || a2 && (v7 = EVP_DigestInit_ex(v5, a2, 0), v6 = *a1, v7 <= 0) )
{
EVP_MD_CTX_free(v6);
v6 = 0;
*a1 = 0;
}
return v6;
}