//
// PEM_write from 0x822528 to 0x8225c0 (152 bytes)
//
// 1 xrefs:
// > ??> @ 0x653ac
//
// 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_write(int a1, const char *a2, const char *a3, int a4, int a5)
{
void *v9; // r0
_DWORD *v10; // r0
_DWORD *v11; // r5
int v12; // r4
v9 = BIO_s_file();
v10 = BIO_new((int)v9);
v11 = v10;
if ( v10 )
{
BIO_ctrl(v10, 106, 0, a1);
v12 = PEM_write_bio((int)v11, a2, a3, a4, a5);
BIO_free(v11);
return v12;
}
else
{
ERR_put_error(9, 113, 7, (int)"crypto/pem/pem_lib.c", 575);
return 0;
}
}