//
// v2i_ASN1_BIT_STRING from 0x8c4244 to 0x8c43dc (408 bytes)
//
// 3 xrefs:
// > ??> @ 0x6b7bc
// > ??> @ 0xab5608
// > ??> @ 0xab5640
//
// 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 v2i_ASN1_BIT_STRING(int a1, int a2, _DWORD *a3)
{
int v5; // r10
unsigned int v6; // r7
int v7; // r0
int v8; // r4
const char *v9; // r5
_DWORD *v10; // r8
const char *v11; // r6
v5 = ASN1_BIT_STRING_new();
if ( v5 )
{
v6 = 0;
if ( OPENSSL_sk_num((int)a3) <= 0 )
{
return v5;
}
else
{
while ( 1 )
{
v7 = OPENSSL_sk_value(a3, v6);
v8 = *(_DWORD *)(a1 + 52);
v9 = *(const char **)(v8 + 4);
v10 = (_DWORD *)v7;
if ( !v9 )
{
LABEL_14:
ERR_put_error(34, 101, 111, (int)"crypto/x509v3/v3_bitst.c", 86);
ERR_add_error_data(6, "section:", *v10, ",name:", v10[1], ",value:", v10[2]);
ASN1_BIT_STRING_free(v5);
return 0;
}
v11 = *(const char **)(v7 + 4);
while ( strcmp(*(const char **)(v8 + 8), v11) && strcmp(v9, v11) )
{
v8 += 12;
v9 = *(const char **)(v8 + 4);
if ( !v9 )
goto LABEL_14;
}
if ( !ASN1_BIT_STRING_set_bit(v5, *(_DWORD *)v8, 1) )
break;
if ( !*(_DWORD *)(v8 + 4) )
goto LABEL_14;
if ( (int)++v6 >= OPENSSL_sk_num((int)a3) )
return v5;
}
ERR_put_error(34, 101, 65, (int)"crypto/x509v3/v3_bitst.c", 77);
ASN1_BIT_STRING_free(v5);
return 0;
}
}
else
{
ERR_put_error(34, 101, 65, (int)"crypto/x509v3/v3_bitst.c", 67);
return 0;
}
}