//
// sub_859588 from 0x859588 to 0x85960c (132 bytes)
//
// 1 xrefs:
// > ??> @ 0xab42e4
//
// 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 sub_859588(int a1, _DWORD *a2, int a3)
{
signed int v4; // r4
int *v5; // r5
int v6; // r0
unsigned int v7; // r1
int v10; // [sp+4h] [bp-54h] BYREF
_BYTE v11[80]; // [sp+8h] [bp-50h] BYREF
_BYTE v12[84]; // [sp+58h] [bp+0h] BYREF
v10 = a3;
v4 = 0;
while ( 1 )
{
v6 = OPENSSL_sk_num((int)a2);
v7 = v4;
if ( v4++ >= v6 )
break;
v5 = (int *)OPENSSL_sk_value(a2, v7);
i2t_ASN1_OBJECT((int)v11, 80, *v5);
i2t_ASN1_OBJECT((int)v12, 80, v5[1]);
X509V3_add_value(v11, v12, &v10);
}
return v10;
}