//
// sub_1005FCEF0 from 0x1005fcef0 to 0x1005fcfd8 (232 bytes)
//
// 1 xrefs:
// > sub_1005FE014 @ 0x1005fe31c
//
// 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
//
size_t __fastcall sub_1005FCEF0(const char *a1, char *a2, int a3, char *a4)
{
size_t result; // x0
char *v9; // x10
__int64 v10; // x12
char v11; // t1
__int64 v12; // x9
char *v13; // x8
sub_1005DA3A8((__int64)a1, "DEK-Info: ", 0x400u);
sub_1005DA3A8((__int64)a1, a2, 0x400u);
sub_1005DA3A8((__int64)a1, ",", 0x400u);
result = strlen(a1);
if ( (int)result + 2 * a3 <= 1023 )
{
if ( a3 < 1 )
{
v12 = 0;
}
else
{
v9 = (char *)&a1[(int)result + 1];
v10 = a3;
do
{
*(v9 - 1) = a0123456789abcd_7[(unsigned __int64)(unsigned __int8)*a4 >> 4];
v11 = *a4++;
*v9 = a0123456789abcd_7[v11 & 0xF];
--v10;
v9 += 2;
}
while ( v10 );
v12 = 2LL * a3;
}
v13 = (char *)&a1[v12 + (int)result];
*v13 = 10;
v13[1] = 0;
}
return result;
}