//
// ssl_security_cert_chain from 0x9c9a54 to 0x9c9b04 (176 bytes)
//
// 3 xrefs:
// > ssl_add_cert_chain @ 0x9a6db8
// > ssl_add_cert_chain @ 0x9a6e68
// > ??> @ 0x74f2c
//
// 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:08 +0000
//
int __fastcall ssl_security_cert_chain(int a1, int a2, int a3, int a4)
{
int v7; // r4
int result; // r0
int v9; // r0
int v10; // r0
int v11; // r1
if ( a3 )
{
v7 = 0;
}
else
{
v7 = 1;
a3 = OPENSSL_sk_value(a2, 0);
}
result = ssl_security_cert(a1, 0, a3, a4, 1);
if ( result == 1 )
{
while ( 1 )
{
v10 = OPENSSL_sk_num(a2);
v11 = v7;
if ( v7++ >= v10 )
break;
v9 = OPENSSL_sk_value(a2, v11);
result = ssl_security_cert(a1, 0, v9, a4, 0);
if ( result != 1 )
return result;
}
return 1;
}
return result;
}