//
// pem_check_suffix from 0xdc872c to 0xdc87d8 (172 bytes)
//
// 5 xrefs:
// > PEM_bytes_read_bio @ 0xdc8950
// > PEM_bytes_read_bio @ 0xdc8b3c
// > PEM_read_bio_PrivateKey @ 0xdc8e54
// > PEM_read_bio_Parameters @ 0xdc9088
// > ??> @ 0x4f3c8
//
// 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
//
__int64 __fastcall pem_check_suffix(const char *a1, const char *a2)
{
int v4; // w19
int v5; // w0
const char *v6; // x19
v4 = strlen(a1);
v5 = strlen(a2);
if ( v4 <= v5 + 1 )
return 0;
v6 = &a1[v4 - (__int64)v5];
if ( strcmp(v6, a2) )
return 0;
if ( *(v6 - 1) != 32 )
return 0;
return (unsigned int)((_DWORD)v6 - 1 - (_DWORD)a1);
}