//
// sub_A0D1C8 from 0xa0d1c8 to 0xa0d26c (164 bytes)
//
// 3 xrefs:
// > ENGINE_pkey_asn1_find_str @ 0xa0d604
// > ENGINE_pkey_asn1_find_str @ 0xa0d610
// > ??> @ 0xa0d68c
//
// 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:07:44 +0000
//
int __fastcall sub_A0D1C8(int result, int a2, int a3, int a4)
{
int v4; // r4
int v6; // r9
int v8; // r0
int v9; // r1
bool v10; // cc
int v11; // r11
int v12; // r7
size_t v13; // r2
int v14; // [sp+4h] [bp-8h] BYREF
v4 = *(_DWORD *)(a4 + 4);
if ( !v4 )
{
v6 = result;
while ( 1 )
{
v8 = OPENSSL_sk_num(a2);
v9 = v4;
v10 = v4 < v8;
result = a2;
if ( !v10 )
break;
++v4;
v11 = OPENSSL_sk_value(a2, v9);
(*(void (__fastcall **)(int, int *, _DWORD, int))(v11 + 40))(v11, &v14, 0, v6);
v12 = v14;
v13 = strlen(*(const char **)(v14 + 12));
if ( v13 == *(_DWORD *)(a4 + 12) )
{
result = strncasecmp(*(const char **)(v14 + 12), *(const char **)(a4 + 8), v13);
if ( !result )
{
*(_DWORD *)a4 = v11;
*(_DWORD *)(a4 + 4) = v12;
return result;
}
}
}
}
return result;
}