//
// CMS_get1_crls from 0xa8a7f4 to 0xa8a900 (268 bytes)
//
// 1 xrefs:
// > ??> @ 0x83f9c
//
// 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:54 +0000
//
int *__fastcall CMS_get1_crls(int *a1)
{
char *v2; // r0
int v3; // r6
int *v4; // r6
signed int v5; // r4
int *v6; // r7
int v7; // r0
unsigned int v8; // r1
_DWORD *v10; // r5
v2 = OBJ_obj2nid(*a1);
if ( v2 != (_BYTE *)&dword_14 + 2 )
{
if ( v2 == (_BYTE *)&dword_14 + 3 )
{
v3 = *(_DWORD *)(a1[1] + 4);
if ( v3 )
{
v4 = (int *)(v3 + 4);
goto LABEL_5;
}
}
else
{
ERR_put_error(46, 132, 152, (int)"crypto/cms/cms_lib.c", 431);
}
return nullptr;
}
v4 = (int *)(a1[1] + 16);
if ( a1[1] == -16 )
return nullptr;
LABEL_5:
v5 = 0;
v6 = nullptr;
while ( 1 )
{
do
{
v7 = OPENSSL_sk_num(*v4);
v8 = v5;
if ( v5++ >= v7 )
return v6;
v10 = (_DWORD *)OPENSSL_sk_value((_DWORD *)*v4, v8);
}
while ( *v10 );
if ( !v6 )
{
v6 = OPENSSL_sk_new_null();
if ( !v6 )
return nullptr;
}
if ( !OPENSSL_sk_push(v6, v10[1]) )
break;
X509_CRL_up_ref(v10[1]);
}
OPENSSL_sk_pop_free((int)v6, (void (__fastcall *)(int))X509_CRL_free);
return nullptr;
}