//
// EVP_CIPHER_CTX_ctrl from 0x1027fdc to 0x1028084 (168 bytes)
//
// 17 xrefs:
// > tls1_enc @ 0xfb3064
// > tls1_enc @ 0xfb3280
// > tls1_enc @ 0xfb32c0
// > tls1_enc @ 0xfb32dc
// > tls1_change_cipher_state @ 0xfdf104
// > tls1_change_cipher_state @ 0xfdf11c
// > tls1_change_cipher_state @ 0xfdf134
// > tls1_change_cipher_state @ 0xfdf464
// > tls1_change_cipher_state @ 0xfdf47c
// > sub_10212F4 @ 0x10213c4
// > sub_1025FE8 @ 0x1026098
// > sub_1026154 @ 0x1026180
// > EVP_CipherInit_ex @ 0x102829c
// > EVP_CIPHER_CTX_set_key_length @ 0x1028578
// > EVP_CIPHER_CTX_rand_key @ 0x10285cc
// > PKCS5_pbe2_set_iv @ 0x10f0d98
// > ??> @ 0x85360
//
// 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:14 +0000
//
__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;
}