//
// EVP_CIPHER_CTX_ctrl from 0x802e44 to 0x802ef4 (176 bytes)
//
// 17 xrefs:
// > tls1_enc @ 0x78b6c0
// > tls1_enc @ 0x78b900
// > tls1_enc @ 0x78b930
// > tls1_enc @ 0x78b94c
// > tls1_change_cipher_state @ 0x7ba430
// > tls1_change_cipher_state @ 0x7ba44c
// > tls1_change_cipher_state @ 0x7ba468
// > tls1_change_cipher_state @ 0x7ba7c0
// > tls1_change_cipher_state @ 0x7ba7dc
// > sub_7FCC08 @ 0x7fccec
// > sub_8011CC @ 0x8012b8
// > ??> @ 0x801340
// > EVP_CipherInit_ex @ 0x80313c
// > EVP_CIPHER_CTX_set_key_length @ 0x8034a0
// > EVP_CIPHER_CTX_rand_key @ 0x8034ec
// > PKCS5_pbe2_set_iv @ 0x8c73f0
// > ??> @ 0x5ab0c
//
// 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_ctrl(int a1)
{
int (*v1)(void); // r4
int result; // r0
if ( *(_DWORD *)a1 )
{
v1 = *(int (**)(void))(*(_DWORD *)a1 + 44);
if ( v1 )
{
result = v1();
if ( result == -1 )
{
ERR_put_error(6, 124, 133, (int)"crypto/evp/evp_enc.c", 586);
return 0;
}
}
else
{
ERR_put_error(6, 124, 132, (int)"crypto/evp/evp_enc.c", 579);
return 0;
}
}
else
{
ERR_put_error(6, 124, 131, (int)"crypto/evp/evp_enc.c", 574);
return 0;
}
return result;
}