//
// EVP_MD_CTX_reset from 0x101fa60 to 0x101fb18 (184 bytes)
//
// 25 xrefs:
// > n_ssl3_mac @ 0xfb266c
// > ssl3_final_finish_mac @ 0xfddafc
// > EVP_MD_CTX_free @ 0x101fb3c
// > EVP_DigestInit @ 0x101fdd8
// > EVP_DigestFinal @ 0x101fec0
// > EVP_MD_CTX_copy_ex @ 0x101ff24
// > EVP_MD_CTX_copy_ex @ 0x1020048
// > EVP_MD_CTX_copy @ 0x10200c0
// > HMAC_CTX_free @ 0x102e240
// > HMAC_CTX_free @ 0x102e248
// > HMAC_CTX_free @ 0x102e250
// > HMAC_CTX_reset @ 0x102e2c0
// > HMAC_CTX_reset @ 0x102e2c8
// > HMAC_CTX_reset @ 0x102e2d0
// > HMAC_CTX_reset @ 0x102e320
// > HMAC_CTX_reset @ 0x102e328
// > HMAC_CTX_reset @ 0x102e330
// > HMAC_CTX_copy @ 0x102e448
// > HMAC_CTX_copy @ 0x102e450
// > HMAC_CTX_copy @ 0x102e458
// > CMS_SignerInfo_sign @ 0x109fba0
// > CMS_SignerInfo_sign @ 0x109fbd8
// > CMS_SignerInfo_sign @ 0x109fcac
// > CMS_SignerInfo_verify @ 0x10a01e4
// > ??> @ 0x83fb0
//
// 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:16:10 +0000
//
__int64 __fastcall EVP_MD_CTX_reset(__int64 *a1)
{
__int64 v2; // x1
if ( a1 )
{
v2 = *a1;
if ( *a1 )
{
if ( !*(_QWORD *)(v2 + 56) )
goto LABEL_15;
if ( !(unsigned int)((__int64 (*)(void))EVP_MD_CTX_test_flags)() )
(*(void (__fastcall **)(__int64 *))(*a1 + 56))(a1);
v2 = *a1;
if ( *a1 )
{
LABEL_15:
if ( *(_DWORD *)(v2 + 68) && a1[3] && !(unsigned int)EVP_MD_CTX_test_flags(a1, 4) )
CRYPTO_clear_free(a1[3], *(int *)(*a1 + 68), "crypto/evp/digest.c", 33);
}
}
EVP_PKEY_CTX_free(a1[4]);
ENGINE_finish(a1[1]);
OPENSSL_cleanse(a1, 0x30u);
}
return 1;
}