//
// pem_check_suffix from 0x1046a8c to 0x1046b38 (172 bytes)
//
// 5 xrefs:
// > PEM_bytes_read_bio @ 0x1046cb0
// > PEM_bytes_read_bio @ 0x1046e9c
// > PEM_read_bio_PrivateKey @ 0x10471b4
// > PEM_read_bio_Parameters @ 0x10473e8
// > ??> @ 0x6ec38
//
// 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:16:33 +0000
//
__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);
}