//
// EVP_CIPHER_CTX_reset from 0x802380 to 0x802414 (148 bytes)
//
// 14 xrefs:
// > ssl3_change_cipher_state @ 0x7b8254
// > ssl3_change_cipher_state @ 0x7b82f4
// > ssl3_change_cipher_state @ 0x7b8314
// > tls1_change_cipher_state @ 0x7ba570
// > tls1_change_cipher_state @ 0x7ba68c
// > EVP_CIPHER_CTX_free @ 0x802438
// > EVP_CipherInit_ex @ 0x802f78
// > EVP_CipherInit @ 0x803374
// > EVP_CIPHER_CTX_copy @ 0x80352c
// > CMS_RecipientInfo_kari_decrypt @ 0x874940
// > CMS_RecipientInfo_kari_decrypt @ 0x8749d4
// > cms_RecipientInfo_kari_encrypt @ 0x874dac
// > cms_RecipientInfo_kari_encrypt @ 0x874e58
// > ??> @ 0x5dd0c
//
// 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 EVP_CIPHER_CTX_reset(int *a1)
{
int (*v2)(void); // r3
int result; // r0
_BYTE *v4; // r0
unsigned int v5; // r1
if ( !a1 )
return 1;
if ( !*a1 )
goto LABEL_10;
v2 = *(int (**)(void))(*a1 + 28);
if ( !v2 || (result = v2()) != 0 )
{
v4 = (_BYTE *)a1[24];
if ( !v4 )
goto LABEL_7;
v5 = *(_DWORD *)(*a1 + 32);
if ( !v5 )
goto LABEL_7;
OPENSSL_cleanse(v4, v5);
LABEL_10:
v4 = (_BYTE *)a1[24];
LABEL_7:
CRYPTO_free(v4, "crypto/evp/evp_enc.c", 31);
ENGINE_finish(a1[1]);
memset(a1, 0, 0x8Cu);
return 1;
}
return result;
}