input
stringlengths
16
454k
output
stringlengths
13
350k
function_name
stringlengths
1
100
repo_name
stringlengths
6
43
category
stringclasses
76 values
sample_id
stringlengths
22
88
decompiler
stringclasses
1 value
opt_level
stringclasses
1 value
void __cdecl adv_png_expand_1(unsigned int width, unsigned int height, unsigned __int8 *ptr) { unsigned __int8 *v3; unsigned __int8 v; unsigned int i; unsigned int j; unsigned __int8 *p8; unsigned __int8 *p1; p8 = &ptr[height * (width + 1) - 1]; p1 = &ptr[height * ((width ...
void adv_png_expand_1(unsigned width, unsigned height, unsigned char *ptr) { unsigned i, j; unsigned char *p8 = ptr + height * (width + 1) - 1; unsigned char *p1 = ptr + height * (width / 8 + 1) - 1; width /= 8; for (i = 0; i < height; ++i) { for (j = 0; j < width; ++j) { unsigned char v = *p1; ...
adv_png_expand_1
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl adv_png_expand_2(unsigned int width, unsigned int height, unsigned __int8 *ptr) { unsigned __int8 *v3; unsigned __int8 v; unsigned int i; unsigned int j; unsigned __int8 *p8; unsigned __int8 *p2; p8 = &ptr[height * (width + 1) - 1]; p2 = &ptr[height * ((width ...
void adv_png_expand_2(unsigned width, unsigned height, unsigned char *ptr) { unsigned i, j; unsigned char *p8 = ptr + height * (width + 1) - 1; unsigned char *p2 = ptr + height * (width / 4 + 1) - 1; width /= 4; for (i = 0; i < height; ++i) { for (j = 0; j < width; ++j) { unsigned char v = *p2; ...
adv_png_expand_2
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl adv_png_expand_4(unsigned int width, unsigned int height, unsigned __int8 *ptr) { unsigned __int8 *v3; unsigned __int8 v; unsigned int i; unsigned int j; unsigned __int8 *p8; unsigned __int8 *p4; p8 = &ptr[height * (width + 1) - 1]; p4 = &ptr[height * ((width ...
void adv_png_expand_4(unsigned width, unsigned height, unsigned char *ptr) { unsigned i, j; unsigned char *p8 = ptr + height * (width + 1) - 1; unsigned char *p4 = ptr + height * (width / 2 + 1) - 1; width /= 2; for (i = 0; i < height; ++i) { for (j = 0; j < width; ++j) { unsigned char v = *p4; ...
adv_png_expand_4
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_read(unsigned int *pix_width, unsigned int *pix_height, unsigned int *pix_pixel, unsigned __int8 **dat_ptr, unsigned int *dat_size, unsigned __int8 **pix_ptr, unsigned int *pix_scanline, unsigned __int8 **pal_ptr, unsigned int *pal_size, adv_...
adv_error adv_png_read(unsigned *pix_width, unsigned *pix_height, unsigned *pix_pixel, unsigned char **dat_ptr, unsigned *dat_size, unsigned char **pix_ptr, unsigned *pix_scanline, unsigned char **pal_ptr, unsigned *pal_size, ad...
adv_png_read
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_read_chunk(adv_fz *f, unsigned __int8 **data, unsigned int *size, unsigned int *type) { unsigned __int8 cl_0[4]; unsigned __int8 ct[4]; unsigned __int8 cc[4]; unsigned __int64 v10; v10 = __readfsqword(0x28u); if (fzread(cl_0, 4u, 1u, f) == 1) {...
adv_error adv_png_read_chunk(adv_fz *f, unsigned char **data, unsigned *size, unsigned *type) { unsigned char cl[4]; unsigned char ct[4]; unsigned char cc[4]; if (fzread(cl, 4, 1, f) != 1) { error_set("Error reading the chunk size"); goto err; } *size = be_uint32_read(...
adv_png_read_chunk
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_read_iend(adv_fz *f, const unsigned __int8 *data, unsigned int data_size, unsigned int type) { unsigned int typea; unsigned int data_sizea; const unsigned __int8 *dataa; adv_fz *fa; unsigned int ptr_size; unsigned __int8 *ptr; char buf[4]; un...
adv_error adv_png_read_iend(adv_fz *f, const unsigned char *data, unsigned data_size, unsigned type) { if (type == ADV_PNG_CN_IEND) return 0; if ((type & 0x20000000) == 0) { char buf[4]; be_uint32_write(buf, type); error_unsupported_set("Unsupported critical chunk '%c%c%...
adv_png_read_iend
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_read_ihdr(unsigned int *pix_width, unsigned int *pix_height, unsigned int *pix_pixel, unsigned __int8 **dat_ptr, unsigned int *dat_size, unsigned __int8 **pix_ptr, unsigned int *pix_scanline, unsigned __int8 **pal_ptr, uns...
adv_error adv_png_read_ihdr(unsigned *pix_width, unsigned *pix_height, unsigned *pix_pixel, unsigned char **dat_ptr, unsigned *dat_size, unsigned char **pix_ptr, unsigned *pix_scanline, unsigned char **pal_ptr, ...
adv_png_read_ihdr
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_read_rns(unsigned int *pix_width, unsigned int *pix_height, unsigned int *pix_pixel, unsigned __int8 **dat_ptr, unsigned int *dat_size, unsigned __int8 **pix_ptr, unsigned int *pix_scanline, unsigned __int8 **pal_ptr, unsigned...
adv_error adv_png_read_rns(unsigned *pix_width, unsigned *pix_height, unsigned *pix_pixel, unsigned char **dat_ptr, unsigned *dat_size, unsigned char **pix_ptr, unsigned *pix_scanline, unsigned char **pal_ptr, un...
adv_png_read_rns
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_read_signature(adv_fz *f) { unsigned __int8 signature[8]; unsigned __int64 v3; v3 = __readfsqword(0x28u); if (fzread(signature, 8u, 1u, f) == 1) { if (!memcmp(signature, PNG_Signature, 8u)) { return 0; } else { error_set("Invalid PNG signature"); return -1; ...
adv_error adv_png_read_signature(adv_fz *f) { unsigned char signature[8]; if (fzread(signature, 8, 1, f) != 1) { error_set("Error reading the signature"); return -1; } if (memcmp(signature, PNG_Signature, 8) != 0) { error_set("Invalid PNG signature"); return -1; } return 0; }
adv_png_read_signature
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl adv_png_unfilter_24(unsigned int width, unsigned int height, unsigned __int8 *p, unsigned int line) { unsigned __int8 *v4; unsigned int v5; unsigned int v6; int v7; unsigned __int8 v8; unsigned __int8 *pb; unsigned __int8 f; unsigned int i; unsigned int j;...
void adv_png_unfilter_24(unsigned width, unsigned height, unsigned char *p, unsigned line) { unsigned i, j; for (i = 0; i < height; ++i) { unsigned char f = *p++; if (f == 0) { p += width; } else if (f == 1) { p += 3; for (j = 3; j < width; ++j) { p[0...
adv_png_unfilter_24
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl adv_png_unfilter_32(unsigned int width, unsigned int height, unsigned __int8 *p, unsigned int line) { unsigned __int8 *v4; unsigned int v5; unsigned int v6; int v7; unsigned __int8 v8; unsigned __int8 *pb; unsigned __int8 f; unsigned int i; unsigned int j;...
void adv_png_unfilter_32(unsigned width, unsigned height, unsigned char *p, unsigned line) { unsigned i, j; for (i = 0; i < height; ++i) { unsigned char f = *p++; if (f == 0) { p += width; } else if (f == 1) { p += 4; for (j = 4; j < width; ++j) { p[0...
adv_png_unfilter_32
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl adv_png_unfilter_8(unsigned int width, unsigned int height, unsigned __int8 *p, unsigned int line) { unsigned __int8 *v4; unsigned int v5; unsigned int v6; int v7; unsigned __int8 v8; unsigned __int8 *pb; unsigned __int8 f; unsigned int i; unsigned int j; ...
void adv_png_unfilter_8(unsigned width, unsigned height, unsigned char *p, unsigned line) { unsigned i, j; for (i = 0; i < height; ++i) { unsigned char f = *p++; if (f == 0) { p += width; } else if (f == 1) { ++p; for (j = 1; j < width; ++j) { p[0] += ...
adv_png_unfilter_8
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_write(unsigned int pix_width, unsigned int pix_height, unsigned int pix_pixel, const unsigned __int8 *pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch, const unsi...
adv_error adv_png_write(unsigned pix_width, unsigned pix_height, unsigned pix_pixel, const unsigned char *pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch, const unsigned char *pal_ptr, unsigned pal_size, adv_bool fast, ...
adv_png_write
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_write_chunk(adv_fz *f, unsigned int type, const unsigned __int8 *data, unsigned int size, unsigned int *count) { crc_t crc; unsigned __int8 v[4]; unsigned __int64 v11; v11 = __readfsqword(0x28u); be_uint32_w...
adv_error adv_png_write_chunk(adv_fz *f, unsigned type, const unsigned char *data, unsigned size, unsigned *count) { unsigned char v[4]; unsigned crc; be_uint32_write(v, size); if (fzwrite(v, 4, 1, f) != 1) { error_set("Error writing the chunk siz...
adv_png_write_chunk
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_write_idat(unsigned int pix_width, unsigned int pix_height, unsigned int pix_pixel, const uint8 *pix_ptr, int pix_pixel_pitch, int pix_scanline_pi...
adv_error adv_png_write_idat(unsigned pix_width, unsigned pix_height, unsigned pix_pixel, const uint8 *pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch, adv_bool fast, adv_fz *f, unsigned *count) { uint8 *z_ptr; uint8 *r_ptr;...
adv_png_write_idat
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_write_iend(adv_fz *f, unsigned int *count) { if (adv_png_write_chunk(f, 0x49454E44u, 0, 0, count)) return -1; else return 0; }
adv_error adv_png_write_iend(adv_fz *f, unsigned *count) { if (adv_png_write_chunk(f, ADV_PNG_CN_IEND, 0, 0, count) != 0) return -1; return 0; }
adv_png_write_iend
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_write_ihdr(unsigned int pix_width, unsigned int pix_height, unsigned int pix_depth, unsigned int pix_type, adv_fz *f, unsigned int *count) { uin...
adv_error adv_png_write_ihdr(unsigned pix_width, unsigned pix_height, unsigned pix_depth, unsigned pix_type, adv_fz *f, unsigned *count) { uint8 ihdr[13]; be_uint32_write(ihdr, pix_width); be_uint32_write(ihdr + 4, pix_height); ihdr[8] = pix_depth; i...
adv_png_write_ihdr
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_write_raw(unsigned int pix_width, unsigned int pix_height, unsigned int pix_pixel, const unsigned __int8 *pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch, const unsigned __int8 *pal_ptr, unsigned int pal_size, const u...
adv_error adv_png_write_raw(unsigned pix_width, unsigned pix_height, unsigned pix_pixel, const unsigned char *pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch, const unsigned char *pal_ptr, unsigned pal_size, ...
adv_png_write_raw
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_write_rns(unsigned int pix_width, unsigned int pix_height, unsigned int pix_pixel, const unsigned __int8 *pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch, const unsigned __int8 *pal_ptr, unsigned int pal_size, const u...
adv_error adv_png_write_rns(unsigned pix_width, unsigned pix_height, unsigned pix_pixel, const unsigned char *pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch, const unsigned char *pal_ptr, unsigned pal_size, ...
adv_png_write_rns
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl adv_png_write_signature(adv_fz *f, unsigned int *count) { if (fzwrite(PNG_Signature, 8u, 1u, f) == 1) { if (count) *count += 8; return 0; } else { error_set("Error writing the signature"); return -1; } }
adv_error adv_png_write_signature(adv_fz *f, unsigned *count) { if (fzwrite(PNG_Signature, 8, 1, f) != 1) { error_set("Error writing the signature"); return -1; } if (count) *count += 8; return 0; }
adv_png_write_signature
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl build_decode_table(u32 *decode_table, const len_t *lens, const unsigned int num_syms, const u32 *decode_results, const unsigned int table_bits, const unsigned int max_codeword_len...
static bool build_decode_table(u32 decode_table[], const len_t lens[], const unsigned num_syms, const u32 decode_results[], const unsigned table_bits, const unsigned max_codeword_len, ...
build_decode_table
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl build_litlen_decode_table(libdeflate_decompressor *d, unsigned int num_litlen_syms, unsigned int num_offset_syms) { return build_decode_table(d->u.litlen_decode_table, d->u.precode_lens, num_litlen_s...
static bool build_litlen_decode_table(struct libdeflate_decompressor *d, unsigned num_litlen_syms, unsigned num_offset_syms) { STATIC_ASSERT(LITLEN_TABLEBITS == 10 && LITLEN_ENOUGH == 1334); return build_decode_table(d->u.litlen_decode_ta...
build_litlen_decode_table
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl build_offset_decode_table(libdeflate_decompressor *d, unsigned int num_litlen_syms, unsigned int num_offset_syms) { return build_decode_table( d->offset_decode_table, &d->u.precode_lens[num_litlen_syms], num_offset_...
static bool build_offset_decode_table(struct libdeflate_decompressor *d, unsigned num_litlen_syms, unsigned num_offset_syms) { STATIC_ASSERT(OFFSET_TABLEBITS == 8 && OFFSET_ENOUGH == 402); return build_decode_table(d->offset_decode_table,...
build_offset_decode_table
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl build_precode_decode_table(libdeflate_decompressor *d) { return build_decode_table(d->u.l.precode_decode_table, d->u.precode_lens, 0x13u, precode_decode_results, 7u, 7u, d->working_space); }
static bool build_precode_decode_table(struct libdeflate_decompressor *d) { STATIC_ASSERT(PRECODE_TABLEBITS == 7 && PRECODE_ENOUGH == 128); return build_decode_table(d->u.l.precode_decode_table, d->u.precode_lens, DEFLATE_NUM_PRECODE_SYMS, precode_decode_results, ...
build_precode_decode_table
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl build_tree(u32 *A, unsigned int sym_count) { unsigned int v2; unsigned int v3; unsigned int v4; unsigned int v5; unsigned int i; unsigned int b; unsigned int e; unsigned int m; unsigned int n; u32 freq_shifted; i = 0; b = 0; e = 0; do { if (i == sym_count || b != e && A[i] ...
static void build_tree(u32 A[], unsigned sym_count) { unsigned i = 0; unsigned b = 0; unsigned e = 0; do { unsigned m, n; u32 freq_shifted; if (i != sym_count && (b == e || (A[i] >> NUM_SYMBOL_BITS) <= (A[b] >> NUM_SYMBOL_BITS))) m = i++; else m = b++; if (i != sym_...
build_tree
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl compress_bzip2(const unsigned __int8 *in_data, unsigned int in_size, unsigned __int8 *out_data, unsigned int *out_size, int blocksize, int workfactor) { return (unsigned int)BZ2_bzBuffToBuffCompress( out_data...
bool compress_bzip2(const unsigned char *in_data, unsigned in_size, unsigned char *out_data, unsigned &out_size, int blocksize, int workfactor) { return BZ2_bzBuffToBuffCompress((char *)out_data, &out_size, (char *)(in_data), in_size, blocksize...
compress_bzip2
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl compress_deflate(shrink_t level, unsigned __int8 *out_data, unsigned int *out_size, const unsigned __int8 *in_data, unsigned int in_size) { unsigned int iter; int compression_level; int libz_level; unsigned __...
bool compress_deflate(shrink_t level, unsigned char *out_data, unsigned &out_size, const unsigned char *in_data, unsigned in_size) { if (level.level == shrink_insane) { ZopfliOptions opt_zopfli; unsigned char *data; size_t size; ZopfliInitOptions(&opt_zopfl...
compress_deflate
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl compress_deflate_libdeflate(const unsigned __int8 *in_data, unsigned int in_size, unsigned __int8 *out_data, unsigned int *out_size, int compre...
bool compress_deflate_libdeflate(const unsigned char *in_data, unsigned in_size, unsigned char *out_data, unsigned &out_size, int compression_level) { struct libdeflate_compressor *compressor; compressor = libdeflate_alloc_compressor(compression_lev...
compress_deflate_libdeflate
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl compress_deflate_zlib(const unsigned __int8 *in_data, unsigned int in_size, unsigned __int8 *out_data, unsigned int *out_size, int compression_level, int strategy, int mem_level) { int compression_window; z_stream stream; unsigned __int64 v11; v11 = __re...
bool compress_deflate_zlib(const unsigned char *in_data, unsigned in_size, unsigned char *out_data, unsigned &out_size, int compression_level, int strategy, int mem_level) { z_stream stream; stream.next_in = const_cast<unsigned char *>(in_data); stream.avail_...
compress_deflate_zlib
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl compress_rfc1950_libdeflate(const unsigned __int8 *in_data, unsigned int in_size, unsigned __int8 *out_data, unsigned int *out_size, int compre...
bool compress_rfc1950_libdeflate(const unsigned char *in_data, unsigned in_size, unsigned char *out_data, unsigned &out_size, int compression_level) { struct libdeflate_compressor *compressor; compressor = libdeflate_alloc_compressor(compression_lev...
compress_rfc1950_libdeflate
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl compress_rfc1950_zlib(const unsigned __int8 *in_data, unsigned int in_size, unsigned __int8 *out_data, unsigned int *out_size, int compression_level, int strategy, int mem_level) { unsigned int compression_window; z_stream stream; unsigned __int64 v11; v...
bool compress_rfc1950_zlib(const unsigned char *in_data, unsigned in_size, unsigned char *out_data, unsigned &out_size, int compression_level, int strategy, int mem_level) { z_stream stream; stream.next_in = const_cast<unsigned char *>(in_data); stream.avail_...
compress_rfc1950_zlib
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl compress_zlib(shrink_t level, unsigned __int8 *out_data, unsigned int *out_size, const unsigned __int8 *in_data, unsigned int in_size) { unsigned int iter; unsigned int v6; int sz_passes; int libz_level; unsigned __i...
bool compress_zlib(shrink_t level, unsigned char *out_data, unsigned &out_size, const unsigned char *in_data, unsigned in_size) { if (level.level == shrink_insane) { ZopfliOptions opt_zopfli; unsigned char *data; size_t size; ZopfliInitOptions(&opt_zopfli); opt_zopfli.numiterat...
compress_zlib
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl compressed_done(adv_fz *f) { inflateEnd(&f->z); free(f->zbuffer); }
static void compressed_done(adv_fz *f) { inflateEnd(&f->z); free(f->zbuffer); }
compressed_done
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl compressed_init(adv_fz *f) { memset(&f->z, 0, sizeof(f->z)); f->z.zalloc = 0; f->z.zfree = 0; f->z.opaque = 0; f->z.next_in = 0; f->z.avail_in = 0; f->z.next_out = 0; f->z.avail_out = 0; f->zbuffer = (unsigned __int8 *)malloc(0x1001u); f->remaining = f->real_size; if ((unsigned int)in...
static void compressed_init(adv_fz *f) { int err; memset(&f->z, 0, sizeof(f->z)); f->z.zalloc = 0; f->z.zfree = 0; f->z.opaque = 0; f->z.next_in = 0; f->z.avail_in = 0; f->z.next_out = 0; f->z.avail_out = 0; f->zbuffer = (unsigned char *)malloc(INFLATE_INPUT_BUFFER_MAX + 1); f->remaining = f->re...
compressed_init
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl compute_length_counts(u32 *A, unsigned int root_idx, unsigned int *len_counts, unsigned int max_codeword_len) { unsigned int len; int node; u32 len_0; for (len = 0; len <= max_codeword_len; ++len) len_counts[len] = 0; len_...
static void compute_length_counts(u32 A[restrict], unsigned root_idx, unsigned len_counts[restrict], unsigned max_codeword_len) { unsigned len; int node; for (len = 0; len <= max_codeword_len; len++) len_counts[len] = 0; len_counts[1] = 2;...
compute_length_counts
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void convert_f(adv_fz *f_in, adv_fz *f_out) { unsigned int dat_size; unsigned int pix_pixel; unsigned int pix_width; unsigned int pix_height; unsigned int pal_size; unsigned int rns_size; unsigned int pix_scanline; unsigned char *dat_ptr; unsigned char *pal_ptr; unsigned char *rns_ptr; unsigned ch...
void convert_f(adv_fz *f_in, adv_fz *f_out) { unsigned char *dat_ptr; unsigned dat_size; unsigned pix_pixel; unsigned pix_width; unsigned pix_height; unsigned char *pal_ptr; unsigned pal_size; unsigned char *rns_ptr; unsigned rns_size; unsigned char *pix_ptr; unsigned pix_scanline; if (adv_png_...
convert_f
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl cpuid(u32 leaf, u32 subleaf, u32 *a, u32 *b, u32 *c, u32 *d) { _RAX = leaf; __asm { cpuid } *a = _RAX; *b = _RBX; *c = _RCX; *d = _RDX; }
static inline void cpuid(u32 leaf, u32 subleaf, u32 *a, u32 *b, u32 *c, u32 *d) { __asm__(".ifnc %%ebx, %1; mov %%ebx, %1; .endif\n" "cpuid \n" ".ifnc %%ebx, %1; xchg %%ebx, %1; .endif\n" : "=a"(*a), EBX_CONSTRAINT(*b), "=c"(*c),...
cpuid
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
u32 __cdecl crc32_slice1(u32 remainder, const u8 *buffer, size_t nbytes) { size_t i; for (i = 0; i < nbytes; ++i) remainder = (remainder >> 8) ^ crc32_table[(unsigned __int8)(buffer[i] ^ remainder)]; return remainder; }
static u32 crc32_slice1(u32 remainder, const u8 *buffer, size_t nbytes) { size_t i; STATIC_ASSERT(ARRAY_LEN(crc32_table) >= 0x100); for (i = 0; i < nbytes; i++) remainder = crc32_update_byte(remainder, buffer[i]); return remainder; }
crc32_slice1
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
u32 __cdecl crc32_slice8(u32 remainder, const u8 *buffer, size_t nbytes) { u32 v1; u32 v2; const u8 *p; const u8 *end; const u8 *end64; p = buffer; end = &buffer[nbytes]; while (((unsigned __int8)p & 7) != 0 && p != end) remainder = (remainder >> 8) ^ crc32_table[(unsigned __int8)(*p++ ^ re...
static u32 crc32_slice8(u32 remainder, const u8 *buffer, size_t nbytes) { const u8 *p = buffer; const u8 *end = buffer + nbytes; const u8 *end64; STATIC_ASSERT(ARRAY_LEN(crc32_table) >= 0x800); for (; ((uintptr_t)p & 7) && p != end; p++) remainder = crc32_update_byte(remainder, *p); end64 = p + ((end...
crc32_slice8
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl data_free(unsigned __int8 *data) { free(data); }
void data_free(unsigned char *data) { free(data); }
data_free
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl decompress_bzip2(const unsigned __int8 *in_data, unsigned int in_size, unsigned __int8 *out_data, unsigned int out_size) { BOOL v4; unsigned int size; unsigned __int64 v8; v8 = __readfsqword(0x28u); size = out_size; if ((unsigned int)...
bool decompress_bzip2(const unsigned char *in_data, unsigned in_size, unsigned char *out_data, unsigned out_size) { unsigned size = out_size; if (BZ2_bzBuffToBuffDecompress((char *)out_data, &size, (char *)in_data, in_size, 0, 0) != BZ_OK) return false; ...
decompress_bzip2
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl decompress_deflate_zlib(const unsigned __int8 *in_data, unsigned int in_size, unsigned __int8 *out_data, unsigned int out_size) { unsigned __int8 dummy; int r; z_stream stream; unsigned __...
bool decompress_deflate_zlib(const unsigned char *in_data, unsigned in_size, unsigned char *out_data, unsigned out_size) { z_stream stream; int r; stream.next_in = const_cast<unsigned char *>(in_data); stream.avail_in = in_size; stream.next_out = out_data; stream.avail_out = ou...
decompress_deflate_zlib
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl decompress_rfc1950_zlib(const unsigned __int8 *in_data, unsigned int in_size, unsigned __int8 *out_data, unsigned int out_size) { BOOL v4; unsigned __int64 size[2]; size[1] = __readfsqword(...
bool decompress_rfc1950_zlib(const unsigned char *in_data, unsigned in_size, unsigned char *out_data, unsigned out_size) { unsigned long size = out_size; if (uncompress(out_data, &size, in_data, in_size) != Z_OK) return false; if (size != out_size) return false; return tr...
decompress_rfc1950_zlib
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_adjust_costs(libdeflate_compressor *c) { unsigned int i; unsigned int ia; unsigned int ib; for (i = 0; i <= 0xFF; ++i) c->p.n.costs.literal[i] += (signed int)(66 - c->p.n.costs.literal[i]) >> 1; for (ia = 3; ia <= 0x102; ++ia) c->p.n.costs.length[ia] += (signed int)(8 * d...
static void deflate_adjust_costs(struct libdeflate_compressor *c) { unsigned i; for (i = 0; i < DEFLATE_NUM_LITERALS; i++) deflate_adjust_cost(&c->p.n.costs.literal[i], deflate_default_literal_cost(i)); for (i = DEFLATE_MIN_MATCH_LEN; i <= DEFLATE_MAX_MATCH_LEN; i++) deflate_adju...
deflate_adjust_costs
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
size_t __cdecl deflate_compress_greedy(libdeflate_compressor *c, const u8 *in, size_t in_nbytes, u8 *out, size_t out_nbytes_avail) { unsigned int nice_match_length; char v6; signed __int64 v7; int v8; unsigned int max_search_depth; ...
static size_t deflate_compress_greedy(struct libdeflate_compressor *restrict c, const u8 *restrict in, size_t in_nbytes, u8 *restrict out, size_t out_nbytes_avail) { const u8 *in_next = in; const u8 *in...
deflate_compress_greedy
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
size_t __cdecl deflate_compress_lazy(libdeflate_compressor *c, const u8 *in, size_t in_nbytes, u8 *out, size_t out_nbytes_avail) { unsigned int nice_match_length; char v6; signed __int64 v7; int v8; unsigned int max_search_depth; __in...
static size_t deflate_compress_lazy(struct libdeflate_compressor *restrict c, const u8 *restrict in, size_t in_nbytes, u8 *restrict out, size_t out_nbytes_avail) { const u8 *in_next = in; const u8 *in_end = in_next + in_nbytes; struct deflate...
deflate_compress_lazy
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
size_t __cdecl deflate_compress_near_optimal(libdeflate_compressor *c, const u8 *in, size_t in_nbytes, u8 *out, size_t out_nbytes_avail) { size_t v6; unsigned int nice_match_length; signed __int64 v8; signed __int64 v9; ...
static size_t deflate_compress_near_optimal(struct libdeflate_compressor *restrict c, const u8 *restrict in, size_t in_nbytes, u8 *restrict out, size_t out_nbytes_avail) { const u8 *in_next = in; const u8 *in_end = in_next + in_nbytes; struct deflate_out...
deflate_compress_near_optimal
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
unsigned int __cdecl deflate_compute_precode_items(const u8 *lens, const unsigned int num_lens, u32 *precode_freqs, unsigned int *precode_items) { unsigned int v4; unsigned int *v5; unsigned int v6; unsigned int *v7; unsigned int *v8; unsigned int v9; unsigned int *v10; uns...
static unsigned deflate_compute_precode_items(const u8 lens[restrict], const unsigned num_lens, u32 precode_freqs[restrict], unsigned precode_items[restrict]) { unsigned *itemptr; unsigned run_start; unsigned run_end; unsigned extra_bits; u8 len; ...
deflate_compute_precode_items
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_find_min_cost_path(libdeflate_compressor *c, const u32 block_length, const lz_match *cache_ptr) { u32 best_cost_to_end; unsigned int len; unsigned int num_matches; unsigned int offset; u32 offset_cost; defla...
static void deflate_find_min_cost_path(struct libdeflate_compressor *c, const u32 block_length, const struct lz_match *cache_ptr) { struct deflate_optimum_node *end_node = &c->p.n.optimum_nodes[block_length]; struct deflate_optimum_node *...
deflate_find_min_cost_path
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_flush_block(libdeflate_compressor *c, deflate_output_bitstream *os, const u8 *block_begin, u32 block_length, bool is_final_block, bool use_item_list) { u32 v6; u32 dynamic_cost; u32 dynamic_cost...
static void deflate_flush_block(struct libdeflate_compressor *restrict c, struct deflate_output_bitstream *restrict os, const u8 *restrict block_begin, u32 block_length, bool is_final_block, b...
deflate_flush_block
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
u32 __cdecl deflate_flush_output(deflate_output_bitstream *os) { bitbuf_t bitbuf; u8 *next; if (os->next == os->end) return 0; while ((int)os->bitcount > 0) { bitbuf = os->bitbuf; next = os->next; os->next = next + 1; *next = bitbuf; os->bitcount -= 8; os->bitbuf >>= 8; } return...
static u32 deflate_flush_output(struct deflate_output_bitstream *os) { if (os->next == os->end) return 0; while ((int)os->bitcount > 0) { *os->next++ = os->bitbuf; os->bitcount -= 8; os->bitbuf >>= 8; } return os->next - os->begin; }
deflate_flush_output
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_init_offset_slot_fast(libdeflate_compressor *c) { unsigned int offset_slot; unsigned int offset; unsigned int offset_end; for (offset_slot = 0; offset_slot <= 0x1D; ++offset_slot) { offset = deflate_offset_slot_base[offset_slot]; offset_end = (1 << deflate_extra_offset_bits[offset_...
static void deflate_init_offset_slot_fast(struct libdeflate_compressor *c) { unsigned offset_slot; unsigned offset; unsigned offset_end; for (offset_slot = 0; offset_slot < ARRAY_LEN(deflate_offset_slot_base); offset_slot++) { offset = deflate_offset_slot_base[offset_slot]; #if USE_FULL_OFFSET_SLOT_...
deflate_init_offset_slot_fast
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_init_output(deflate_output_bitstream *os, void *buffer, size_t size) { os->bitbuf = 0; os->bitcount = 0; os->begin = (u8 *)buffer; os->next = os->begin; os->end = &os->begin[size - 8]; }
static void deflate_init_output(struct deflate_output_bitstream *os, void *buffer, size_t size) { os->bitbuf = 0; os->bitcount = 0; os->begin = buffer; os->next = os->begin; os->end = os->begin + size - OUTPUT_END_PADDING; }
deflate_init_output
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_init_static_codes(libdeflate_compressor *c) { unsigned int i; unsigned int ia; for (i = 0; i <= 0x8F; ++i) c->freqs.litlen[i] = 2; while (i <= 0xFF) c->freqs.litlen[i++] = 1; while (i <= 0x117) c->freqs.litlen[i++] = 4; while (i <= 0x11F) c->freqs.litlen[i++] = 2; for...
static void deflate_init_static_codes(struct libdeflate_compressor *c) { unsigned i; for (i = 0; i < 144; i++) c->freqs.litlen[i] = 1 << (9 - 8); for (; i < 256; i++) c->freqs.litlen[i] = 1 << (9 - 9); for (; i < 280; i++) c->freqs.litlen[i] = 1 << (9 - 7); for (; i < 288; i++) c->freqs.litle...
deflate_init_static_codes
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_make_huffman_code(unsigned int num_syms, unsigned int max_codeword_len, const u32 *freqs, u8 *lens, u32 *codewords) { unsigned int sym; make_canonical_huffman_code(num_syms, max...
static void deflate_make_huffman_code(unsigned num_syms, unsigned max_codeword_len, const u32 freqs[], u8 lens[], u32 codewords[]) { unsigned sym; make_canonical_huffman_code(num_syms, max_codeword_len...
deflate_make_huffman_code
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_make_huffman_codes(const deflate_freqs *freqs, deflate_codes *codes) { deflate_make_huffman_code(0x120u, 0xEu, freqs->litlen, codes->lens.litlen, codes->codewords.litlen); deflate_make_huffman_code(0x20u, 0xFu, freqs->offset, c...
static void deflate_make_huffman_codes(const struct deflate_freqs *freqs, struct deflate_codes *codes) { STATIC_ASSERT(MAX_LITLEN_CODEWORD_LEN <= DEFLATE_MAX_LITLEN_CODEWORD_LEN); STATIC_ASSERT(MAX_OFFSET_CODEWORD_LEN <= DEFLATE_MAX_OFFSET_CODEWORD_LEN); deflate_make_huffma...
deflate_make_huffman_codes
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_optimize_block(libdeflate_compressor *c, u32 block_length, const lz_match *cache_ptr, bool is_first_block) { u32 v4; unsigned int num_passes_remaining; u32 i; num_passes_remaining = c->p.n.num_optim_passes; for (i = ...
static void deflate_optimize_block(struct libdeflate_compressor *c, u32 block_length, const struct lz_match *cache_ptr, bool is_first_block) { unsigned num_passes_remaining = c->p.n.num_optim_passes; u32 i; f...
deflate_optimize_block
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_precompute_huffman_header(libdeflate_compressor *c) { for (c->num_litlen_syms = 288; c->num_litlen_syms > 0x101 && !c->codes.lens.litlen[c->num_litlen_syms - 1]; --c->num_litlen_syms) { ; } for (c->num_offset_syms = 32; c->num_offset_syms > 1...
static void deflate_precompute_huffman_header(struct libdeflate_compressor *c) { for (c->num_litlen_syms = DEFLATE_NUM_LITLEN_SYMS; c->num_litlen_syms > 257; c->num_litlen_syms--) if (c->codes.lens.litlen[c->num_litlen_syms - 1] != 0) break; for (c->num_offset_syms = DEFLATE_NUM_OFFSET_SYMS; c->n...
deflate_precompute_huffman_header
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_reset_symbol_frequencies(libdeflate_compressor *c) { memset(&c->freqs, 0, sizeof(c->freqs)); }
static void deflate_reset_symbol_frequencies(struct libdeflate_compressor *c) { memset(&c->freqs, 0, sizeof(c->freqs)); }
deflate_reset_symbol_frequencies
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
u32 __cdecl deflate_reverse_codeword(u32 codeword, u8 len) { return ((unsigned __int16)(((16 * ((4 * ((2 * (_WORD)codeword) & 0xAAAA | (codeword >> 1) & 0x5555)) & 0xCCCC | (((2 * (_WORD)codeword) ...
static u32 deflate_reverse_codeword(u32 codeword, u8 len) { STATIC_ASSERT(DEFLATE_MAX_CODEWORD_LEN <= 16); codeword = ((codeword & 0x5555) << 1) | ((codeword & 0xAAAA) >> 1); codeword = ((codeword & 0x3333) << 2) | ((codeword & 0xCCCC) >> 2); codeword = ((codeword & 0x0F0F) << 4) | ((codeword & 0xF0F0) >> 4...
deflate_reverse_codeword
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_set_costs_from_codes(libdeflate_compressor *c, const deflate_lens *lens) { int v2; int v3; int v4; unsigned int i; unsigned int ia; unsigned int ib; unsigned int length_slot; for (i = 0; i <= 0xFF; ++i) { if (lens->litlen[i]) v2 =...
static void deflate_set_costs_from_codes(struct libdeflate_compressor *c, const struct deflate_lens *lens) { unsigned i; for (i = 0; i < DEFLATE_NUM_LITERALS; i++) { u32 bits = (lens->litlen[i] ? lens->litlen[i] : LITERAL_NOSTAT_BITS); c->p.n.costs.literal[i] = bits...
deflate_set_costs_from_codes
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_set_default_costs(libdeflate_compressor *c) { unsigned int i; unsigned int ia; unsigned int ib; for (i = 0; i <= 0xFF; ++i) c->p.n.costs.literal[i] = 66; for (ia = 3; ia <= 0x102; ++ia) c->p.n.costs.length[ia] = 8 * deflate_extra_length_bits[deflate_length_slot[ia]] + 60;...
static void deflate_set_default_costs(struct libdeflate_compressor *c) { unsigned i; for (i = 0; i < DEFLATE_NUM_LITERALS; i++) c->p.n.costs.literal[i] = deflate_default_literal_cost(i); for (i = DEFLATE_MIN_MATCH_LEN; i <= DEFLATE_MAX_MATCH_LEN; i++) c->p.n.costs.length[i] = deflate_default_len...
deflate_set_default_costs
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_tally_item_list(libdeflate_compressor *c, u32 block_length) { int v2; unsigned int length; unsigned int offset; deflate_optimum_node *cur_node; cur_node = c->p.n.optimum_nodes; do { length = cur_node->item & 0x1FF; offset = cur_node->item >>...
static void deflate_tally_item_list(struct libdeflate_compressor *c, u32 block_length) { struct deflate_optimum_node *cur_node = &c->p.n.optimum_nodes[0]; struct deflate_optimum_node *end_node = &c->p.n.optimum_nodes[block_length]; do { unsigned length = cur_node->item & OP...
deflate_tally_item_list
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_write_block_header(deflate_output_bitstream *os, bool is_final_block, unsigned int block_type) { signed __int64 v3; os->bitbuf |= (unsigned __int64)is_final_block << os->bitcount++; os->bitbuf |= (unsigned __int6...
static void deflate_write_block_header(struct deflate_output_bitstream *os, bool is_final_block, unsigned block_type) { deflate_add_bits(os, is_final_block, 1); deflate_add_bits(os, block_type, 2); deflate_flush_bits(os); }
deflate_write_block_header
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_write_end_of_block(deflate_output_bitstream *os, const deflate_codes *codes) { signed __int64 v2; int v3; v3 = codes->lens.litlen[256]; os->bitbuf |= (unsigned __int64)codes->codewords.litlen[256] << os->bitcount; os->bitcount += v3; *(_QWORD *)o...
static void deflate_write_end_of_block(struct deflate_output_bitstream *os, const struct deflate_codes *codes) { deflate_add_bits(os, codes->codewords.litlen[DEFLATE_END_OF_BLOCK], codes->lens.litlen[DEFLATE_END_OF_BLOCK]); deflate_flush_bits(os); }
deflate_write_end_of_block
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_write_huffman_header(libdeflate_compressor *c, deflate_output_bitstream *os) { signed __int64 v2; signed __int64 v3; signed __int64 v4; unsigned int i; unsigned int ia; unsigned int precode_item; unsigned int precode_sym; int v9; os->bitb...
static void deflate_write_huffman_header(struct libdeflate_compressor *c, struct deflate_output_bitstream *os) { unsigned i; deflate_add_bits(os, c->num_litlen_syms - 257, 5); deflate_add_bits(os, c->num_offset_syms - 1, 5); deflate_add_bits(os, c->num_explicit_lens - 4...
deflate_write_huffman_header
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_write_item_list(deflate_output_bitstream *os, const deflate_codes *codes, libdeflate_compressor *c, u32 block_length) { signed __int64 v4; signed __int64 v5; unsigned int length; u...
static void deflate_write_item_list(struct deflate_output_bitstream *os, const struct deflate_codes *codes, struct libdeflate_compressor *c, u32 block_length) { struct deflate_optimum_node *cur_node = &c->p.n.o...
deflate_write_item_list
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_write_sequences(deflate_output_bitstream *os, const deflate_codes *codes, const deflate_sequence *sequences, const u8 *in_next) { signed __int64 v4; u32 v5; u32 v6; signed __int64 ...
static void deflate_write_sequences(struct deflate_output_bitstream *restrict os, const struct deflate_codes *restrict codes, const struct deflate_sequence sequences[restrict], const u8 *restrict in_next) { const struct deflate_sequence *seq = se...
deflate_write_sequences
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_write_uncompressed_block(deflate_output_bitstream *os, const u8 *data, u16 len, bool is_final_block) { signed __int64 v4; deflate_write_block_header(os, is_final_block, 0); os->bitcount += -os->bitcou...
static void deflate_write_uncompressed_block(struct deflate_output_bitstream *os, const u8 *data, u16 len, bool is_final_block) { deflate_write_block_header(os, is_final_block, DEFLATE_BLOCKTYPE_UNCOMPRESSED); deflate_align_bitstream(os); if (4 + (u32...
deflate_write_uncompressed_block
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl deflate_write_uncompressed_blocks(deflate_output_bitstream *os, const u8 *data, u32 data_length, bool is_final_block) { unsigned __int16 v4; bool v5; u16 len; do { v4 = -1; if (data_length <= 0xFF...
static void deflate_write_uncompressed_blocks(struct deflate_output_bitstream *os, const u8 *data, u32 data_length, bool is_final_block) { do { u16 len = MIN(data_length, UINT16_MAX); deflate_write_uncompressed_block(os, data, len, ...
deflate_write_uncompressed_blocks
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
bool __cdecl do_end_block_check(block_split_stats *stats, u32 block_length) { u32 v2; int i; int ia; u32 total_delta; u32 expected; u32 actual; if (stats->num_observations) { total_delta = 0; for (i = 0; i <= 9; ++i) { expected = stats->observations[i] * stats->num_new_observations; a...
static bool do_end_block_check(struct block_split_stats *stats, u32 block_length) { int i; if (stats->num_observations > 0) { u32 total_delta = 0; for (i = 0; i < NUM_OBSERVATION_TYPES; i++) { u32 expected = stats->observations[i] * stats->num_new_observations; u...
do_end_block_check
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl error_cat_set(const char *prefix, adv_bool mode) { if (prefix) sncpy(error_cat_prefix_buffer, 0x800u, prefix); else error_cat_prefix_buffer[0] = 0; error_cat_flag = mode; }
void error_cat_set(const char *prefix, adv_bool mode) { if (prefix) sncpy(error_cat_prefix_buffer, sizeof(error_cat_prefix_buffer), prefix); else error_cat_prefix_buffer[0] = 0; error_cat_flag = mode; }
error_cat_set
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
const char *__cdecl error_get() { const unsigned __int16 *v0; while (error_desc_buffer[0]) { v0 = *__ctype_b_loc(); if ((v0[error_desc_buffer[strlen(error_desc_buffer) - 1]] & 0x2000) == 0) break; error_desc_buffer[strlen(error_desc_buffer) - 1] = 0; } return error_desc_buffer; }
const char *error_get(void) { while (error_desc_buffer[0] && isspace(error_desc_buffer[strlen(error_desc_buffer) - 1])) error_desc_buffer[strlen(error_desc_buffer) - 1] = 0; return error_desc_buffer; }
error_get
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl error_reset() { error_unsupported_flag = 0; error_desc_buffer[0] = 0; }
void error_reset(void) { error_unsupported_flag = 0; error_desc_buffer[0] = 0; }
error_reset
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void error_set(const char *text, ...) { __int64 v1; __int64 v2; __int64 v3; __int64 v4; __int64 v5; unsigned int size; char *p; va_list arg; unsigned __int64 v9; __int64 v10; __int64 v11; __int64 v12; __int64 v13; __int64 v14; va_start(arg, text); v3 = va_arg(arg, _QWORD); v1 = va_arg...
void error_set(const char *text, ...) { va_list arg; char *p; unsigned size; error_unsupported_flag = 0; if (error_cat_flag) { if (error_cat_prefix_buffer[0]) { sncat(error_desc_buffer, sizeof(error_desc_buffer), error_cat_prefix_buffer); sncat(error_desc_buffer, sizeof(error_des...
error_set
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_bool __cdecl error_unsupported_get() { return error_unsupported_flag; }
adv_bool error_unsupported_get(void) { return error_unsupported_flag; }
error_unsupported_get
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void error_unsupported_set(const char *text, ...) { __int64 v1; __int64 v2; __int64 v3; __int64 v4; __int64 v5; va_list arg; unsigned __int64 v7; __int64 v8; __int64 v9; __int64 v10; __int64 v11; __int64 v12; va_start(arg, text); v3 = va_arg(arg, _QWORD); v1 = va_arg(arg, _QWORD); v2 = ...
void error_unsupported_set(const char *text, ...) { va_list arg; error_unsupported_flag = 1; va_start(arg, text); vsnprintf(error_desc_buffer, sizeof(error_desc_buffer), text, arg); #ifndef USE_ERROR_SILENT log_std(("advance: set_error_description \"")); log_va(text, arg); log_std(("\"\n")); #endif ...
error_unsupported_set
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
int __cdecl fclose_lock(FILE *f) { return fclose(f); }
static int fclose_lock(FILE *f) { #if HAVE_FUNLOCKFILE funlockfile(f); #endif return fclose(f); }
fclose_lock
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
int __cdecl feof_lock(FILE *f) { return feof(f); }
static int feof_lock(FILE *f) { #if HAVE_FEOF_UNLOCKED return feof_unlocked(f); #else return feof(f); #endif }
feof_lock
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
int __cdecl fgetc_lock(FILE *f) { return fgetc(f); }
static int fgetc_lock(FILE *f) { #if HAVE_FGETC_UNLOCKED return fgetc_unlocked(f); #else return fgetc(f); #endif }
fgetc_lock
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl file_copy(const std::string *path1, const std::string *path2) { unsigned int size; char *data; size = file_size(path1); data = (char *)operator new(size); file_read(path1, data, size); file_write(path2, data, size); operator delete(data); }
void file_copy(const string &path1, const string &path2) { unsigned size; size = file_size(path1); char *data = (char *)operator new(size); try { file_read(path1, data, size); file_write(path2, data, size); } catch(...) { operator delete(data); throw; } operator delete(data); }
file_copy
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
crc_t __cdecl file_crc(const std::string *path) { unsigned int size; crc_t crc; char *data; size = file_size(path); data = (char *)operator new(size); file_read(path, data, size); crc = crc_compute(data, size); operator delete(data); return crc; }
crc_t file_crc(const string &path) { unsigned size = file_size(path); char *data = (char *)operator new(size); try { file_read(path, data, size); } catch(...) { operator delete(data); throw; } crc_t crc = crc_compute(data, size); operator delete(data); return crc; }
file_crc
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl file_move(const std::string *path1, const std::string *path2) { const char *v2; const char *v3; v2 = (const char *)std::string::c_str(path2); v3 = (const char *)std::string::c_str(path1); if (rename(v3, v2) && *__errno_location() == 18) { file_copy(path1, path2); file_remove(path1); } ...
void file_move(const string &path1, const string &path2) { if (rename(path1.c_str(), path2.c_str()) != 0 && errno == EXDEV) { try { file_copy(path1, path2); } catch(...) { try { file_remove(path2); } catch(...) {} throw error() << "Failed move of " << path1 << " to " << path2; } fi...
file_move
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl filepath::file_set(filepath *const this, const std::string *Afile) { std::string::operator = (this, Afile); }
void filepath::file_set(const string &Afile) { file = Afile; }
file_set
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
void __cdecl file_write(const std::string *path, const char *data, unsigned int size) { const char *v3; error *exception; error *v5; error *v6; const char *v7; error *v8; error *v9; error *v10; FILE *f; error v13; unsigned __int64 v14; v14 = __readfsqword(0x28u); v3 = ...
void file_write(const string &path, const char *data, unsigned size) { FILE *f = fopen(path.c_str(), "wb"); if (!f) throw error() << "Failed open for write file " << path; if (fwrite(data, size, 1, f) != 1) { fclose(f); remove(path.c_str()); throw error() << "Failed write file " << path; } ...
file_write
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
FILE *__cdecl fopen_lock(const char *name, const char *mode) { return fopen(name, mode); }
static FILE *fopen_lock(const char *name, const char *mode) { FILE *f; f = fopen(name, mode); #if HAVE_FLOCKFILE if (f) flockfile(f); #endif return f; }
fopen_lock
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
size_t __cdecl fread_lock(void *data, size_t size, size_t count, FILE *f) { return fread(data, size, count, f); }
static size_t fread_lock(void *data, size_t size, size_t count, FILE *f) { #if HAVE_FREAD_UNLOCKED return fread_unlocked(data, size, count, f); #else return fread(data, size, count, f); #endif }
fread_lock
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
size_t __cdecl fwrite_lock(const void *data, size_t size, size_t count, FILE *f) { return fwrite(data, size, count, f); }
static size_t fwrite_lock(const void *data, size_t size, size_t count, FILE *f) { #if HAVE_FWRITE_UNLOCKED return fwrite_unlocked(data, size, count, f); #else return fwrite(data, size, count, f); #endif }
fwrite_lock
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_fz *__cdecl fzalloc() { adv_fz *f; f = (adv_fz *)malloc(0xC0u); if (!f) return 0; f->type = 0; f->virtual_pos = 0; f->virtual_size = 0; f->real_offset = 0; f->real_size = 0; f->data_read = 0; f->data_write = 0; f->f = 0; return f; }
static adv_fz *fzalloc(void) { adv_fz *f; f = malloc(sizeof(adv_fz)); if (!f) return 0; f->type = fz_invalid; f->virtual_pos = 0; f->virtual_size = 0; f->real_offset = 0; f->real_size = 0; f->data_read = 0; f->data_write = 0; f->f = 0; return f; }
fzalloc
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl fzclose(adv_fz *f) { switch (f->type) { case 1u: case 2u: fclose_lock(f->f); free(f); break; case 3u: compressed_done(f); fclose_lock(f->f); free(f); break; case 4u: free(f); break; case 5u: free(f->data_write); free(f); break; default: ...
adv_error fzclose(adv_fz *f) { if (f->type == fz_file) { fclose_lock(f->f); free(f); } else if (f->type == fz_file_part) { fclose_lock(f->f); free(f); } else if (f->type == fz_file_compressed) { compressed_done(f); fclose_lock(f->f); free(f); } else if (f->type == fz_memory_read) { ...
fzclose
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl fzeof(adv_fz *f) { if (f->type == 1) return feof_lock(f->f); else return f->virtual_pos >= f->virtual_size; }
adv_error fzeof(adv_fz *f) { if (f->type == fz_file) { return feof_lock(f->f); } else { return f->virtual_pos >= f->virtual_size; } }
fzeof
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
int __cdecl fzgetc(adv_fz *f) { unsigned __int8 r; unsigned __int64 v3; v3 = __readfsqword(0x28u); if (f->type == 1) return fgetc_lock(f->f); if (fzread(&r, 1u, 1u, f) == 1) return r; return -1; }
int fzgetc(adv_fz *f) { if (f->type == fz_file) { return fgetc_lock(f->f); } else { unsigned char r; if (fzread(&r, 1, 1, f) == 1) return r; else return EOF; } }
fzgetc
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
char *__cdecl fzgets(char *s, int n, adv_fz *f) { char *v3; int na; char *sa; int c; char *r; sa = s; na = n; if (n <= 1) return 0; c = fzgetc(f); if (c == -1) return 0; r = s; while (na > 1) { v3 = sa++; *v3 = c; --na; if (c == 10) break; if (na > 1) c =...
char *fzgets(char *s, int n, adv_fz *f) { char *r; if (n < 2) { r = 0; } else { int c = fzgetc(f); if (c == EOF) { r = 0; } else { r = s; while (n > 1) { *s++ = (char)c; --n; if (c == '\n') break; if (n > 1) c = fzgetc(f); ...
fzgets
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_error __cdecl fzgrow(adv_fz *f, size_t size) { unsigned __int8 *data; if (f->type != 5) return -1; if (size > f->virtual_size) { data = (unsigned __int8 *)realloc(f->data_write, size); if (!data) return -1; f->data_write = data; f->virtual_size = size; } return 0; }
adv_error fzgrow(adv_fz *f, size_t size) { if (f->type == fz_memory_write) { if (f->virtual_size < size) { unsigned char *data = realloc(f->data_write, size); if (!data) return -1; f->data_write = data; f->virtual_size = size; } return 0; } else { return -1; } }
fzgrow
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_fz *__cdecl fzopen(const char *file, const char *mode) { adv_fz *f; f = fzalloc(); if (!f) return 0; f->type = 1; f->f = fopen_lock(file, mode); if (f->f) return f; free(f); return 0; }
adv_fz *fzopen(const char *file, const char *mode) { adv_fz *f = fzalloc(); if (!f) return 0; f->type = fz_file; f->f = fopen_lock(file, mode); if (!f->f) { free(f); return 0; } return f; }
fzopen
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_fz *__cdecl fzopenmemory(const unsigned __int8 *data, unsigned int size) { adv_fz *f; f = fzalloc(); if (!f) return 0; f->type = 4; f->virtual_pos = 0; f->virtual_size = size; f->data_read = data; return f; }
adv_fz *fzopenmemory(const unsigned char *data, unsigned size) { adv_fz *f = fzalloc(); if (!f) return 0; f->type = fz_memory_read; f->virtual_pos = 0; f->virtual_size = size; f->data_read = data; return f; }
fzopenmemory
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_fz *__cdecl fzopennullwrite(const char *file, const char *mode) { int v2; adv_fz *f; stat st; unsigned __int64 v6; v6 = __readfsqword(0x28u); f = fzalloc(); if (f) { f->type = 5; f->virtual_pos = 0; f->f = fopen_lock(file, "rb"); if (f->f) { v2 = fileno(f->f); if (!fstat(v...
adv_fz *fzopennullwrite(const char *file, const char *mode) { adv_fz *f = fzalloc(); if (!f) goto err; f->type = fz_memory_write; f->virtual_pos = 0; f->f = fopen_lock(file, "rb"); if (f->f) { struct stat st; if (fstat(fileno(f->f), &st) != 0) { goto err_close; } f->data_write =...
fzopennullwrite
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_fz *__cdecl fzopenzipcompressed(const char *file, off_t offset, unsigned int size_compressed, unsigned int size_uncompressed) { unsigned int filename_length; adv_fz *f; unsigned __int8 buf[30]; unsigned __int64 v10; v10 = __readfsqwo...
adv_fz *fzopenzipcompressed(const char *file, off_t offset, unsigned size_compressed, unsigned size_uncompressed) { unsigned char buf[ZIP_LO_FIXED]; unsigned filename_length; unsigned extra_field_length; adv_fz *f = fzalloc(); if (!f) return 0; f...
fzopenzipcompressed
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
adv_fz *__cdecl fzopenzipuncompressed(const char *file, off_t offset, unsigned int size) { unsigned int filename_length; adv_fz *f; unsigned __int8 buf[30]; unsigned __int64 v8; v8 = __readfsqword(0x28u); f = fzalloc(); if (!f) return 0; f->type = 1; f->virtu...
adv_fz *fzopenzipuncompressed(const char *file, off_t offset, unsigned size) { unsigned char buf[ZIP_LO_FIXED]; unsigned filename_length; unsigned extra_field_length; adv_fz *f = fzalloc(); if (!f) return 0; f->type = fz_file; f->virtual_pos = 0; f->virtual_size = size; f->f = fopen_lock(file, "...
fzopenzipuncompressed
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0
size_t __cdecl fzread(void *buffer, size_t size, size_t number, adv_fz *f) { size_t numbera; size_t total_size; size_t total_sizea; off_t run; size_t runa; numbera = number; if (f->type == 1) return fread_lock(buffer, size, number, f->f); total_size = number * size; if (number * size + f->virtual...
size_t fzread(void *buffer, size_t size, size_t number, adv_fz *f) { if (f->type == fz_file) { return fread_lock(buffer, size, number, f->f); } else { size_t total_size; total_size = size * number; if (f->virtual_pos + total_size >= f->virtual_size) { number = (f->virtual_size - f->virtual_po...
fzread
advancecomp-2.3
app-arch
O0/app-arch/advancecomp-2.3/advpng
ida
O0