//
// sub_8085E4 from 0x8085e4 to 0x808664 (128 bytes)
//
// 1 xrefs:
// > ??> @ 0xa322d0
//
// 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
//
size_t __fastcall sub_8085E4(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;
}