//
// EVP_EncodeFinal from 0xe60fa4 to 0xe61004 (96 bytes)
//
// 3 xrefs:
// > PEM_write_bio @ 0xdc7900
// > sub_E7E9C4 @ 0xe7ebf8
// > ??> @ 0x39ac8
//
// 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
//
unsigned __int64 __fastcall EVP_EncodeFinal(unsigned __int64 result, unsigned __int64 a2, _DWORD *a3)
{
__int64 v3; // x3
_DWORD *v4; // x19
LODWORD(v3) = *(_DWORD *)result;
v4 = (_DWORD *)result;
if ( *(_DWORD *)result )
{
result = EVP_EncodeBlock(a2, (unsigned __int8 *)(result + 8), v3);
*(_BYTE *)(a2 + (unsigned int)result) = 10;
v3 = (unsigned int)(result + 1);
*(_BYTE *)(a2 + v3) = 0;
*v4 = 0;
}
*a3 = v3;
return result;
}