//
// cms_pkey_get_ri_type from 0x873fa4 to 0x873ff8 (84 bytes)
//
// 2 xrefs:
// > CMS_add1_recipient_cert @ 0x874044
// > ??> @ 0x6a1ac
//
// 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_pkey_get_ri_type(int a1)
{
int v1; // r3
int (__fastcall *v2)(int, int, _DWORD, int *); // r12
int v4; // [sp+4h] [bp-Ch] BYREF
v1 = *(_DWORD *)(a1 + 12);
if ( !v1 )
return 0;
v2 = *(int (__fastcall **)(int, int, _DWORD, int *))(v1 + 92);
if ( !v2 )
return 0;
if ( v2(a1, 8, 0, &v4) > 0 )
return v4;
return 0;
}