//
// pem_check_suffix from 0x822e18 to 0x822e78 (96 bytes)
//
// 5 xrefs:
// > PEM_bytes_read_bio @ 0x82314c
// > PEM_bytes_read_bio @ 0x8231d0
// > PEM_read_bio_PrivateKey @ 0x823574
// > PEM_read_bio_Parameters @ 0x8237a4
// > ??> @ 0x653fc
//
// 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 pem_check_suffix(const char *a1, const char *a2)
{
signed int v4; // r4
size_t v5; // r0
const char *v6; // r4
int result; // r0
v4 = strlen(a1);
v5 = strlen(a2);
if ( v4 <= (int)(v5 + 1) )
return 0;
v6 = &a1[v4 - v5];
result = strcmp(v6, a2);
if ( result )
return 0;
if ( *(v6 - 1) == 32 )
return v6 - 1 - a1;
return result;
}