//
// cms_pkey_get_ri_type from 0x109cc0c to 0x109cc6c (96 bytes)
//
// 2 xrefs:
// > CMS_add1_recipient_cert @ 0x109ccbc
// > ??> @ 0xe9e60
//
// 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:17:29 +0000
//
__int64 __fastcall cms_pkey_get_ri_type(__int64 a1)
{
__int64 v1; // x1
int (__fastcall *v2)(__int64, __int64, _QWORD, unsigned int *); // x4
unsigned int v4; // [xsp+1Ch] [xbp+1Ch] BYREF
v1 = *(_QWORD *)(a1 + 16);
if ( !v1 )
return 0;
v2 = *(int (__fastcall **)(__int64, __int64, _QWORD, unsigned int *))(v1 + 176);
if ( !v2 )
return 0;
if ( v2(a1, 8, 0, &v4) <= 0 )
return 0;
return v4;
}