//
// sub_7E0BA0 from 0x7e0ba0 to 0x7e0ce0 (320 bytes)
//
// 1 xrefs:
// > ??> @ 0xa30c64
//
// 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_7E0BA0(int a1, int a2, int a3, _DWORD *a4)
{
_DWORD *v7; // r3
int v8; // r6
int v9; // r0
_DWORD **v10; // r5
_DWORD *v11; // r0
int v12; // [sp+Ch] [bp-Ch] BYREF
_DWORD *v13; // [sp+10h] [bp-8h] BYREF
_DWORD **v14; // [sp+14h] [bp-4h] BYREF
switch ( a2 )
{
case 1:
if ( a3 )
return 1;
PKCS7_SIGNER_INFO_get0_algs(a4, 0, &v13, &v14);
v7 = v13;
if ( !v13 )
return -1;
goto LABEL_8;
case 3:
*a4 = 672;
return 2;
case 5:
if ( a3 )
return 1;
CMS_SignerInfo_get0_algs(a4, 0, 0, &v13, &v14);
v7 = v13;
if ( !v13 )
return -1;
LABEL_8:
if ( !*v7 )
return -1;
v8 = OBJ_obj2nid(*v7);
if ( !v8 )
return -1;
v9 = EVP_PKEY_id(a1);
if ( !OBJ_find_sigid_by_algs(&v12, v8, v9) )
return -1;
v10 = v14;
v11 = (_DWORD *)OBJ_nid2obj(v12);
X509_ALGOR_set0(v10, v11, -1, a3);
return 1;
case 8:
*a4 = -1;
return 1;
default:
return -2;
}
}