//
// png_handle_tIME from 0x65e0b0 to 0x65e162 (178 bytes)
//
// 3 xrefs:
// > png_push_read_chunk @ 0x652b7c
// > png_read_info @ 0x65592e
// > png_read_end @ 0x657460
//
// 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 png_handle_tIME(_DWORD *a1, int a2, unsigned int a3)
{
int v4; // r3
int result; // r0
_BYTE v7[3]; // [sp+0h] [bp-14h] BYREF
__int16 v8; // [sp+3h] [bp-11h]
__int16 v9; // [sp+5h] [bp-Fh]
__int16 v10; // [sp+8h] [bp-Ch] BYREF
char v11; // [sp+Ah] [bp-Ah]
__int16 v12; // [sp+Bh] [bp-9h]
__int16 v13; // [sp+Dh] [bp-7h]
v4 = a1[77];
if ( (v4 & 1) == 0 )
png_chunk_error((int)a1, "missing IHDR");
if ( a2 && (*(_DWORD *)(a2 + 8) & 0x200) != 0 )
{
png_crc_finish(a1, a3);
return png_chunk_benign_error((int)a1, "duplicate");
}
else
{
if ( (v4 & 4) != 0 )
a1[77] = v4 | 8;
if ( a3 == 7 )
{
png_crc_read(a1, (int)v7, 7);
result = png_crc_finish(a1, 0);
if ( !result )
{
v10 = v7[1] + (v7[0] << 8);
v13 = v9;
v12 = v8;
v11 = v7[2];
return png_set_tIME(a1, a2, &v10);
}
}
else
{
png_crc_finish(a1, a3);
return png_chunk_benign_error((int)a1, "invalid");
}
}
return result;
}