//
// ASN1_STRING_set_by_NID from 0xa7901c to 0xa790e0 (196 bytes)
//
// 3 xrefs:
// > X509_ATTRIBUTE_set1_data @ 0xa52dc0
// > X509_NAME_ENTRY_set_data @ 0xa5c700
// > ??> @ 0x806bc
//
// 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:08:45 +0000
//
int __fastcall ASN1_STRING_set_by_NID(int *a1, char *a2, int a3, int a4, int a5)
{
int *v5; // r4
int v9; // r0
int v10; // r12
int v11; // r3
unsigned int v12; // r0
int v13; // r0
int v15; // [sp+14h] [bp-8h] BYREF
v5 = a1;
v15 = 0;
if ( !a1 )
v5 = &v15;
v9 = ASN1_STRING_TABLE_get(a5);
v10 = v9;
if ( v9 )
{
v11 = *(_DWORD *)(v9 + 16);
v12 = *(_DWORD *)(v9 + 12);
if ( (v11 & 2) == 0 )
v12 &= dword_D26418;
v13 = ASN1_mbstring_ncopy(v5, a2, a3, a4, v12, *(_DWORD *)(v10 + 4), *(_DWORD *)(v10 + 8));
}
else
{
v13 = ASN1_mbstring_copy(v5, a2, a3, a4, dword_D26418 & 0x2806);
}
if ( v13 > 0 )
return *v5;
else
return 0;
}