//
// PEM_dek_info from 0xa36200 to 0xa362c8 (200 bytes)
//
// 3 xrefs:
// > PEM_ASN1_write_bio @ 0xa36d84
// > PEM_X509_INFO_write_bio @ 0xacf650
// > ??> @ 0x7ed8c
//
// 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:08 +0000
//
size_t __fastcall PEM_dek_info(char *a1, const char *a2, int a3, unsigned __int8 *a4)
{
size_t result; // r0
int v9; // r6
unsigned __int8 *v10; // r3
char *v11; // r1
unsigned __int8 *v12; // r12
unsigned int v13; // t1
OPENSSL_strlcat(a1, "DEK-Info: ", 0x400u);
OPENSSL_strlcat(a1, a2, 0x400u);
OPENSSL_strlcat(a1, ",", 0x400u);
result = strlen(a1);
v9 = 2 * a3;
if ( (int)(2 * a3 + result) < 1024 )
{
if ( a3 <= 0 )
{
v9 = 0;
}
else
{
v10 = a4;
v11 = &a1[result];
do
{
v12 = v10;
v13 = *v10++;
v11 += 2;
*(v11 - 2) = a0123456789abcd_10[v13 >> 4];
*(v11 - 1) = a0123456789abcd_10[*v12 & 0xF];
}
while ( v10 != &a4[a3] );
}
result += v9;
a1[result] = 10;
a1[result + 1] = 0;
}
return result;
}