//
// v2i_ASN1_BIT_STRING from 0x10edf98 to 0x10ee144 (428 bytes)
//
// 3 xrefs:
// > ??> @ 0xff358
// > ??> @ 0x153f988
// > ??> @ 0x153f9f0
//
// 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:18:05 +0000
//
__int64 __fastcall v2i_ASN1_BIT_STRING(__int64 a1, __int64 a2, unsigned int *a3)
{
int v5; // w22
__int64 v6; // x25
__int64 v7; // x0
__int64 v8; // x19
_QWORD *v9; // x23
const char *v10; // x20
const char *v11; // x21
v5 = 0;
v6 = ASN1_BIT_STRING_new();
if ( v6 )
{
if ( (int)OPENSSL_sk_num(a3) <= 0 )
{
return v6;
}
else
{
while ( 1 )
{
v7 = OPENSSL_sk_value((__int64)a3, v5);
v8 = *(_QWORD *)(a1 + 96);
v9 = (_QWORD *)v7;
v10 = *(const char **)(v8 + 8);
if ( !v10 )
{
LABEL_12:
ERR_put_error(34, 101, 111, (__int64)"crypto/x509v3/v3_bitst.c", 86);
ERR_add_error_data(6, "section:", *v9, ",name:", v9[1], ",value:", v9[2]);
ASN1_BIT_STRING_free(v6);
return 0;
}
v11 = *(const char **)(v7 + 8);
while ( strcmp(*(const char **)(v8 + 16), v11) && strcmp(v10, v11) )
{
v8 += 24;
v10 = *(const char **)(v8 + 8);
if ( !v10 )
goto LABEL_12;
}
if ( !(unsigned int)ASN1_BIT_STRING_set_bit(v6, *(_DWORD *)v8, 1) )
break;
if ( !*(_QWORD *)(v8 + 8) )
goto LABEL_12;
if ( ++v5 >= (int)OPENSSL_sk_num(a3) )
return v6;
}
ERR_put_error(34, 101, 65, (__int64)"crypto/x509v3/v3_bitst.c", 77);
ASN1_BIT_STRING_free(v6);
return 0;
}
}
else
{
ERR_put_error(34, 101, 65, (__int64)"crypto/x509v3/v3_bitst.c", 67);
return 0;
}
}