//
// TIFFRegisterCODEC from 0xc2f078 to 0xc2f118 (160 bytes)
//
// 1 xrefs:
// > ??> @ 0x97068
//
// 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
//
char *__fastcall TIFFRegisterCODEC(__int16 a1, char *a2, __int64 a3)
{
size_t v6; // x0
char *v7; // x0
__int64 v8; // x19
char *v9; // x20
char *v10; // x0
v6 = strlen(a2);
v7 = (char *)TIFFmalloc(v6 + 41);
v8 = (__int64)v7;
if ( v7 )
{
v9 = v7 + 16;
v10 = v7 + 40;
*(_QWORD *)(v8 + 16) = v10;
*(_QWORD *)(v8 + 8) = v8 + 16;
strcpy(v10, a2);
*(_WORD *)(v8 + 24) = a1;
*(_QWORD *)(v8 + 32) = a3;
*(_QWORD *)v8 = qword_1247860;
qword_1247860 = v8;
}
else
{
v9 = nullptr;
TIFFErrorExt(0, "TIFFRegisterCODEC", "No space to register compression scheme %s", a2);
}
return v9;
}