//
// EVP_PKEY_set_type_str from 0xa19f7c to 0xa1a09c (288 bytes)
//
// 2 xrefs:
// > PEM_read_bio_Parameters @ 0xa383c4
// > ??> @ 0x7d55c
//
// 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_set_type_str(_DWORD *a1, char *a2, size_t a3)
{
int v6; // r3
void (*v7)(void); // r3
int *str; // r5
int v9; // r1
int v10; // r2
int v12[2]; // [sp+Ch] [bp-8h] BYREF
v12[0] = 0;
if ( a1 )
{
if ( a1[5] )
{
v6 = a1[3];
if ( v6 )
{
v7 = *(void (**)(void))(v6 + 88);
if ( v7 )
{
v7();
a1[5] = 0;
}
}
ENGINE_finish(a1[4]);
a1[4] = 0;
}
if ( !a1[1] && a1[3] )
return 1;
ENGINE_finish(a1[4]);
a1[4] = 0;
}
if ( a2 )
str = (int *)EVP_PKEY_asn1_find_str(v12, a2, a3);
else
str = (int *)EVP_PKEY_asn1_find(v12, 0);
if ( a1 )
{
if ( str )
{
v9 = *str;
v10 = v12[0];
a1[3] = str;
*a1 = v9;
a1[4] = v10;
a1[1] = 0;
return 1;
}
}
else
{
ENGINE_finish(v12[0]);
if ( str )
return 1;
}
ERR_put_error(6, 158, 156, (int)"crypto/evp/p_lib.c", 204);
return 0;
}