//
// OCSP_url_svcloc_new from 0x10426b0 to 0x10427fc (332 bytes)
//
// 1 xrefs:
// > ??> @ 0x91360
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:31 +0000
//
__int64 __fastcall OCSP_url_svcloc_new(__int64 a1, char **a2)
{
_QWORD *v4; // x22
__int64 v5; // x0
__int64 v6; // x0
char **v7; // x0
__int64 v8; // x0
__int64 v9; // x19
char **v10; // x3
char ***v11; // x20
__int64 v12; // x21
v4 = (_QWORD *)OCSP_SERVICELOC_new();
if ( v4 )
{
v5 = X509_NAME_dup(a1);
*v4 = v5;
if ( v5 )
{
if ( !a2 || !*a2 )
goto LABEL_17;
v6 = OPENSSL_sk_new_null(*a2);
v4[1] = v6;
if ( v6 )
{
if ( *a2 )
{
do
{
v11 = (char ***)ACCESS_DESCRIPTION_new();
if ( !v11 )
goto LABEL_16;
v7 = OBJ_nid2obj(0xB2u);
*v11 = v7;
if ( !v7 || (v7 = (char **)GENERAL_NAME_new(), (v11[1] = v7) == nullptr) )
{
v9 = (__int64)v7;
v12 = (__int64)v7;
goto LABEL_18;
}
v8 = ASN1_IA5STRING_new();
v9 = v8;
if ( !v8 )
goto LABEL_21;
if ( !(unsigned int)ASN1_STRING_set(v8, *a2, -1) )
{
v12 = 0;
goto LABEL_18;
}
v10 = v11[1];
v10[1] = (char *)v9;
*(_DWORD *)v10 = 6;
++a2;
if ( !(unsigned int)OPENSSL_sk_push(v4[1], v11) )
{
v9 = 0;
LABEL_21:
v12 = v9;
goto LABEL_18;
}
}
while ( a2 && *a2 );
}
LABEL_17:
v11 = nullptr;
v9 = 0;
v12 = X509V3_EXT_i2d(371, 0, v4);
goto LABEL_18;
}
}
}
LABEL_16:
v11 = nullptr;
v9 = 0;
v12 = 0;
LABEL_18:
ASN1_IA5STRING_free(v9);
ACCESS_DESCRIPTION_free(v11);
OCSP_SERVICELOC_free((__int64)v4);
return v12;
}