//
// sub_801094 from 0x801094 to 0x801138 (164 bytes)
//
// 4 xrefs:
// > ??> @ 0xab2a38
// > ??> @ 0xab2a6c
// > ??> @ 0xab2aa0
// > ??> @ 0xab2ad4
//
// 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 sub_801094(int a1, int a2, int a3, int a4)
{
int cipher_data; // r0
int v8; // r0
int v9; // r0
int v10; // r0
_BYTE v11[220]; // [sp+0h] [bp-DCh] BYREF
if ( a4
|| (v8 = EVP_CIPHER_CTX_cipher(a1), (EVP_CIPHER_flags(v8) & 0xF0007) == 4)
|| (v9 = EVP_CIPHER_CTX_cipher(a1), (EVP_CIPHER_flags(v9) & 0xF0007) == 3) )
{
cipher_data = EVP_CIPHER_CTX_get_cipher_data(a1);
IDEA_set_encrypt_key(a2, cipher_data);
return 1;
}
else
{
IDEA_set_encrypt_key(a2, v11);
v10 = EVP_CIPHER_CTX_get_cipher_data(a1);
IDEA_set_decrypt_key(v11, v10);
OPENSSL_cleanse(v11, 0xD8u);
return 1;
}
}