//
// EVP_CIPHER_CTX_ctrl from 0xda9c7c to 0xda9d24 (168 bytes)
//
// 17 xrefs:
// > tls1_enc @ 0xd34d10
// > tls1_enc @ 0xd34f2c
// > tls1_enc @ 0xd34f6c
// > tls1_enc @ 0xd34f88
// > tls1_change_cipher_state @ 0xd60db0
// > tls1_change_cipher_state @ 0xd60dc8
// > tls1_change_cipher_state @ 0xd60de0
// > tls1_change_cipher_state @ 0xd61110
// > tls1_change_cipher_state @ 0xd61128
// > sub_DA2F94 @ 0xda3064
// > sub_DA7C88 @ 0xda7d38
// > sub_DA7DF4 @ 0xda7e20
// > EVP_CipherInit_ex @ 0xda9f3c
// > EVP_CIPHER_CTX_set_key_length @ 0xdaa218
// > EVP_CIPHER_CTX_rand_key @ 0xdaa26c
// > PKCS5_pbe2_set_iv @ 0xe72d98
// > ??> @ 0x61a10
//
// 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
//
__int64 __fastcall EVP_CIPHER_CTX_ctrl(__int64 a1)
{
__int64 (*v1)(void); // x19
__int64 result; // x0
if ( *(_QWORD *)a1 )
{
v1 = *(__int64 (**)(void))(*(_QWORD *)a1 + 72LL);
if ( v1 )
{
result = v1();
if ( (_DWORD)result == -1 )
{
ERR_put_error(6, 124, 133, (__int64)"crypto/evp/evp_enc.c", 586);
return 0;
}
}
else
{
ERR_put_error(6, 124, 132, (__int64)"crypto/evp/evp_enc.c", 579);
return 0;
}
}
else
{
ERR_put_error(6, 124, 131, (__int64)"crypto/evp/evp_enc.c", 574);
return 0;
}
return result;
}