// // png_set_hIST from 0xbe38c4 to 0xbe3994 (208 bytes) // // 2 xrefs: // > png_handle_hIST @ 0xbe09ec // > @ 0xb5f38 // // 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 // __int64 __fastcall png_set_hIST(__int64 result, __int64 a2, const void *a3) { __int64 v5; // x20 void *v6; // x0 int v7; // w20 if ( result && a2 ) { if ( (unsigned __int16)(*(_WORD *)(a2 + 32) - 1) > 0xFFu ) { return png_warning(result, "Invalid palette size, hIST allocation skipped"); } else { v5 = result; png_free_data(result, a2, 8, 0); v6 = png_malloc_warn(v5, 0x200u); *(_QWORD *)(a2 + 240) = v6; if ( v6 ) { v7 = *(unsigned __int16 *)(a2 + 32); *(_DWORD *)(a2 + 284) |= 8u; if ( v7 ) memcpy(v6, a3, 2 * ((unsigned int)(v7 - 1) + 1LL)); result = *(_DWORD *)(a2 + 8) | 0x40u; *(_DWORD *)(a2 + 8) = result; } else { return png_warning(v5, "Insufficient memory for hIST chunk data"); } } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source