//
// EVP_PKEY_copy_parameters from 0xa19e44 to 0xa19f70 (300 bytes)
//
// 13 xrefs:
// > sub_8539B8 @ 0x85433a
// > sub_9B015C @ 0x9b01b8
// > sub_9B02F8 @ 0x9b0340
// > SSL_use_PrivateKey @ 0x9b0adc
// > SSL_CTX_use_PrivateKey @ 0x9b13a8
// > tls_process_client_key_exchange @ 0x9c00d0
// > tls_process_client_key_exchange @ 0x9c053c
// > X509_get_pubkey_parameters @ 0xa58954
// > X509_get_pubkey_parameters @ 0xa58970
// > sub_A94CDC @ 0xa94d1c
// > sub_A9684C @ 0xa96888
// > sub_A9FC48 @ 0xa9fc94
// > ??> @ 0x6829c
//
// 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:51 +0000
//
int __fastcall EVP_PKEY_copy_parameters(_DWORD *a1, int *a2)
{
int v4; // r3
int (__fastcall *v5)(_DWORD *, int *); // r3
int result; // r0
if ( *a1 )
{
if ( *a1 == *a2 )
{
if ( !EVP_PKEY_missing_parameters((int)a2) )
goto LABEL_4;
LABEL_11:
ERR_put_error(6, 103, 103, (int)"crypto/evp/p_lib.c", 84);
return 0;
}
ERR_put_error(6, 103, 101, (int)"crypto/evp/p_lib.c", 79);
return 0;
}
if ( !EVP_PKEY_set_type(a1, *a2) )
return 0;
if ( EVP_PKEY_missing_parameters((int)a2) )
goto LABEL_11;
LABEL_4:
if ( EVP_PKEY_missing_parameters((int)a1) )
{
v4 = a2[3];
if ( v4 )
{
v5 = *(int (__fastcall **)(_DWORD *, int *))(v4 + 72);
if ( v5 )
return v5(a1, a2);
}
return 0;
}
result = EVP_PKEY_cmp_parameters(a1, a2);
if ( result != 1 )
{
ERR_put_error(6, 103, 153, (int)"crypto/evp/p_lib.c", 91);
return 0;
}
return result;
}