//
// sub_7F592C from 0x7f592c to 0x7f5a68 (316 bytes)
//
// 1 xrefs:
// > ??> @ 0xa30fb0
//
// 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_7F592C(int a1, int a2)
{
int result; // r0
const void *v4; // r6
int v5; // r4
_BOOL4 v6; // r3
void *v7; // r0
void *v8; // r4
const void *v9; // [sp+8h] [bp-14h] BYREF
int v10; // [sp+Ch] [bp-10h] BYREF
_DWORD *v11; // [sp+10h] [bp-Ch] BYREF
int v12; // [sp+14h] [bp-8h] BYREF
result = X509_PUBKEY_get0_param(0, &v9, &v10, &v11, a2);
if ( result )
{
v4 = v9;
v5 = v10;
if ( v11 && (X509_ALGOR_get0(nullptr, &v12, nullptr, v11), v12 != -1) )
{
ERR_put_error(16, 266, 102, "crypto/ec/ecx_meth.c", 47);
return 0;
}
else
{
v6 = v4 == nullptr;
if ( v5 != 32 )
v6 = 1;
if ( v6 )
{
ERR_put_error(16, 266, 102, "crypto/ec/ecx_meth.c", 53);
return 0;
}
else
{
v7 = (void *)CRYPTO_zalloc(36, "crypto/ec/ecx_meth.c", 58);
v8 = v7;
if ( v7 )
{
memcpy(v7, v4, 0x20u);
EVP_PKEY_assign(a1, 1034, v8);
return 1;
}
else
{
ERR_put_error(16, 266, 65, "crypto/ec/ecx_meth.c", 60);
return 0;
}
}
}
}
return result;
}