//
// sub_8B5084 from 0x8b5084 to 0x8b51b4 (304 bytes)
//
// 1 xrefs:
// > TIFFVSetField @ 0x8b543c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:03:55 +0000
//
int __fastcall sub_8B5084(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_C22F0C;
else
v2 = "pseudo-";
TIFFErrorExt(a1[157], "TIFFSetField", "%s: Unknown %stag %u", *a1, v2, a2);
return 0;
}
}