//
// sub_A10A5C from 0xa10a5c to 0xa10af0 (148 bytes)
//
// 2 xrefs:
// > ??> @ 0xc78798
// > ??> @ 0xc787cc
//
// 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:07:46 +0000
//
int __fastcall sub_A10A5C(int a1, int a2, int a3, int a4)
{
int v6; // r0
int v7; // r5
int cipher_data; // r0
int v10; // r3
int v11; // r3
v6 = ((int (*)(void))EVP_CIPHER_CTX_get_cipher_data)();
v7 = v6;
if ( a2 == 8 )
{
cipher_data = EVP_CIPHER_CTX_get_cipher_data(a4);
v10 = *(_DWORD *)(v7 + 496);
if ( v10 )
{
if ( v10 != v7 )
return 0;
*(_DWORD *)(cipher_data + 496) = cipher_data;
}
v11 = *(_DWORD *)(v7 + 500);
if ( !v11 )
return 1;
if ( v11 == v7 + 248 )
{
*(_DWORD *)(cipher_data + 500) = cipher_data + 248;
return 1;
}
return 0;
}
if ( a2 )
return -1;
*(_DWORD *)(v6 + 496) = 0;
*(_DWORD *)(v6 + 500) = 0;
return 1;
}