//
// EVP_PKEY_encrypt_init from 0xa1ae50 to 0xa1aecc (124 bytes)
//
// 6 xrefs:
// > sub_9B4874 @ 0x9b48f0
// > tls_construct_client_key_exchange @ 0x9b70d0
// > PKCS7_dataInit @ 0xa3bab0
// > CMS_RecipientInfo_encrypt @ 0xa88790
// > CMS_add1_recipient_cert @ 0xa88d4c
// > ??> @ 0x769bc
//
// 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:52 +0000
//
int __fastcall EVP_PKEY_encrypt_init(int *a1)
{
int v2; // r3
int (*v3)(void); // r3
int result; // r0
if ( a1 && (v2 = *a1) != 0 && *(_DWORD *)(v2 + 80) )
{
v3 = *(int (**)(void))(v2 + 76);
a1[4] = 256;
if ( v3 )
{
result = v3();
if ( result <= 0 )
a1[4] = 0;
}
else
{
return 1;
}
}
else
{
ERR_put_error(6, 139, 150, (int)"crypto/evp/pmeth_fn.c", 139);
return -2;
}
return result;
}