//
// X509_VERIFY_PARAM_set1_email from 0x846d90 to 0x846e24 (148 bytes)
//
// 3 xrefs:
// > X509_VERIFY_PARAM_inherit @ 0x847114
// > X509_VERIFY_PARAM_inherit @ 0x8471ac
// > ??> @ 0x679dc
//
// 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 X509_VERIFY_PARAM_set1_email(int a1, const char *a2, void *a3)
{
void *v3; // r4
int v5; // r7
void *v6; // r6
v3 = (void *)a2;
v5 = a1 + 52;
if ( a2 )
{
v6 = a3;
if ( !a3 )
v6 = (void *)strlen(a2);
v3 = CRYPTO_memdup(v3, v6, (int)"crypto/x509/x509_vpm.c", 266);
if ( !v3 )
return 0;
}
else
{
v6 = nullptr;
}
CRYPTO_free(*(void **)(a1 + 48), (int)"crypto/x509/x509_vpm.c", 273);
*(_DWORD *)(a1 + 48) = v3;
if ( v5 )
*(_DWORD *)(a1 + 52) = v6;
return 1;
}