//
// _TIFFsetByteArray from 0xea62dc to 0xea6348 (108 bytes)
//
// 1 xrefs:
// > ??> @ 0xf8aa0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:11:09 +0000
//
void __fastcall TIFFsetByteArray(void **a1, void *a2, size_t byte_count)
{
void *v4; // x0
size_t v5; // x20
void *v6; // x0
int v7; // [xsp+20h] [xbp+20h]
void *v8; // [xsp+28h] [xbp+28h]
void *v9; // [xsp+28h] [xbp+28h]
v4 = *a1;
if ( v4 )
{
v7 = byte_count;
v8 = a2;
TIFFfree(v4);
LODWORD(byte_count) = v7;
a2 = v8;
*a1 = nullptr;
}
v9 = a2;
if ( a2 )
{
v5 = (unsigned int)byte_count;
v6 = TIFFmalloc((unsigned int)byte_count);
*a1 = v6;
if ( v6 )
TIFFmemcpy(v6, v9, v5);
}
}