//
// sub_6EAEE4 from 0x6eaee4 to 0x6eb35c (1144 bytes)
//
// 1 xrefs:
// > TIFFPrintDirectory @ 0x6ed044
//
// 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_6EAEE4(FILE *a1, int a2, unsigned int a3, const char *a4)
{
unsigned int i; // [sp+14h] [bp-10h]
fprintf(a1, " %s: ", *(const char **)(a2 + 28));
for ( i = 0; i < a3; ++i )
{
if ( *(_DWORD *)(a2 + 8) == 1 )
{
fprintf(a1, "%u", (unsigned __int8)a4[i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 7 )
{
fprintf(a1, "0x%x", (unsigned __int8)a4[i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 6 )
{
fprintf(a1, "%d", a4[i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 3 )
{
fprintf(a1, "%u", *(unsigned __int16 *)&a4[2 * i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 8 )
{
fprintf(a1, "%d", *(__int16 *)&a4[2 * i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 4 )
{
fprintf(a1, "%lu", *(_DWORD *)&a4[4 * i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 9 )
{
fprintf(a1, "%ld", *(_DWORD *)&a4[4 * i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 13 )
{
fprintf(a1, "0x%lx", *(_DWORD *)&a4[4 * i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 5 || *(_DWORD *)(a2 + 8) == 10 || *(_DWORD *)(a2 + 8) == 11 )
goto LABEL_29;
if ( *(_DWORD *)(a2 + 8) == 16 )
{
fprintf(a1, "%llu", *(_QWORD *)&a4[8 * i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 17 )
{
fprintf(a1, "%lld", *(_QWORD *)&a4[8 * i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 18 )
{
fprintf(a1, "0x%llx", *(_QWORD *)&a4[8 * i]);
goto LABEL_35;
}
if ( *(_DWORD *)(a2 + 8) == 11 )
{
LABEL_29:
fprintf(a1, "%f", *(float *)&a4[4 * i]);
}
else
{
if ( *(_DWORD *)(a2 + 8) != 12 )
{
if ( *(_DWORD *)(a2 + 8) == 2 )
fputs(a4, a1);
else
fwrite("", 1u, 0x24u, a1);
return fputc(10, a1);
}
fprintf(a1, "%f", *(double *)&a4[8 * i]);
}
LABEL_35:
if ( a3 - 1 > i )
fputc(44, a1);
}
return fputc(10, a1);
}