//
// ASN1_STRING_TABLE_add from 0x108aa54 to 0x108abc0 (364 bytes)
//
// 2 xrefs:
// > sub_108C76C @ 0x108c8ec
// > ??> @ 0xe39b0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:17:15 +0000
//
__int64 __fastcall ASN1_STRING_TABLE_add(int a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
__int64 v10; // x0
__int64 v11; // x19
_QWORD *v12; // x20
_QWORD *v13; // x4
int v14; // w5
__int64 v15; // x3
__int64 v16; // x0
__int64 v17; // x2
__int64 result; // x0
if ( !qword_1568660 )
{
qword_1568660 = (__int64)OPENSSL_sk_new((__int64)sub_108A7FC);
if ( !qword_1568660 )
goto LABEL_20;
}
v10 = ASN1_STRING_TABLE_get(a1);
v11 = v10;
if ( !v10 || (*(_QWORD *)(v10 + 32) & 1) == 0 )
{
v12 = CRYPTO_zalloc(&qword_28, (__int64)"crypto/asn1/a_strnid.c", 202);
if ( v12 )
{
if ( (unsigned int)OPENSSL_sk_push((int *)qword_1568660, (__int64)v12) )
{
v13 = v12;
if ( v11 )
{
v14 = *(_DWORD *)v11;
v15 = *(_QWORD *)(v11 + 8);
v16 = *(_QWORD *)(v11 + 32) | 1LL;
v17 = *(_QWORD *)(v11 + 16);
v12[3] = *(_QWORD *)(v11 + 24);
*(_DWORD *)v12 = v14;
v12[1] = v15;
v12[2] = v17;
v12[4] = v16;
}
else
{
v12[1] = -1;
v12[2] = -1;
v12[4] = 1;
}
goto LABEL_8;
}
CRYPTO_free(v12, (__int64)"crypto/asn1/a_strnid.c", 206);
}
LABEL_20:
ERR_put_error(13, 129, 65, (__int64)"crypto/asn1/a_strnid.c", 230);
return 0;
}
v13 = (_QWORD *)v10;
LABEL_8:
if ( (a2 & 0x8000000000000000LL) == 0 )
v13[1] = a2;
if ( (a3 & 0x8000000000000000LL) == 0 )
v13[2] = a3;
if ( a4 )
v13[3] = a4;
result = 1;
if ( a5 )
v13[4] = a5 | 1;
return result;
}