//
// sub_6A5004 from 0x6a5004 to 0x6a5134 (304 bytes)
//
// 1 xrefs:
// > TIFFVSetField @ 0x6a53bc
//
// 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_6A5004(const char **a1, unsigned int a2)
{
const char *v2; // r3
int v7; // [sp+14h] [bp-8h]
v7 = TIFFFindField(a1, a2, 0);
if ( v7 )
{
if ( a2 == 257 || ((unsigned int)a1[3] & 0x40) == 0 || *(_BYTE *)(v7 + 26) )
{
return 1;
}
else
{
TIFFErrorExt(
a1[157],
"TIFFSetField",
"%s: Cannot modify tag \"%s\" while writing",
*a1,
*(const char **)(v7 + 28));
return 0;
}
}
else
{
if ( a2 <= 0xFFFF )
v2 = (const char *)&unk_9E0974;
else
v2 = "pseudo-";
TIFFErrorExt(a1[157], "TIFFSetField", "%s: Unknown %stag %u", *a1, v2, a2);
return 0;
}
}