//
// sub_1026654 from 0x1026654 to 0x1026714 (192 bytes)
//
// 6 xrefs:
// > ??> @ 0x1402290
// > ??> @ 0x14022e8
// > ??> @ 0x1402340
// > ??> @ 0x1402398
// > ??> @ 0x14023f0
// > ??> @ 0x1402448
//
// 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:13 +0000
//
__int64 __fastcall sub_1026654(__int64 a1, int a2, int a3, _DWORD *a4)
{
_DWORD *cipher_data; // x20
if ( a2 == 2 )
{
*a4 = *(_DWORD *)EVP_CIPHER_CTX_get_cipher_data(a1);
return 1;
}
else if ( a2 == 3 )
{
if ( a3 <= 0 )
return 0;
*(_DWORD *)EVP_CIPHER_CTX_get_cipher_data(a1) = a3;
return 1;
}
else
{
if ( a2 )
return (unsigned int)-1;
cipher_data = (_DWORD *)EVP_CIPHER_CTX_get_cipher_data(a1);
*cipher_data = 8 * EVP_CIPHER_CTX_key_length(a1);
return 1;
}
}