//
// sub_6B0B30 from 0x6b0b30 to 0x6b0e48 (792 bytes)
//
// 7 xrefs:
// > TIFFReadDirectory @ 0x6b118c
// > TIFFReadDirectory @ 0x6b199c
// > TIFFReadDirectory @ 0x6b1a94
// > TIFFReadDirectory @ 0x6b1ca0
// > sub_6B455C @ 0x6b7024
// > sub_6B70FC @ 0x6b71a0
// > sub_6B7304 @ 0x6b74a8
//
// 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_6B0B30(int a1, int a2, int a3, const char *a4, int a5)
{
int result; // r0
if ( a5 )
{
switch ( a2 )
{
case 1:
result = TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "Incorrect count for \"%s\"; tag ignored", a4);
break;
case 2:
result = TIFFWarningExt(*(_DWORD *)(a1 + 628), a3, "Incompatible type for \"%s\"; tag ignored", a4);
break;
case 3:
result = TIFFWarningExt(*(_DWORD *)(a1 + 628), a3, "IO error during reading of \"%s\"; tag ignored", a4);
break;
case 4:
result = TIFFWarningExt(*(_DWORD *)(a1 + 628), a3, "Incorrect value for \"%s\"; tag ignored", a4);
break;
case 5:
result = TIFFWarningExt(
*(_DWORD *)(a1 + 628),
a3,
"Cannot handle different values per sample for \"%s\"; tag ignored",
a4);
break;
case 6:
result = TIFFWarningExt(
*(_DWORD *)(a1 + 628),
a3,
"Sanity check on size of \"%s\" value failed; tag ignored",
a4);
break;
case 7:
result = TIFFWarningExt(*(_DWORD *)(a1 + 628), a3, "Out of memory reading of \"%s\"; tag ignored", a4);
break;
default:
LABEL_18:
result = _assert2();
break;
}
}
else
{
switch ( a2 )
{
case 1:
result = TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "Incorrect count for \"%s\"", a4);
break;
case 2:
result = TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "Incompatible type for \"%s\"", a4);
break;
case 3:
result = TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "IO error during reading of \"%s\"", a4);
break;
case 4:
result = TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "Incorrect value for \"%s\"", a4);
break;
case 5:
result = TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "Cannot handle different values per sample for \"%s\"", a4);
break;
case 6:
result = TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "Sanity check on size of \"%s\" value failed", a4);
break;
case 7:
result = TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "Out of memory reading of \"%s\"", a4);
break;
default:
goto LABEL_18;
}
}
return result;
}