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 trsort(saidx_t *ISA, saidx_t *SA, saidx_t n, saidx_t depth) { saint_t v4; saidx_t skip; saidx_t unsorted; saidx_t t; saidx_t ta; saidx_t *ISAd; saidx_t *first; saidx_t *a; saidx_t *last; saidx_t *lasta; trbudget_t budget; unsigned long v17; v17 = __readfsqword(0x28u); if (-n < *SA) { ...
static void trsort(saidx_t *ISA, saidx_t *SA, saidx_t n, saidx_t depth) { saidx_t *ISAd; saidx_t *first, *last, *a; trbudget_t budget; saidx_t t, skip, unsorted; if (-n >= *SA) { return; } trbudget_init(&budget, tr_ilg(n) * 2 / 3, n); for (ISAd = ISA + depth;; ISAd += ISAd - ISA) { assert(n > I...
trsort
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void uninit_io() { if (pthread_join(source_thread, 0)) abort(); if (pthread_mutex_lock(&sink_mutex)) abort(); finish = 1; if (pthread_cond_signal(&sink_cond)) abort(); if (pthread_mutex_unlock(&sink_mutex)) abort(); if (pthread_join(sink_thread, 0)) abort(); if (*((_DWORD *)&output_q +...
static void uninit_io(void) { xjoin(source_thread); xlock(&sink_mutex); finish = true; xsignal(&sink_cond); xunlock(&sink_mutex); xjoin(sink_thread); deque_uninit(output_q); }
uninit_io
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void up_heap(void *vroot, unsigned int size) { unsigned int j; position *el; if (size) { j = size; el = (position *)*((_QWORD *)vroot + size); if (el->major < **((_QWORD **)vroot + ((size - 1) >> 1)) || el->major == **((_QWORD **)vroot + ((size - 1) >> 1)) && el->minor < ...
void up_heap(void *vroot, unsigned size) { struct position **root = vroot; struct position *el; unsigned j; if (size == 0) return; j = size; el = root[j]; if (pos_lt(*el, *root[parent(j)])) { do { root[j] = root[parent(j)]; j = parent(j); } while (j > 0 && pos_lt(*el, *root[pare...
up_heap
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
bool update_timespec(const stat *statbuf, timespec **ts) { timespec *timespec; timespec = *ts; if ((*ts)->tv_nsec == 1073741822 && timespec[1].tv_nsec == 1073741822) return 1; if (timespec->tv_nsec == 0x3FFFFFFF && timespec[1].tv_nsec == 0x3FFFFFFF) { *ts = 0; return 0; } else { if (timespec-...
static bool update_timespec(struct stat const *statbuf, struct timespec *ts[2]) { struct timespec *timespec = *ts; if (timespec[0].tv_nsec == UTIME_OMIT && timespec[1].tv_nsec == UTIME_OMIT) return true; if (timespec[0].tv_nsec == UTIME_NOW && timespec[1].tv_nsec == UTIME_NOW) { ...
update_timespec
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void usage() { int *v0; int *v1; if (printf( "%s%s%s%s%s%s", "Usage:\n" "1. PROG [-n WTHRS] [-k|-c|-t] [-d|-z] [-1 .. -9] [-f] [-v] [-S] " "{FILE}\n" "2. PROG -h|-V\n" "\n" "Recognized PROG names:\n" "\n" " bunzip2, lbunzi...
without even the implied warranty of\n" \ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" \ "GNU General Public License for more details.\n" \ "\n" \ "You should have received a copy of the GNU General...
usage
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
int utimens(const char *file, const timespec *timespec) { return fdutimens(-1, file, timespec); }
int utimens(char const *file, struct timespec const timespec[2]) { return fdutimens(-1, file, timespec); }
utimens
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
int validate_timespec(timespec *timespec) { int result; int utime_omit_count; result = 0; utime_omit_count = 0; if ((timespec->tv_nsec == 0x3FFFFFFF || timespec->tv_nsec == 1073741822 || timespec->tv_nsec < 0x3B9ACA00uLL) && (timespec[1].tv_nsec == 0x3FFFFFFF || timespec[1].tv_nsec == 1073741822...
static int validate_timespec(struct timespec timespec[2]) { int result = 0; int utime_omit_count = 0; if ((timespec[0].tv_nsec != UTIME_NOW && timespec[0].tv_nsec != UTIME_OMIT && !(0 <= timespec[0].tv_nsec && timespec[0].tv_nsec < TIMESPEC_HZ)) || (timespec[1].tv_nsec != UTIME_NOW && timespec[1].tv_...
validate_timespec
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void version() { int *v0; int *v1; if (printf( "%s version %s\n%s\n\n%s%s", "lbzip2", "2.5", "http://lbzip2.org/", "Copyright (C) 2011, 2012, 2013, 2014 Mikolaj Izdebski\n" "Copyright (C) 2008, 2009, 2010 Laszlo Ersek\n" "\n" "This program is free software: you c...
_Noreturn static void version(void) { if (0 > printf(HELP_STRING)) failx(errno, "printf()"); if (0 != fclose(stdout)) failx(errno, "fclose(stdout)"); gcov_flush(); _exit(EX_OK); }
version
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void work() { uint32_t header; size_t vacant[2]; vacant[1] = __readfsqword(0x28u); if (verbose) { if (decompress) info("decompressing %s%s%s to %s%s%s", ispec.sep, ispec.fmt, ispec.sep, ospec.sep, ospec.fmt, ospec.sep); else info("compressing %s%s%s to %s%s%s", ispec.sep, ispec.f...
void work(void) { if (verbose) { info(decompress ? "decompressing %s%s%s to %s%s%s" : "compressing %s%s%s to %s%s%s", ispec.sep, ispec.fmt, ispec.sep, ospec.sep, ospec.fmt, ospec.sep); } set_memory_constraints(); if (!decompress) { schedule(&compression); } else { ui...
work
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void worker_thread_proc() { if (pthread_mutex_lock(&sched_mutex)) abort(); while (1) { while (next_task) { next_task->run(); select_task(); } if (process_0->finished()) break; if (pthread_cond_wait(&sched_cond, &sched_mutex)) abort(); } if (pthread_cond_broadcast(&sch...
static void worker_thread_proc(void) { unsigned id; (void)id; xlock(&sched_mutex); Trace(("worker[%2u]: spawned", (id = thread_id++))); for (;;) { while (next_task != NULL) { Trace(("worker[%2u]: scheduling task '%s'...", id, next_task->name)); next_task->run(); select_task(); } ...
worker_thread_proc
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void write_header() { uint8_t buffer[4]; unsigned long v1; v1 = __readfsqword(0x28u); qmemcpy(buffer, "BZh", 3); buffer[3] = bs100k + 48; xwrite(buffer, 4u); }
static void write_header(void) { uint8_t buffer[HEADER_SIZE]; buffer[0] = 0x42; buffer[1] = 0x5A; buffer[2] = 0x68; buffer[3] = 0x30 + bs100k; xwrite(buffer, HEADER_SIZE); }
write_header
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void write_trailer() { uint8_t buffer[10]; unsigned long v1; v1 = __readfsqword(0x28u); buffer[0] = 23; buffer[1] = 114; buffer[2] = 69; buffer[3] = 56; buffer[4] = 80; buffer[5] = -112; buffer[6] = HIBYTE(combined_crc); buffer[7] = BYTE2(combined_crc); buffer[8] = BYTE1(combined_crc); buffer...
static void write_trailer(void) { uint8_t buffer[TRAILER_SIZE]; buffer[0] = 0x17; buffer[1] = 0x72; buffer[2] = 0x45; buffer[3] = 0x38; buffer[4] = 0x50; buffer[5] = 0x90; buffer[6] = combined_crc >> 24; buffer[7] = (combined_crc >> 16) & 0xFF; buffer[8] = (combined_crc >> 8) & 0xFF; buffer[9] = ...
write_trailer
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xaction(int sig, void (*handler)(int)) { sigaction act; unsigned long v3; v3 = __readfsqword(0x28u); act.sa_handler = handler; xempty(&act.sa_mask); act.sa_flags = 0; if (sigaction(sig, &act, 0)) abort(); }
static void xaction(int sig, void (*handler)(int)) { struct sigaction act; act.sa_handler = handler; xempty(&act.sa_mask); act.sa_flags = 0; if (sigaction(sig, &act, NULL) != 0) abort(); }
xaction
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xadd(sigset_t *set, int sig) { if (sigaddset(set, sig)) abort(); }
static void xadd(sigset_t *set, int sig) { if (sigaddset(set, sig) != 0) abort(); }
xadd
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xalloc_die() { fail("Insufficient memory to complete operation. See manual page for ways of " "reducing memory usage."); }
void xalloc_die(void) { fail("Insufficient memory to complete operation." " See manual page for ways of reducing memory usage."); }
xalloc_die
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void *xcalloc(size_t n, size_t s) { bool v2; void *p; v2 = !is_mul_ok(s, n); if (((s * n) & 0x8000000000000000LL) != 0LL) v2 = 1; if (v2 || (p = calloc(n, s)) == 0) xalloc_die(); return p; }
void *xcalloc(size_t n, size_t s) { void *p; if (xalloc_oversized(n, s) || (!(p = calloc(n, s)) && (HAVE_GNU_CALLOC || n != 0))) xalloc_die(); return p; }
xcalloc
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
pthread_t xcreate(void (*entry)(void)) { int err; pthread_t thread[2]; thread[1] = __readfsqword(0x28u); err = pthread_create(thread, 0, (void *(*)(void *))thread_entry, entry); if (err) failx(err, "unable to create a POSIX thread"); return thread[0]; }
static pthread_t xcreate(void (*entry)(void)) { int err; pthread_t thread; err = pthread_create(&thread, NULL, thread_entry, entry); if (err != 0) failx(err, "unable to create a POSIX thread"); return thread; }
xcreate
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xempty(sigset_t *set) { if (sigemptyset(set)) abort(); }
static void xempty(sigset_t *set) { if (sigemptyset(set) != 0) abort(); }
xempty
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xmask(int how, const sigset_t *set, sigset_t *oset) { if (pthread_sigmask(how, set, oset)) abort(); }
static void xmask(int how, const sigset_t *set, sigset_t *oset) { if (pthread_sigmask(how, set, oset) != 0) abort(); }
xmask
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
bool xmember(const sigset_t *set, int sig) { unsigned int rv; rv = sigismember(set, sig); if (rv > 1) abort(); return rv != 0; }
static bool xmember(const sigset_t *set, int sig) { unsigned rv; rv = sigismember(set, sig); if (rv > 1) abort(); return rv; }
xmember
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xpending(sigset_t *set) { if (sigpending(set)) abort(); }
static void xpending(sigset_t *set) { if (sigpending(set) != 0) abort(); }
xpending
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xraise(int sig) { if (kill(pid, sig)) abort(); }
void xraise(int sig) { if (kill(pid, sig) != 0) abort(); }
xraise
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xread(void *vbuf, size_t *vacant) { size_t v2; int *v3; ssize_t rd; if (!*vacant) __assert_fail("*vacant > 0", "process.c", 0x6Au, "xread"); do { if ((*vacant & 0x8000000000000000LL) != 0LL) v2 = 0x7FFFFFFFFFFFFFFFLL; else v2 = *vacant; rd = read(ispec.fd, vbuf, v2); if (...
void xread(void *vbuf, size_t *vacant) { char *buffer = vbuf; assert(*vacant > 0); do { ssize_t rd; rd = read(ispec.fd, buffer, *vacant > (size_t)SSIZE_MAX ? (size_t)SSIZE_MAX : *vacant); if (0 == rd) break; if (-1 == rd) { failfx(&ispec, errno, "read()"); } ...
xread
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void *xrealloc(void *p, size_t n) { void *pa; if (n || !p) { pa = realloc(p, n); if (!pa) { if (n) xalloc_die(); } return pa; } else { free(p); return 0; } }
void *xrealloc(void *p, size_t n) { if (!n && p) { free(p); return NULL; } p = realloc(p, n); if (!p && n) xalloc_die(); return p; }
xrealloc
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
uintmax_t xstrtol(const char *str, int source, uintmax_t lower, uintmax_t upper) { char *endptr; const char *suffix; long tmp; uintmax_t val; unsigned long v11; v11 = __readfsqword(0x28u); suffix = "EePpTtGgMmKk"; if (!*str || (*__errno_location() = 0, tmp = strtol(str, &endptr,...
static uintmax_t xstrtol(const char *str, int source, uintmax_t lower, uintmax_t upper) { long tmp; char *endptr; unsigned shift; uintmax_t val; const char *suffix = "EePpTtGgMmKk"; if ('\0' == *str) goto fail; errno = 0; tmp = strtol(str, &endptr, 10); if (0 != errno ||...
xstrtol
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
void xwrite(const void *vbuf, size_t size) { size_t v2; int *v3; long sizea; ssize_t wr; sizea = size; ospec.total += size; if (size && ospec.fd != -1) { do { if (sizea < 0) v2 = 0x7FFFFFFFFFFFFFFFLL; else v2 = sizea; wr = write(ospec.fd, vbuf, v2); if (wr == -...
void xwrite(const void *vbuf, size_t size) { const char *buffer = vbuf; ospec.total += size; if (size > 0 && ospec.fd != -1) { do { ssize_t wr; wr = write(ospec.fd, buffer, size > (size_t)SSIZE_MAX ? (size_t)SSIZE_MAX : size); if (-1 == wr) { failfx(&ospec, errno...
xwrite
lbzip2-2.5_p20181227-r1
app-arch
O0/app-arch/lbzip2-2.5_p20181227-r1/lbzip2
ida
O0
int append_image_property_argument(string_list *image_properties) { if (strchr(optarg, 61)) return string_list_append(image_properties, optarg); imagex_error("'--image-property' argument must be in the form NAME=VALUE"); return -1; }
static int append_image_property_argument(struct string_list *image_properties) { if (!tstrchr(optarg, '=')) { imagex_error(T("'--image-property' argument " "must be in the form NAME=VALUE")); return -1; } return string_list_append(image_properties, optarg); }
append_image_property_argument
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int apply_image_properties(string_list *image_properties, WIMStruct *wim, int image, bool *any_changes_ret) { char *v4; char any_changes; unsigned int i; int ret; tchar *name; tchar *value; const char *current_value; any_changes = 0; for (i = 0; i < image_properties->num_st...
static int apply_image_properties(struct string_list *image_properties, WIMStruct *wim, int image, bool *any_changes_ret) { bool any_changes = false; for (unsigned i = 0; i < image_properties->num_strings; i++) { tchar *name, *value; const ...
apply_image_properties
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void default_print_security_descriptor(const uint8_t *sd, size_t size) { printf("Security Descriptor = "); print_byte_field(sd, size); putchar(10); }
static void default_print_security_descriptor(const uint8_t *sd, size_t size) { tprintf(T("Security Descriptor = ")); print_byte_field(sd, size); tputchar(T('\n')); }
default_print_security_descriptor
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void do_common_options(int *argc_p, tchar **argv, int cmd) { int argc; int i; const tchar *p; const char *pa; argc = *argc_p; for (i = 1; i < argc; ++i) { p = argv[i]; if (*(_WORD *)p == 11565) { pa = p + 2; if (!strcmp(pa, "help")) { if (cmd == -1) usage_all(stdout); ...
static void do_common_options(int *argc_p, tchar **argv, int cmd) { int argc = *argc_p; int i; const tchar *p; for (i = 1; i < argc; i++) { p = argv[i]; if (p[0] == T('-') && p[1] == T('-')) { p += 2; if (!tstrcmp(p, T("help"))) { if (cmd == CMD_NONE) usage_all(stdout); ...
do_common_options
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void do_metadata_not_found_warning(const tchar *wimfile, const wimlib_wim_info *info) { if (info->part_number != 1) imagex_error("\"%s\" is not the first part of the split WIM.\n You " "must specify the first part.", wimfile); }
static void do_metadata_not_found_warning(const tchar *wimfile, const struct wimlib_wim_info *info) { if (info->part_number != 1) { imagex_error(T("\"%" TS "\" is not the first part of the split WIM.\n" " You must specify the first part."), ...
do_metadata_not_found_warning
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void do_resource_not_found_warning(const tchar *wimfile, const wimlib_wim_info *info, const string_list *refglobs) { if (info->total_parts <= 1u) { imagex_error("If this is a delta WIM, use the --ref argument to specify " "the ...
static void do_resource_not_found_warning(const tchar *wimfile, const struct wimlib_wim_info *info, const struct string_list *refglobs) { if (info->total_parts > 1) { if (refglobs->num_strings == 0) { imagex_error(T("\"%" TS...
do_resource_not_found_warning
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
char *file_get_contents(const tchar *filename, size_t *len_ret) { size_t v2; void *buf; __off_t len; FILE *fp; stat stbuf; unsigned long v8; v8 = __readfsqword(0x28u); buf = 0; if (stat64(filename, (struct stat64 *)&stbuf)) { imagex_error_with_errno("Failed to stat the file \"%s\"", filename); ...
static char *file_get_contents(const tchar *filename, size_t *len_ret) { struct stat stbuf; void *buf = NULL; size_t len; FILE *fp; if (tstat(filename, &stbuf) != 0) { imagex_error_with_errno(T("Failed to stat the file \"%" TS "\""), filename); goto out; } len = stbuf.st_size; fp = tfopen(file...
file_get_contents
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
off_t file_get_size(const tchar *filename) { stat st; unsigned long v3; v3 = __readfsqword(0x28u); if (stat64(filename, (struct stat64 *)&st)) return -1; else return st.st_size; }
static off_t file_get_size(const tchar *filename) { struct stat st; if (tstat(filename, &st) == 0) return st.st_size; else return (off_t)-1; }
file_get_size
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
tchar *file_get_text_contents(const tchar *filename, size_t *num_tchars_ret) { size_t num_bytes; char *contents; unsigned long v5; v5 = __readfsqword(0x28u); contents = file_get_contents(filename, &num_bytes); if (contents) return translate_text_to_tstr(contents, num_bytes, num_tchars_ret); else ...
static tchar *file_get_text_contents(const tchar *filename, size_t *num_tchars_ret) { char *contents; size_t num_bytes; contents = file_get_contents(filename, &num_bytes); if (!contents) return NULL; return translate_text_to_tstr(contents, num_bytes, num_tchars_ret); ...
file_get_text_contents
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
const tchar *get_cmd_string(int cmd, bool only_short_form) { if (cmd == -1) return "wimlib-imagex"; if (!only_short_form && invocation_cmd == -1) sprintf(buf_2, "%s %s", invocation_name, imagex_commands[cmd].name); else sprintf(buf_2, "wim%s", imagex_commands[cmd].name); return buf_2; }
static const tchar *get_cmd_string(int cmd, bool only_short_form) { static tchar buf[50]; if (cmd == CMD_NONE) return T("wimlib-imagex"); if (only_short_form || invocation_cmd != CMD_NONE) { tsprintf(buf, T("wim%" TS), imagex_commands[cmd].name); } else { tsprintf(buf, T("%" TS " %" TS), invocatio...
get_cmd_string
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int get_compression_type(tchar *optarg, bool solid) { tchar *v2; unsigned int ctype; unsigned int compression_level; tchar *ptmp; tchar *plevel; unsigned long ultmp; unsigned long v9; v9 = __readfsqword(0x28u); compression_level = 0; plevel = strchr(optarg, 58); if (plevel) { v2 = plevel++; ...
static int get_compression_type(tchar *optarg, bool solid) { int ctype; unsigned int compression_level = 0; tchar *plevel; plevel = tstrchr(optarg, T(':')); if (plevel) { tchar *ptmp; unsigned long ultmp; *plevel++ = T('\0'); ultmp = tstrtoul(plevel, &ptmp, 10); if (ultmp >= UINT_MAX || ...
get_compression_type
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
unsigned int get_unit(uint64_t total_bytes, const tchar **name_ret) { if (total_bytes <= 0x2540BE3FFLL) { if (total_bytes <= 0x98967F) { if (total_bytes <= 0x270F) { *name_ret = "bytes"; return 0; } else { *name_ret = "KiB"; return 10; } } else { *name_r...
static unsigned get_unit(uint64_t total_bytes, const tchar **name_ret) { if (total_bytes >= GIBIBYTE_MIN_NBYTES) { *name_ret = T("GiB"); return 30; } else if (total_bytes >= MEBIBYTE_MIN_NBYTES) { *name_ret = T("MiB"); return 20; } else if (total_bytes >= KIBIBYTE_MIN_NBYTES) { *name_ret = T("...
get_unit
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_apply(int argc, tchar **argv, int cmd) { int v3; int v4; int v5; int v6; int v7; const tchar **argva; int argca; int extract_flags; int open_flags; int image; int ret; int c; WIMStruct *wim; const tchar *target; const tchar *image_num_or_name; const tchar *wimfile; string_li...
static int imagex_apply(int argc, tchar **argv, int cmd) { int c; int open_flags = 0; int image = WIMLIB_NO_IMAGE; WIMStruct *wim; struct wimlib_wim_info info; int ret; const tchar *wimfile; const tchar *target; const tchar *image_num_or_name = NULL; int extract_flags = 0; STRING_LIST(refglobs); ...
imagex_apply
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_capture_or_append(int argc, tchar **argv, int cmd) { void *v3; void *v4; char *v5; void *v6; void *v7; size_t v8; tchar **argva; const char *cmda; long v12; bool appending; bool source_list; bool capture_sources_malloced; bool name_defaulted; int open_flags; int add_flags; int...
static int imagex_capture_or_append(int argc, tchar **argv, int cmd) { int c; bool create = false; bool appending = (cmd == CMD_APPEND); int open_flags = 0; int add_flags = WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE | WIMLIB_ADD_FLAG_WINCONFIG | WIMLIB_ADD_FLAG_VERBOSE | WIMLIB_ADD_FLAG_FILE_PATHS_UNNE...
imagex_capture_or_append
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_delete(int argc, tchar **argv, int cmd) { tchar **argva; int argca; unsigned int open_flags; unsigned int write_flags; int ret; int c; unsigned int image; WIMStruct *wim; const tchar *wimfile; const tchar *image_num_or_name; unsigned long v14; v14 = __readfsqword(0x28u); open_flags...
static int imagex_delete(int argc, tchar **argv, int cmd) { int c; int open_flags = WIMLIB_OPEN_FLAG_WRITE_ACCESS; int write_flags = 0; const tchar *wimfile; const tchar *image_num_or_name; WIMStruct *wim; int image; int ret; for_opt(c, delete_options) { switch (c) { case IMAGEX_CHECK_OPTION:...
imagex_delete
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_dir(int argc, tchar **argv, int cmd) { const tchar **argva; int argca; print_dentry_options options; int image; int ret; int iterate_flags; int c; WIMStruct *wim; const tchar *path; const tchar *wimfile; string_list refglobs; wimlib_wim_info info; unsigned long v16; v16 = __readf...
static int imagex_dir(int argc, tchar **argv, int cmd) { const tchar *wimfile; WIMStruct *wim = NULL; int image; int ret; const tchar *path = WIMLIB_WIM_ROOT_PATH; int c; struct print_dentry_options options = { .detailed = false, }; int iterate_flags = WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE; ...
imagex_dir
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void imagex_error(const tchar *format, ...) { long v1; long v2; long v3; long v4; long v5; va_list va; unsigned long v7; long v8; long v9; long v10; long v11; long v12; va_start(va, format); v3 = va_arg(va, _QWORD); v1 = va_arg(va, _QWORD); v2 = va_arg(va, _QWORD); v4 = va_arg(va, _QW...
static void _format_attribute(printf, 1, 2) imagex_error(const tchar *format, ...) { va_list va; va_start(va, format); tfputs(T("ERROR: "), stderr); tvfprintf(stderr, format, va); tputc(T('\n'), stderr); va_end(va); }
imagex_error
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void imagex_error_with_errno(const tchar *format, ...) { long v1; long v2; long v3; long v4; long v5; char *v6; int errno_save; va_list va; unsigned long v9; long v10; long v11; long v12; long v13; long v14; va_start(va, format); v3 = va_arg(va, _QWORD); v1 = va_arg(va, _QWORD); v2 ...
static void _format_attribute(printf, 1, 2) imagex_error_with_errno(const tchar *format, ...) { int errno_save = errno; va_list va; va_start(va, format); tfputs(T("ERROR: "), stderr); tvfprintf(stderr, format, va); tfprintf(stderr, T(": %" TS "\n"), tstrerror(errno_save)); va_end(va); }
imagex_error_with_errno
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_export(int argc, tchar **argv, int cmd) { int v3; const tchar *v4; const tchar *v5; tchar **argva; int argca; bool wim_is_new; unsigned int open_flags; unsigned int export_flags; unsigned int write_flags; unsigned int compression_type; unsigned int dest_wim_fd; int ret; unsigned int...
static int imagex_export(int argc, tchar **argv, int cmd) { int c; int open_flags = 0; int export_flags = WIMLIB_EXPORT_FLAG_GIFT; int write_flags = 0; int compression_type = WIMLIB_COMPRESSION_TYPE_INVALID; const tchar *src_wimfile; const tchar *src_image_num_or_name; const tchar *dest_wimfile; int d...
imagex_export
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_extract(int argc, tchar **argv, int cmd) { int v3; int v4; int v5; const char *cmd_string; tchar **argva; tchar **argvb; int argca; int extract_flags; int open_flags; int ret; int notlist_extract_flags; int num_paths; int c; int image; WIMStruct *wim; tchar *root_path; tchar...
static int imagex_extract(int argc, tchar **argv, int cmd) { int c; int open_flags = 0; int image; WIMStruct *wim; int ret; const tchar *wimfile; const tchar *image_num_or_name; tchar *dest_dir = T("."); int extract_flags = WIMLIB_EXTRACT_FLAG_NORPFIX | WIMLIB_EXTRACT_FLAG_GLOB_P...
imagex_extract
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void imagex_flush_output() { if (imagex_info_file) fflush(imagex_info_file); }
static void imagex_flush_output(void) { if (imagex_info_file) fflush(imagex_info_file); }
imagex_flush_output
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_info(int argc, tchar **argv, int cmd) { const tchar *v3; void *v4; void *v5; tchar **argva; int cmda; int argca; bool any_property_changes; bool boot; bool header; bool blobs; bool xml; bool short_header; int image; int ret; int open_flags; int write_flags; int c; WIMStruc...
static int imagex_info(int argc, tchar **argv, int cmd) { int c; bool boot = false; bool header = false; bool blobs = false; bool xml = false; bool short_header = true; const tchar *xml_out_file = NULL; const tchar *wimfile; const tchar *image_num_or_name; STRING_LIST(image_properties); WIMStruct ...
imagex_info
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_join(int argc, tchar **argv, int cmd) { unsigned int swm_open_flags; unsigned int wim_write_flags; int c; swm_open_flags = 0; for (wim_write_flags = 0;; wim_write_flags |= 1u) { c = getopt_long_only(argc, argv, shortopts, join_options, 0); if (c == -1) break; if (c == 3) { ...
static int imagex_join(int argc, tchar **argv, int cmd) { int c; int swm_open_flags = 0; int wim_write_flags = 0; const tchar *output_path; int ret; for_opt(c, join_options) { switch (c) { case IMAGEX_CHECK_OPTION: swm_open_flags |= WIMLIB_OPEN_FLAG_CHECK_INTEGRITY; case IMAGEX_INCLUDE_I...
imagex_join
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_mount_rw_or_ro(int argc, tchar **argv, int cmd) { const tchar **argva; int argca; unsigned int mount_flags; unsigned int open_flags; unsigned int image; int ret; int c; WIMStruct *wim; const tchar *staging_dir; const tchar *dir; const tchar *wimfile; string_list refglobs; wimlib_wim...
static int imagex_mount_rw_or_ro(int argc, tchar **argv, int cmd) { int c; int mount_flags = 0; int open_flags = 0; const tchar *staging_dir = NULL; const tchar *wimfile; const tchar *dir; WIMStruct *wim; struct wimlib_wim_info info; int image; int ret; STRING_LIST(refglobs); if (cmd == CMD_MO...
imagex_mount_rw_or_ro
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_optimize(int argc, tchar **argv, int cmd) { int i; unsigned int open_flags; unsigned int write_flags; unsigned int compression_type; uint32_t chunk_size; uint32_t solid_chunk_size; unsigned int solid_ctype; int ret; unsigned int num_threads; WIMStruct *wim; const tchar *wimfile; off_t...
static int imagex_optimize(int argc, tchar **argv, int cmd) { int c; int open_flags = WIMLIB_OPEN_FLAG_WRITE_ACCESS; int write_flags = WIMLIB_WRITE_FLAG_REBUILD; int compression_type = WIMLIB_COMPRESSION_TYPE_INVALID; uint32_t chunk_size = UINT32_MAX; uint32_t solid_chunk_size = UINT32_MAX; int solid_ctyp...
imagex_optimize
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void imagex_output_to_stderr() { if (imagex_info_file) imagex_info_file = stderr; }
static void imagex_output_to_stderr(void) { if (imagex_info_file) imagex_info_file = stderr; }
imagex_output_to_stderr
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
wimlib_progress_status imagex_progress_func(wimlib_progress_msg msg, wimlib_progress_info *info, void *_ignored_context) { const char *v3; uint32_t num_threads; const char *compression_type_string; uint64_t v6; wimlib_prog...
static enum wimlib_progress_status imagex_progress_func(enum wimlib_progress_msg msg, union wimlib_progress_info *info, void *_ignored_context) { unsigned percent_done; unsigned unit_shift; const tchar *unit_name; switch (msg) { case WIMLIB_PROGRESS_MSG_WRITE_STREAMS: if (last_split_...
imagex_progress_func
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_split(int argc, tchar **argv, int cmd) { int i; double v4; tchar **argva; unsigned int open_flags; unsigned int write_flags; int ret; tchar *tmp; WIMStruct *wim; unsigned long part_size; unsigned long v13; v13 = __readfsqword(0x28u); open_flags = 0; write_flags = 0; for (i = geto...
static int imagex_split(int argc, tchar **argv, int cmd) { int c; int open_flags = 0; int write_flags = 0; unsigned long part_size; tchar *tmp; int ret; WIMStruct *wim; for_opt(c, split_options) { switch (c) { case IMAGEX_CHECK_OPTION: open_flags |= WIMLIB_OPEN_FLAG_CHECK_INTEGRITY; ...
imagex_split
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void imagex_suppress_output() { imagex_info_file = 0; }
static void imagex_suppress_output(void) { imagex_info_file = NULL; }
imagex_suppress_output
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_unmount(int argc, tchar **argv, int cmd) { tchar **argva; unsigned int unmount_flags; int ret; int c; unmount_flags = 0; while (2) { c = getopt_long_only(argc, argv, shortopts, unmount_options, 0); if (c != -1) { switch (c) { case 3: unmount_flags |= 1u; conti...
static int imagex_unmount(int argc, tchar **argv, int cmd) { int c; int unmount_flags = 0; int ret; for_opt(c, unmount_options) { switch (c) { case IMAGEX_COMMIT_OPTION: unmount_flags |= WIMLIB_UNMOUNT_FLAG_COMMIT; break; case IMAGEX_CHECK_OPTION: unmount_flags |= WIMLIB_UNMOUNT_F...
imagex_unmount
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_update(int argc, tchar **argv, int cmd) { size_t v3; wimlib_update_op op; const tchar **argva; int argca; unsigned int image; int ret; unsigned int open_flags; unsigned int write_flags; int default_add_flags; int default_delete_flags; unsigned int num_threads; int c; WIMStruct *wim;...
static int imagex_update(int argc, tchar **argv, int cmd) { const tchar *wimfile; int image; WIMStruct *wim; int ret; int open_flags = WIMLIB_OPEN_FLAG_WRITE_ACCESS; int write_flags = 0; int update_flags = WIMLIB_UPDATE_FLAG_SEND_PROGRESS; int default_add_flags = WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE | ...
imagex_update
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int imagex_verify(int argc, tchar **argv, int cmd) { int ret; unsigned int open_flags; int c; WIMStruct *wim; const tchar *wimfile; string_list refglobs; unsigned long v10; v10 = __readfsqword(0x28u); open_flags = 1; refglobs.strings = 0; refglobs.num_strings = 0; refglobs.num_alloc_strings = 0...
static int imagex_verify(int argc, tchar **argv, int cmd) { int ret; const tchar *wimfile; WIMStruct *wim; int open_flags = WIMLIB_OPEN_FLAG_CHECK_INTEGRITY; int verify_flags = 0; STRING_LIST(refglobs); int c; for_opt(c, verify_options) { switch (c) { case IMAGEX_REF_OPTION: ret = string_...
imagex_verify
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
bool is_any_path_separator(tchar c) { return c == 47 || c == 92; }
static inline bool is_any_path_separator(tchar c) { return c == T('/') || c == T('\\'); }
is_any_path_separator
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
bool is_comment_line(const tchar *line, size_t len) { do { if (*line == 35 || *line == 59) return 1; if (((*__ctype_b_loc())[*(unsigned char *)line] & 0x2000) == 0 && *line) return 0; ++line; --len; } while (len); return 1; }
static bool is_comment_line(const tchar *line, size_t len) { for (;;) { if (*line == T('#') || *line == T(';')) return true; if (!istspace(*line) && *line != T('\0')) return false; ++line; --len; if (len == 0) return true; } }
is_comment_line
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
bool is_null_guid(const uint8_t *guid) { return memcmp(guid, null_guid_3, 0x10u) == 0; }
static bool is_null_guid(const uint8_t *guid) { static const uint8_t null_guid[WIMLIB_GUID_LEN]; return !memcmp(guid, null_guid, WIMLIB_GUID_LEN); }
is_null_guid
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int main(int argc, const char **argv, const char **envp) { const char *error_string; const char **argva; int argca; int ret; int init_flags; int cmd; int i; int i_0; tchar *igcase; argca = argc; argva = argv; init_flags = 0; imagex_info_file = stdout; invocation_name = tbasename((tchar *)*a...
int main(int argc, tchar **argv) { int ret; int init_flags = 0; int cmd; imagex_info_file = stdout; invocation_name = tbasename(argv[0]); { tchar *igcase = tgetenv(T("WIMLIB_IMAGEX_IGNORE_CASE")); if (igcase != NULL) { if (!tstrcmp(igcase, T("no")) || !tstrcmp(igcase, T("0"))) init_f...
main
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
uint32_t parse_chunk_size(const tchar *optarg) { tchar *tmp; uint64_t chunk_size; unsigned long v4; v4 = __readfsqword(0x28u); chunk_size = strtoul(optarg, &tmp, 10); if (chunk_size) { switch (*tmp) { case 0: goto LABEL_17; case 107: case 75: chunk_size <<= 10; ++tmp; ...
static uint32_t parse_chunk_size(const tchar *optarg) { tchar *tmp; uint64_t chunk_size = tstrtoul(optarg, &tmp, 10); if (chunk_size == 0) { imagex_error( T("Invalid chunk size specification; must be a positive integer\n" " with optional K, M, or G suffix")); return UINT32_MAX; }...
parse_chunk_size
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
unsigned int parse_num_threads(const tchar *optarg) { tchar *tmp; unsigned long ul_nthreads; unsigned long v4; v4 = __readfsqword(0x28u); ul_nthreads = strtoul(optarg, &tmp, 10); if (ul_nthreads <= 0xFFFFFFFE && !*tmp && optarg != tmp) return ul_nthreads; imagex_error("Number of threads must be a non...
static unsigned parse_num_threads(const tchar *optarg) { tchar *tmp; unsigned long ul_nthreads = tstrtoul(optarg, &tmp, 10); if (ul_nthreads >= UINT_MAX || *tmp || tmp == optarg) { imagex_error(T("Number of threads must be a non-negative integer!")); return UINT_MAX; } else { return ul_nthreads; }...
parse_num_threads
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
wimlib_capture_source *parse_source_list(tchar **source_list_contents_p, size_t source_list_nchars, size_t *nsources_ret) { ssize_t v4; size_t v5; size_t source_list_ncharsa; tchar **source_list_contents_pa; tchar *p; size_t i...
static struct wimlib_capture_source * parse_source_list(tchar **source_list_contents_p, size_t source_list_nchars, size_t *nsources_ret) { ssize_t nlines; tchar *p; struct wimlib_capture_source *sources; size_t i, j; nlines = text_file_count_lines(source_list_contents_p, &source_list_nchars...
parse_source_list
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
bool parse_source_list_line(tchar *line, size_t len, wimlib_capture_source *source) { size_t lena; tchar *linea[2]; int ret; linea[0] = line; lena = len; ret = parse_string(linea, &lena, &source->fs_source_path); if (ret) return 0; ret = parse_string(linea, &lena, &sourc...
static bool parse_source_list_line(tchar *line, size_t len, struct wimlib_capture_source *source) { int ret; ret = parse_string(&line, &len, &source->fs_source_path); if (ret != PARSE_STRING_SUCCESS) return false; ret = parse_string(&line, &len, &source->wim_target_path);...
parse_source_list_line
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int parse_string(tchar **line_p, size_t *len_p, tchar **fn_ret) { tchar quote_char; size_t len; tchar *line; tchar *fn; len = *len_p; for (line = *line_p;; ++line) { if (!len) return 2; if (((*__ctype_b_loc())[(unsigned char)*line] & 0x2000) == 0 && *line) break; --len; } quote_...
static int parse_string(tchar **line_p, size_t *len_p, tchar **fn_ret) { size_t len = *len_p; tchar *line = *line_p; tchar *fn; tchar quote_char; for (;;) { if (len == 0) return PARSE_STRING_NONE; if (!istspace(*line) && *line != T('\0')) break; line++; len--; } quote_char = *...
parse_string
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
bool parse_update_command(tchar *line, size_t len, wimlib_update_command *command, size_t line_number) { size_t lena; tchar *linea[2]; int op; int ret; tchar *command_name; tchar *next_string; size_t num_nonoptions; unsigned long v14; linea[0] = line; lena = len; v14 = _...
static bool parse_update_command(tchar *line, size_t len, struct wimlib_update_command *command, size_t line_number) { int ret; tchar *command_name; int op; size_t num_nonoptions; ret = parse_string(&line, &len, &command_name); if (ret != PA...
parse_update_command
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
wimlib_update_command *parse_update_command_file(tchar **cmd_file_contents_p, size_t cmd_file_nchars, size_t *num_cmds_ret) { ssize_t v4; size_t v5; size_t cmd_file_ncharsa; tchar **cmd_file_contents_pa; tchar *p...
static struct wimlib_update_command * parse_update_command_file(tchar **cmd_file_contents_p, size_t cmd_file_nchars, size_t *num_cmds_ret) { ssize_t nlines; tchar *p; struct wimlib_update_command *cmds; size_t i, j; nlines = text_file_count_lines(cmd_file_contents_p, &cmd_file_nchar...
parse_update_command_file
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_available_compression_types(FILE *fp) { fputs("Available compression types:\n" "\n" " none\n" " xpress (alias: \"fast\")\n" " lzx (alias: \"maximum\") (default for capture)\n" " lzms (alias: \"recovery\")\n" "\n", fp); }
static void print_available_compression_types(FILE *fp) { static const tchar *const s = T("Available compression types:\n" "\n" " none\n" " xpress (alias: \"fast\")\n" " lzx (alias: \"maximum\") (default for capture)\n" " lzms (alias: \"recovery\")\n" ...
print_available_compression_types
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_blobs(WIMStruct *wim) { wimlib_iterate_lookup_table(wim, 0, print_resource, 0); }
static void print_blobs(WIMStruct *wim) { wimlib_iterate_lookup_table(wim, 0, print_resource, NULL); }
print_blobs
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_byte_field(const uint8_t *field, size_t len) { unsigned char *v2; while (len--) { v2 = (unsigned char *)field++; printf("%02hhx", *v2); } }
static void print_byte_field(const uint8_t field[], size_t len) { while (len--) tprintf(T("%02hhx"), *field++); }
print_byte_field
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int print_dentry(const wimlib_dir_entry *dentry, void *_options) { if (*(_BYTE *)_options != 1) print_dentry_full_path(dentry); else print_dentry_detailed(dentry); return 0; }
static int print_dentry(const struct wimlib_dir_entry *dentry, void *_options) { const struct print_dentry_options *options = _options; if (!options->detailed) print_dentry_full_path(dentry); else print_dentry_detailed(dentry); return 0; }
print_dentry
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_dentry_detailed(const wimlib_dir_entry *dentry) { uint32_t i_0; size_t i; puts("-----------------------------------------------------------------------" "-----"); printf("Full Path = \"%s\"\n", dentry->full_path); if (dentry->dos_name) printf("Short Name = \"%s\"\n", ...
static void print_dentry_detailed(const struct wimlib_dir_entry *dentry) { tprintf(T("------------------------------------------------------------------" "----------\n")); tprintf(T("Full Path = \"%" TS "\"\n"), dentry->full_path); if (dentry->dos_name) tprintf(T("Short Name = \...
print_dentry_detailed
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_dentry_full_path(const wimlib_dir_entry *dentry) { puts(dentry->full_path); }
static void print_dentry_full_path(const struct wimlib_dir_entry *dentry) { tprintf(T("%" TS "\n"), dentry->full_path); }
print_dentry_full_path
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_guid(const tchar *label, const uint8_t *guid) { if (!is_null_guid(guid)) { printf("%-20s= 0x", label); print_byte_field(guid, 0x10u); putchar(10); } }
static void print_guid(const tchar *label, const uint8_t *guid) { if (is_null_guid(guid)) return; tprintf(T("%-20" TS "= 0x"), label); print_byte_field(guid, WIMLIB_GUID_LEN); tputchar(T('\n')); }
print_guid
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int print_resource(const wimlib_resource_entry *resource, void *_ignore) { printf("Hash = 0x"); print_byte_field(resource->sha1_hash, 0x14u); putchar(10); if ((*((_BYTE *)resource + 52) & 0x10) == 0) { printf("Uncompressed size = %lu bytes\n", resource->uncompressed_size); if ((*((_BYTE *)r...
static int print_resource(const struct wimlib_resource_entry *resource, void *_ignore) { tprintf(T("Hash = 0x")); print_byte_field(resource->sha1_hash, sizeof(resource->sha1_hash)); tputchar(T('\n')); if (!resource->is_missing) { tprintf(T("Uncompressed size = %" PRIu...
print_resource
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_time(const tchar *type, const timespec *wts, int32_t high_part) { time_t t; tm tm; char timestr[104]; unsigned long v6; v6 = __readfsqword(0x28u); t = wts->tv_sec; gmtime_r(&t, &tm); strftime(timestr, 0x64u, "%a %b %d %H:%M:%S %Y UTC", &tm); timestr[99] = 0; printf("%-20s= %s\n", type, t...
static void print_time(const tchar *type, const struct wimlib_timespec *wts, int32_t high_part) { tchar timestr[TIMESTR_MAX]; time_t t; struct tm tm; if (sizeof(wts->tv_sec) == 4 && sizeof(t) > sizeof(wts->tv_sec)) t = (uint32_t)wts->tv_sec | ((uint64_t)high_part << 32); else t...
print_time
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_usage_string(int cmd, FILE *fp) { const tchar *cmd_string; cmd_string = get_cmd_string(cmd, 0); fprintf(fp, usage_strings[cmd], cmd_string); }
static void print_usage_string(int cmd, FILE *fp) { tfprintf(fp, usage_strings[cmd], get_cmd_string(cmd, false)); }
print_usage_string
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void print_wim_information(const tchar *wimfile, const wimlib_wim_info *info) { const char *compression_type_string; tchar *p; tchar attr_string[264]; unsigned long v5; v5 = __readfsqword(0x28u); puts("WIM Information:"); puts("----------------"); printf("Path: %s\n", wimfile); printf("GUID...
static void print_wim_information(const tchar *wimfile, const struct wimlib_wim_info *info) { tchar attr_string[256]; tchar *p; tputs(T("WIM Information:")); tputs(T("----------------")); tprintf(T("Path: %" TS "\n"), wimfile); tprintf(T("GUID: 0x")); ...
print_wim_information
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void recommend_man_page(int cmd, FILE *fp) { const char *cmd_string; cmd_string = get_cmd_string(cmd, 1); fprintf( fp, "Some uncommon options are not listed; see `man %s' for more details.\n", cmd_string); }
static void recommend_man_page(int cmd, FILE *fp) { const tchar *format_str; #ifdef __WIN32__ format_str = T("Some uncommon options are not listed;\n" "See %" TS ".pdf in the doc directory for more details.\n"); #else format_str = T("Some uncommon options are not listed; see `man %" TS ...
recommend_man_page
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void report_scan_progress(const wimlib_progress_info_scan *scan, bool done) { const wimlib_tchar *cur_path; const wimlib_tchar *wim_target_path; uint64_t num_nondirs_scanned; char unit_shift; const tchar *unit_name; uint64_t prev_count; uint64_t cur_count; unsigned long v9; v9 = __readfsqword(0x28u);...
static void report_scan_progress(const struct wimlib_progress_info_scan *scan, bool done) { uint64_t prev_count, cur_count; prev_count = last_scan_progress.num_nondirs_scanned + last_scan_progress.num_dirs_scanned; cur_count = scan->num_nondirs_scanned + scan->num_...
report_scan_progress
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void report_split_progress(uint64_t bytes_completed_in_part) { uint64_t v1; unsigned int percent_done; char unit_shift; const tchar *unit_name; uint64_t completed_bytes; unsigned long v6; v6 = __readfsqword(0x28u); completed_bytes = last_split_progress.completed_bytes + bytes_completed_in_part; ...
static void report_split_progress(uint64_t bytes_completed_in_part) { uint64_t completed_bytes = last_split_progress.completed_bytes + bytes_completed_in_part; unsigned percent_done = TO_PERCENT(completed_bytes, last_split_progress.total_bytes); unsigned unit_shift; const tchar *unit_name; unit_s...
report_split_progress
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int set_compact_mode(const tchar *arg, int *extract_flags) { int flag; flag = 0; if (!strcasecmp(arg, "xpress4k")) { flag = 0x1000000; } else if (!strcasecmp(arg, "xpress8k")) { flag = 0x2000000; } else if (!strcasecmp(arg, "xpress16k")) { flag = 0x4000000; } else if (!strcasecmp(arg, "lzx")) {...
static int set_compact_mode(const tchar *arg, int *extract_flags) { int flag = 0; if (!tstrcasecmp(arg, T("xpress4k"))) flag = WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS4K; else if (!tstrcasecmp(arg, T("xpress8k"))) flag = WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS8K; else if (!tstrcasecmp(arg, T("xpress16k"))) fla...
set_compact_mode
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void set_fd_to_binary_mode(int fd) { ; }
static inline void set_fd_to_binary_mode(int fd) {}
set_fd_to_binary_mode
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
char *stdin_get_contents(size_t *len_ret) { char *buf; size_t newlen; size_t pos; size_t inc; char *p; size_t bytes_to_read; size_t bytes_read; buf = 0; newlen = 1024; pos = 0; for (inc = 1024;; inc = (3 * inc) >> 1) { p = (char *)realloc(buf, newlen); if (!p) { imagex_error("out of...
static char *stdin_get_contents(size_t *len_ret) { char *buf = NULL; size_t newlen = 1024; size_t pos = 0; size_t inc = 1024; for (;;) { char *p = realloc(buf, newlen); size_t bytes_read, bytes_to_read; if (!p) { imagex_error(T("out of memory while reading stdin")); break; } b...
stdin_get_contents
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
tchar *stdin_get_text_contents(size_t *num_tchars_ret) { size_t num_bytes; char *contents; unsigned long v4; v4 = __readfsqword(0x28u); contents = stdin_get_contents(&num_bytes); if (contents) return translate_text_to_tstr(contents, num_bytes, num_tchars_ret); else return 0; }
static tchar *stdin_get_text_contents(size_t *num_tchars_ret) { char *contents; size_t num_bytes; contents = stdin_get_contents(&num_bytes); if (!contents) return NULL; return translate_text_to_tstr(contents, num_bytes, num_tchars_ret); }
stdin_get_text_contents
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int string_list_append(string_list *list, tchar *glob) { tchar **strings; unsigned int num_strings; unsigned int num_alloc_strings; unsigned int num_alloc_stringsa; tchar **new_strings; num_alloc_strings = list->num_alloc_strings; if (num_alloc_strings == list->num_strings) { num_alloc_stringsa = num...
static int string_list_append(struct string_list *list, tchar *glob) { unsigned num_alloc_strings = list->num_alloc_strings; if (list->num_strings == num_alloc_strings) { tchar **new_strings; num_alloc_strings += 4; new_strings = realloc(list->strings, sizeof(list->strings[0]) * num_alloc_stri...
string_list_append
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void string_list_destroy(string_list *list) { free(list->strings); }
static void string_list_destroy(struct string_list *list) { free(list->strings); }
string_list_destroy
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
tchar *tbasename(tchar *path) { tchar *p; for (p = &path[strlen(path)];; *p = 0) { if (p == path) return path; if (!is_any_path_separator(*--p)) break; } do { if (p == path) return path; --p; } while (!is_any_path_separator(*p)); return p + 1; }
static tchar *tbasename(tchar *path) { tchar *p = tstrchr(path, T('\0')); for (;;) { if (p == path) return path; if (!is_any_path_separator(*--p)) break; *p = T('\0'); } for (;;) { if (p == path) return path; if (is_any_path_separator(*--p)) return ++p; } }
tbasename
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
ssize_t text_file_count_lines(tchar **contents_p, size_t *nchars_p) { ssize_t nlines; size_t nchars; size_t i; tchar *contents; tchar *contentsa; nlines = 0; contents = *contents_p; nchars = *nchars_p; for (i = 0; i < nchars; ++i) { if (contents[i] == 10) ++nlines; } if (nchars && conte...
static ssize_t text_file_count_lines(tchar **contents_p, size_t *nchars_p) { ssize_t nlines = 0; tchar *contents = *contents_p; size_t nchars = *nchars_p; size_t i; for (i = 0; i < nchars; i++) if (contents[i] == T('\n')) nlines++; if (nchars != 0 && contents[nchars - 1] != T('\n')) { conten...
text_file_count_lines
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
tchar *translate_text_to_tstr(char *text, size_t num_bytes, size_t *num_tchars_ret) { *num_tchars_ret = num_bytes; return text; }
static tchar *translate_text_to_tstr(char *text, size_t num_bytes, size_t *num_tchars_ret) { #ifndef __WIN32__ *num_tchars_ret = num_bytes; return text; #else wchar_t *text_wstr; size_t num_wchars; if (num_bytes >= 2 && (((unsigned char)text[0] == 0xff && (unsigne...
translate_text_to_tstr
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void update_command_add_nonoption(int op, const tchar *nonoption, wimlib_update_command *cmd, unsigned int num_nonoptions) { if (op == 2) { if (num_nonoptions) cmd->add.wim_target_path = (wimlib_tchar *)nonoption; else cmd->add.fs...
static void update_command_add_nonoption(int op, const tchar *nonoption, struct wimlib_update_command *cmd, unsigned num_nonoptions) { switch (op) { case WIMLIB_UPDATE_OP_ADD: if (num_nonoptions == 0) cmd->add.fs_source_path...
update_command_add_nonoption
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
bool update_command_add_option(int op, const tchar *option, wimlib_update_command *cmd) { int add_flags; char recognized; recognized = 1; if (op) { if (op == 1) { if (!strcmp(option, "--force")) { cmd->delete_.delete_flags |= 1u; } else if (!strcmp(option,...
static bool update_command_add_option(int op, const tchar *option, struct wimlib_update_command *cmd) { bool recognized = true; switch (op) { case WIMLIB_UPDATE_OP_ADD: if (!tstrcmp(option, T("--verbose"))) cmd->add.add_flags |= WIMLIB_ADD_FLAG_VERBOSE; else if ...
update_command_add_option
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void usage(int cmd, FILE *fp) { fwrite("Usage:\n", 1u, 7u, fp); print_usage_string(cmd, fp); fputc(10, fp); recommend_man_page(cmd, fp); }
static void usage(int cmd, FILE *fp) { tfprintf(fp, T("Usage:\n")); print_usage_string(cmd, fp); tfprintf(fp, T("\n")); recommend_man_page(cmd, fp); }
usage
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void usage_all(FILE *fp) { int cmd; fwrite("Usage:\n", 1u, 7u, fp); for (cmd = 0; cmd <= 15; ++cmd) { print_usage_string(cmd, fp); fputc(10, fp); } fprintf(fp, " %s --help\n %s --version\n\n", invocation_name, invocation_name); fwrite("IMAGE can be the 1-based index or name of an im...
static void usage_all(FILE *fp) { tfprintf(fp, T("Usage:\n")); for (int cmd = 0; cmd < CMD_MAX; cmd++) { print_usage_string(cmd, fp); tfprintf(fp, T("\n")); } static const tchar *const extra = T(" %" TS " --help\n" " %" TS " --version\n" ...
usage_all
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int verify_image_exists(int image, const tchar *image_name, const tchar *wim_name) { const char *cmd_string; if (image) return 0; cmd_string = get_cmd_string(7, 0); imagex_error("\"%s\" is not a valid image in \"%s\"!\n" " Please specify a 1-based image index or...
static int verify_image_exists(int image, const tchar *image_name, const tchar *wim_name) { if (image == WIMLIB_NO_IMAGE) { imagex_error(T("\"%" TS "\" is not a valid image in \"%" TS "\"!\n" " Please specify a 1-based image index or " "im...
verify_image_exists
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int verify_image_exists_and_is_single(int image, const tchar *image_name, const tchar *wim_name) { int ret; ret = verify_image_exists(image, image_name, wim_name); if (!ret) return verify_image_is_single(image); return ret; }
static int verify_image_exists_and_is_single(int image, const tchar *image_name, const tchar *wim_name) { int ret; ret = verify_image_exists(image, image_name, wim_name); if (ret == 0) ret = verify_image_is_single(image); return ret; }
verify_image_exists_and_is_single
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
int verify_image_is_single(int image) { if (image != -1) return 0; imagex_error("Cannot specify all images for this action!"); return 18; }
static int verify_image_is_single(int image) { if (image == WIMLIB_ALL_IMAGES) { imagex_error(T("Cannot specify all images for this action!")); return WIMLIB_ERR_INVALID_IMAGE; } return 0; }
verify_image_is_single
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0
void version() { const char *version_string; version_string = (const char *)wimlib_get_version_string(); fprintf(stdout, "wimlib-imagex 1.13.4 (using wimlib %s)\n" "Copyright (C) 2012-2021 Eric Biggers\n" "License GPLv3+; GNU GPL version 3 or later " "<http://gnu.org/licen...
static void version(void) { static const tchar *const fmt = T("wimlib-imagex " PACKAGE_VERSION " (using wimlib %" TS ")\n" "Copyright (C) 2012-2021 Eric Biggers\n" "License GPLv3+; GNU GPL version 3 or later " "<http://gnu.org/licenses/gpl.html>.\n" "This is free software: you ar...
version
wimlib-1.13.4-r1
app-arch
O0/app-arch/wimlib-1.13.4-r1/wimsplit
ida
O0