//
// sub_6ED204 from 0x6ed204 to 0x6ed34c (328 bytes)
//
// 2 xrefs:
// > TIFFPrintDirectory @ 0x6ec020
// > _TIFFprintAscii @ 0x6ed1f8
//
// 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 sub_6ED204(int result, unsigned __int8 *a2, int a3)
{
FILE *stream; // [sp+Ch] [bp-10h]
unsigned __int8 *i; // [sp+14h] [bp-8h]
stream = (FILE *)result;
while ( a3 > 0 && *a2 )
{
if ( isprint(*a2) )
{
result = fputc(*a2, stream);
}
else
{
for ( i = "\tt\bb\rr\nn\vv"; *i; ++i )
{
if ( *i++ == *a2 )
break;
}
if ( *i )
result = fprintf(stream, "\\%c", *i);
else
result = fprintf(stream, "\\%03o", *a2);
}
++a2;
--a3;
}
return result;
}