//
// EVP_CIPHER_CTX_ctrl from 0xa17a44 to 0xa17af4 (176 bytes)
//
// 17 xrefs:
// > tls1_enc @ 0x9a02c4
// > tls1_enc @ 0x9a0504
// > tls1_enc @ 0x9a0534
// > tls1_enc @ 0x9a0550
// > tls1_change_cipher_state @ 0x9cf034
// > tls1_change_cipher_state @ 0x9cf050
// > tls1_change_cipher_state @ 0x9cf06c
// > tls1_change_cipher_state @ 0x9cf3c4
// > tls1_change_cipher_state @ 0x9cf3e0
// > sub_A11808 @ 0xa118ec
// > sub_A15DCC @ 0xa15eb8
// > ??> @ 0xa15f40
// > EVP_CipherInit_ex @ 0xa17d3c
// > EVP_CIPHER_CTX_set_key_length @ 0xa180a0
// > EVP_CIPHER_CTX_rand_key @ 0xa180ec
// > PKCS5_pbe2_set_iv @ 0xadc3f0
// > ??> @ 0x7458c
//
// 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:07:50 +0000
//
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;
}