// // png_set_hIST from 0x65fa00 to 0x65fa88 (136 bytes) // // 1 xrefs: // > png_handle_hIST @ 0x65da66 // // 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 // _WORD *__fastcall png_set_hIST(_WORD *result, int a2, int a3) { bool v3; // zf int v4; // r4 int v6; // r7 int v8; // r2 int v9; // r2 int v10; // r3 __int16 v11; // t1 v3 = a2 == 0; if ( a2 ) v3 = result == nullptr; v4 = v3; if ( !v3 ) { if ( (unsigned __int16)(*(_WORD *)(a2 + 20) - 1) > 0xFFu ) { return (_WORD *)png_warning((int)result, "Invalid palette size, hIST allocation skipped"); } else { v6 = (int)result; png_free_data((int)result, a2, 8, v4); result = png_malloc_warn(v6, 0x200u); *(_DWORD *)(a2 + 204) = result; if ( result ) { v8 = *(unsigned __int16 *)(a2 + 20); *(_DWORD *)(a2 + 232) |= 8u; if ( v8 ) { v9 = a3 - 2; v10 = v4; while ( 1 ) { v11 = *(_WORD *)(v9 + 2); v9 += 2; result[v10++] = v11; if ( *(unsigned __int16 *)(a2 + 20) <= v10 ) break; result = *(_WORD **)(a2 + 204); } } *(_DWORD *)(a2 + 8) |= 0x40u; } else { return (_WORD *)png_warning(v6, "Insufficient memory for hIST chunk data"); } } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source