//
// CMS_get0_eContentType from 0x875344 to 0x8753fc (184 bytes)
//
// 2 xrefs:
// > SMIME_write_CMS @ 0x874448
// > ??> @ 0x6a2ec
//
// 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 CMS_get0_eContentType(int *a1)
{
char *v2; // r0
int v4; // r3
v2 = OBJ_obj2nid(*a1);
if ( v2 == (_BYTE *)&dword_18 + 1 )
goto LABEL_13;
if ( (int)v2 <= 25 )
{
if ( v2 != (_BYTE *)&dword_14 + 2 )
{
if ( v2 != (_BYTE *)&dword_14 + 3 )
goto LABEL_6;
goto LABEL_9;
}
LABEL_13:
v4 = *(_DWORD *)(a1[1] + 8);
goto LABEL_10;
}
if ( v2 == (_BYTE *)&dword_CC + 1 )
{
v4 = *(_DWORD *)(a1[1] + 20);
goto LABEL_10;
}
if ( v2 == (_BYTE *)&stru_30C.st_value + 2 )
{
LABEL_9:
v4 = *(_DWORD *)(a1[1] + 12);
goto LABEL_10;
}
if ( v2 != (_BYTE *)&dword_18 + 2 )
{
LABEL_6:
ERR_put_error(46, 130, 152, (int)"crypto/cms/cms_lib.c", 218);
return 0;
}
v4 = *(_DWORD *)(a1[1] + 4);
LABEL_10:
if ( v4 )
return *(_DWORD *)v4;
else
return 0;
}