//
// sub_A1D1E4 from 0xa1d1e4 to 0xa1d264 (128 bytes)
//
// 1 xrefs:
// > ??> @ 0xc79550
//
// 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:53 +0000
//
size_t __fastcall sub_A1D1E4(int a1, void **a2)
{
const void **v3; // r5
size_t result; // r0
void *v5; // r0
v3 = (const void **)EVP_PKEY_get0(a1);
if ( !a2 )
return (size_t)*v3;
if ( *a2 )
{
memcpy(*a2, v3[2], (size_t)*v3);
result = (size_t)*v3;
*a2 = (char *)*v3 + (_DWORD)*a2;
return result;
}
v5 = (void *)CRYPTO_malloc(*v3, "crypto/hmac/hm_ameth.c", 83);
*a2 = v5;
if ( v5 )
{
memcpy(v5, v3[2], (size_t)*v3);
return (size_t)*v3;
}
return -1;
}