//
// sub_A87680 from 0xa87680 to 0xa876e8 (104 bytes)
//
// 1 xrefs:
// > ??> @ 0xc811e8
//
// 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:08:52 +0000
//
int __fastcall sub_A87680(int a1, int *a2)
{
int v2; // r5
int result; // r0
v2 = *a2;
if ( a1 == 1 )
{
result = EVP_CIPHER_CTX_new();
*(_DWORD *)(v2 + 24) = result;
if ( result )
{
EVP_CIPHER_CTX_set_flags(result, 1);
*(_DWORD *)(v2 + 20) = 0;
return 1;
}
}
else
{
if ( a1 == 3 )
{
EVP_PKEY_CTX_free(*(_DWORD *)(v2 + 20));
EVP_CIPHER_CTX_free(*(int **)(v2 + 24));
}
return 1;
}
return result;
}