//
// X509_REQ_get_extensions from 0x10ed2dc to 0x10ed384 (168 bytes)
//
// 2 xrefs:
// > X509_REQ_get1_email @ 0x1082898
// > ??> @ 0xc5a28
//
// 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:18:05 +0000
//
__int64 __fastcall X509_REQ_get_extensions(__int64 a1)
{
__int64 v1; // x20
unsigned int v2; // w1
int attr_by_NID; // w0
unsigned int v5; // t1
__int64 attr; // x0
__int64 v8; // x0
int *v9; // x2
char *v10; // [xsp+28h] [xbp+28h] BYREF
if ( !a1 )
return 0;
v1 = off_15558B0;
if ( !off_15558B0 )
return 0;
v2 = *off_15558B0;
if ( !*off_15558B0 )
return 0;
while ( 1 )
{
attr_by_NID = X509_REQ_get_attr_by_NID(a1, v2, -1);
if ( attr_by_NID != -1 )
break;
v5 = *(_DWORD *)(v1 + 4);
v1 += 4;
v2 = v5;
if ( !v5 )
return 0;
}
attr = X509_REQ_get_attr(a1, attr_by_NID);
v8 = X509_ATTRIBUTE_get0_type(attr, 0);
if ( !v8 || *(_DWORD *)v8 != 16 )
return 0;
v9 = *(int **)(v8 + 8);
v10 = *((char **)v9 + 1);
return ASN1_item_d2i(nullptr, &v10, *v9, (__int64)&X509_EXTENSIONS_it);
}