//
// sub_872A80 from 0x872a80 to 0x872ae8 (104 bytes)
//
// 1 xrefs:
// > ??> @ 0xa39f68
//
// 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_872A80(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;
}