//
// cms_pkey_get_ri_type from 0xa88ba4 to 0xa88bf8 (84 bytes)
//
// 2 xrefs:
// > CMS_add1_recipient_cert @ 0xa88c44
// > ??> @ 0x83c2c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:53 +0000
//
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;
}