//
// sub_109B7B4 from 0x109b7b4 to 0x109b830 (124 bytes)
//
// 1 xrefs:
// > ??> @ 0x140fda8
//
// 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:17:28 +0000
//
__int64 __fastcall sub_109B7B4(unsigned int a1, __int64 *a2)
{
unsigned int v2; // w19
__int64 v3; // x20
__int64 v5; // x0
v2 = a1;
v3 = *a2;
if ( a1 == 1 )
{
v5 = EVP_CIPHER_CTX_new();
*(_QWORD *)(v3 + 48) = v5;
if ( v5 )
{
EVP_CIPHER_CTX_set_flags(v5, 1);
*(_QWORD *)(v3 + 40) = 0;
}
else
{
return 0;
}
return v2;
}
v2 = 1;
if ( a1 != 3 )
return v2;
EVP_PKEY_CTX_free(*(_QWORD *)(v3 + 40));
EVP_CIPHER_CTX_free(*(__int64 **)(v3 + 48));
return 1;
}