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 |
|---|---|---|---|---|---|---|---|
char *prepare_shortopts(char *buf, const char *n,
const acc_getopt_longopt_t *longopts) {
char *v3;
char *v4;
char *v5;
char *v6;
int v;
char *o;
o = buf;
while (n && *n) {
if (*n != 32) {
v3 = o++;
*v3 = *n;
}
++n;
}
*o = 0;
while (longopts && long... | static char *prepare_shortopts(char *buf, const char *n,
const struct acc_getopt_longopt_t *longopts) {
char *o = buf;
for (; n && *n; n++)
if (*n != ' ')
*o++ = *n;
*o = 0;
for (; longopts && longopts->name; longopts++) {
int v = longopts->val;
if (v > 0 && v <... | prepare_shortopts | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void print_os(FILE *f, unsigned int flags) {
fprintf(f, "%2ld", HIBYTE(flags));
} | static void print_os(FILE *f, lzo_uint32 flags) {
flags = (flags & F_OS_MASK) >> F_OS_SHIFT;
fprintf(f, "%2ld", (long)flags);
} | print_os | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void print_version(FILE *f, unsigned int v) {
fprintf(f, "%1x.%03x", (unsigned short)v >> 12, v & 0xFFF);
} | static void print_version(FILE *f, unsigned v) {
fprintf(f, "%1x.%03x", (v >> 12) & 0xf, v & 0xfff);
} | print_version | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void read32(file_t *ft, unsigned int *v) {
unsigned char b[4];
unsigned long v3;
v3 = __readfsqword(0x28u);
if (read_buf(ft, b, 4) != 4)
read_error(ft);
*v = get_be32(b);
} | void read32(file_t *ft, lzo_uint32 *v) {
unsigned char b[4];
if (read_buf(ft, b, 4) != 4)
read_error(ft);
*v = get_be32(b);
} | read32 | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_int read_buf(file_t *ft, void *buffer, lzo_int cnt) {
lzo_int l;
if ((unsigned long)cnt > 0x7FFFFFFFFFFFFFFELL)
__assert_fail("cnt >= 0 && cnt < LONG_MAX", "src/lzop.c", 0x1B3u,
"read_buf");
l = acc_safe_hread(ft->fd, buffer, cnt);
if (l < 0)
__assert_fail("n >= 0", "src/lzop.c", ... | lzo_int read_buf(file_t *ft, lzo_voidp buffer, lzo_int cnt) {
lzo_int n;
long l;
assert(cnt >= 0 && cnt < LONG_MAX);
l = acc_safe_hread(ft->fd, buffer, (long)cnt);
n = (lzo_int)l;
assert(n >= 0);
assert(n == l);
ft->bytes_read += n;
total_bytes_read += n;
return n;
} | read_buf | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void read_error(file_t *ft) {
char *name;
int *v2;
char *errmsg;
const char *fn;
if (ft && ft->name[0])
name = ft->name;
else
name = "<unknown>";
fn = name;
errmsg = "unexpected end of file";
if (*__errno_location()) {
v2 = __errno_location();
errmsg = strerror(*v2);
}
fflush(con_... | void read_error(file_t *ft) {
const char *fn = ft && ft->name[0] ? ft->name : UNKNOWN_NAME;
const char *errmsg = "unexpected end of file";
if (errno != 0)
errmsg = strerror(errno);
fflush(con_term);
fprintf(stderr, "%s%s: %s: %s\n", err_nl, progname, errmsg, fn);
e_exit(EXIT_FATAL);
} | read_error | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
int read_header(file_t *ft, header_t *h) {
unsigned int f_crc32;
unsigned int f_adler32;
unsigned int k;
int l;
unsigned int checksum;
unsigned int checksuma;
int r;
char name[264];
unsigned long v11;
v11 = __readfsqword(0x28u);
memset(h, 0, sizeof(header_t));
h->version_needed_to_extract = 230... | static int read_header(file_t *ft, header_t *h) {
int r;
int l;
lzo_uint32 checksum;
memset(h, 0, sizeof(header_t));
h->version_needed_to_extract = 0x0900;
h->level = 0;
h->method_name = "unknown";
ft->f_adler32 = ADLER32_INIT_VALUE;
ft->f_crc32 = CRC32_INIT_VALUE;
f_read16(ft, &h->version);
if... | read_header | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void restore_perms(const header_t *h) {
utimbuf u;
unsigned long v2;
v2 = __readfsqword(0x28u);
if (opt_restore_time && (h->mtime_low || h->mtime_high)) {
u.modtime = get_mtime(h);
u.actime = u.modtime;
if (u.modtime && utime(fo.name, &u))
p_warn(&fo, "can't restore file time");
} else if (... | static void restore_perms(const header_t *h) {
#if defined(HAVE_UTIME)
struct utimbuf u;
if (opt_restore_time && (h->mtime_low || h->mtime_high)) {
u.actime = u.modtime = get_mtime(h);
if (u.actime)
if (utime(fo.name, &u) != 0)
p_warn(&fo, "can't restore file time");
} else if (fi.st.st_ati... | restore_perms | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void sanity_check() { ; } | static void sanity_check(void) {
#if (ACC_CC_MSC && ((_MSC_VER) < 700))
#else
#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
#include "miniacc.h"
#endif
#undef ACCCHK_ASSERT
#undef ACC_WANT_ACC_CHK_CH
} | sanity_check | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_be16(unsigned char *b, unsigned int v) {
b[1] = v;
*b = BYTE1(v);
} | static void set_be16(unsigned char *b, unsigned v) {
b[1] = (unsigned char)(v >> 0);
b[0] = (unsigned char)(v >> 8);
} | set_be16 | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_be32(unsigned char *b, unsigned int v) {
b[3] = v;
b[2] = BYTE1(v);
b[1] = BYTE2(v);
*b = HIBYTE(v);
} | static void set_be32(unsigned char *b, lzo_uint32 v) {
b[3] = (unsigned char)(v >> 0);
b[2] = (unsigned char)(v >> 8);
b[1] = (unsigned char)(v >> 16);
b[0] = (unsigned char)(v >> 24);
} | set_be32 | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_cmd(int cmd) {
if ((cmd != 1 || opt_pgm != 1 && opt_pgm != 2) && cmd > opt_cmd)
opt_cmd = cmd;
} | void set_cmd(int cmd) {
if (cmd == CMD_COMPRESS && (opt_pgm == PGM_UNLZOP || opt_pgm == PGM_OCAT))
return;
#if 0
if (opt_cmd != CMD_NONE && cmd != opt_cmd)
{
fprintf(stderr,"%s: multiple commands given\n",argv0);
e_usage();
}
opt_cmd = cmd;
#else
if (cmd > opt_cmd)
opt_cmd =... | set_cmd | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_bool set_ec(int ec) { return set_eec(ec, &exit_code); } | static lzo_bool set_ec(int ec) { return set_eec(ec, &exit_code); } | set_ec | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_bool set_eec(int ec, int *eec) {
if (ec == 3) {
*eec = 1;
return 1;
} else {
if (ec < 0 || ec == 1) {
*eec = 1;
} else if (ec == 2) {
if (!opt_ignorewarn && !*eec)
*eec = 2;
} else if (ec) {
__assert_fail("0", "src/lzop.c", 0x97u, "set_eec");
}
return 0;
}... | static lzo_bool set_eec(int ec, int *eec) {
if (ec == EXIT_FATAL) {
*eec = EXIT_ERROR;
return 1;
} else if (ec < 0 || ec == EXIT_ERROR) {
*eec = EXIT_ERROR;
} else if (ec == EXIT_WARN) {
if (!opt_ignorewarn)
if (*eec == EXIT_OK)
*eec = ec;
} else if (ec == EXIT_OK) {
} else {
... | set_eec | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_err_nl(lzo_bool x) {
const char *v1;
if (x)
v1 = "\n";
else
v1 = &n;
err_nl = v1;
} | void set_err_nl(lzo_bool x) { err_nl = x ? "\n" : ""; } | set_err_nl | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_bool set_method(int m, int l) {
if (x_set_method(m, l))
return 0;
set_cmd(1);
return 1;
} | lzo_bool set_method(int m, int l) {
if (x_set_method(m, l) != 0)
return 0;
set_cmd(CMD_COMPRESS);
return 1;
} | set_method | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_output_name(const char *n, lzo_bool allow_m) {
if (done_output_name > 0) {
fprintf(stderr, "%s: option '-o' more than once given\n", argv0);
e_usage();
}
if (!n || !*n || !allow_m && *n == 45) {
fprintf(stderr, "%s: missing output name\n", argv0);
e_usage();
}
if (strlen(n) > 0xFFF) {... | void set_output_name(const char *n, lzo_bool allow_m) {
#if 1
if (done_output_name > 0) {
fprintf(stderr, "%s: option '-o' more than once given\n", argv0);
e_usage();
}
#endif
if (!n || !n[0] || (!allow_m && n[0] == '-')) {
fprintf(stderr, "%s: missing output name\n", argv0);
e_usage();
}
if (... | set_output_name | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_output_path(const char *n, lzo_bool allow_m) {
const char *v2;
const char *p;
stat st;
file_t f;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (done_output_path > 0) {
fprintf(stderr, "%s: option '-p' more than once given\n", argv0);
e_usage();
}
if (!n || !allow_m && *n == 45) {
... | void set_output_path(const char *n, lzo_bool allow_m) {
int r;
struct stat st;
file_t f;
#if 1
if (done_output_path > 0) {
fprintf(stderr, "%s: option '-p' more than once given\n", argv0);
e_usage();
}
#endif
if (!n || (!allow_m && n[0] == '-')) {
fprintf(stderr, "%s: missing path\n", argv0);
... | set_output_path | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_rwx(unsigned int mode, char *str) {
char v2;
char v3;
char v4;
if ((mode & 4) != 0)
v2 = 114;
else
v2 = 45;
*str = v2;
if ((mode & 2) != 0)
v3 = 119;
else
v3 = 45;
str[1] = v3;
if ((mode & 1) != 0)
v4 = 120;
else
v4 = 45;
str[2] = v4;
} | static void set_rwx(unsigned mode, char *str) {
str[0] = (char)((mode & 4) ? 'r' : '-');
str[1] = (char)((mode & 2) ? 'w' : '-');
str[2] = (char)((mode & 1) ? 'x' : '-');
} | set_rwx | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_st(unsigned int mode, char *str) {
char v2;
char v3;
char v4;
if ((mode & 0x800) != 0) {
if (str[3] == 120)
v2 = 115;
else
v2 = 83;
str[3] = v2;
}
if ((mode & 0x400) != 0) {
if (str[6] == 120)
v3 = 115;
else
v3 = 83;
str[6] = v3;
}
if ((mode & 0x... | static void set_st(unsigned mode, char *str) {
#ifdef S_ISUID
if (mode & S_ISUID)
str[3] = (char)(str[3] == 'x' ? 's' : 'S');
#endif
#ifdef S_ISGID
if (mode & S_ISGID)
str[6] = (char)(str[6] == 'x' ? 's' : 'S');
#endif
#ifdef S_ISVTX
if (mode & S_ISVTX)
str[9] = (char)(str[9] == 'x' ? 't' : 'T');
#end... | set_st | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_bool set_suffix(const char *n) {
const char *p;
const char **is;
size_t l;
is = (const char **)invalid_suffixes_5;
if (done_suffix > 0) {
fprintf(stderr, "%s: option '-S' more than once given\n", argv0);
e_usage();
}
while (n && *n == 46)
++n;
if (!n || !*n || *n == 45)
return 0;
... | lzo_bool set_suffix(const char *n) {
size_t l;
const char *p;
static const char *const invalid_suffixes[] = {
"ace", "arc", "arj", "bz", "bz2", "gz", "lha", "lzh",
#if !defined(NRVP)
"nrv", "tnv",
#endif
"rar", "raw", "sz", "tar", "taz", "tbz", "tgz", "tsz",
"upx", "Z", "zip", "zoo", ... | set_suffix | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void set_term(FILE *f) {
FILE *v1;
if (f) {
con_term = f;
} else {
if (acc_isatty(1))
v1 = stdout;
else
v1 = stderr;
con_term = v1;
}
} | void set_term(FILE *f) {
if (f)
con_term = f;
else
con_term = acc_isatty(STDOUT_FILENO) ? stdout : stderr;
} | set_term | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void sysinfo() {
struct tm *v0;
struct tm *v1;
time_t t;
FILE *f;
const char *env;
char s[40];
unsigned long v6;
v6 = __readfsqword(0x28u);
f = con_term;
env = 0;
head();
t = time(0);
v0 = localtime(&t);
tm2str(s, 0x28u, v0);
con_fprintf(f, "Local time is: %s\n", s);
v1 = gmtime(&t);
... | void sysinfo(void) {
FILE *f = con_term;
int fg = 0;
const char *env = NULL;
head();
#if defined(HAVE_LOCALTIME) && defined(HAVE_GMTIME)
{
char s[40];
time_t t;
t = time(NULL);
tm2str(s, sizeof(s), localtime(&t));
con_fprintf(f, "Local time is: %s\n", s);
tm2str(s, sizeof(s), gmtim... | sysinfo | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void t_add(unsigned char *p, lzo_uint l, int n) {
unsigned char *v3;
lzo_uint la;
int i;
int ia;
unsigned char b[24];
unsigned long v9;
la = l;
v9 = __readfsqword(0x28u);
if (n <= 0 || n > 16)
__assert_fail("n > 0 && n <= (int)sizeof(b)", "src/filter.c", 0x5Eu,
"t_add");
if (l... | void t_add(lzo_bytep p, lzo_uint l, int n) {
unsigned char b[16];
int i;
assert(n > 0 && n <= (int)sizeof(b));
if (l <= (lzo_uint)n)
return;
n--;
i = n;
do
b[i] = 0;
while (--i >= 0);
i = n;
do {
b[i] += *p;
*p++ = b[i];
if (--i < 0)
i = n;
} while (--l > 0);
} | t_add | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void t_add1(unsigned char *p, lzo_uint l) {
unsigned char *v2;
lzo_uint la;
unsigned char b;
la = l;
for (b = 0; la; --la) {
b += *p;
v2 = p++;
*v2 = b;
}
} | void t_add1(lzo_bytep p, lzo_uint l) {
unsigned char b = 0;
if (l > 0)
do {
b += *p;
*p++ = b;
} while (--l > 0);
} | t_add1 | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void t_mtf(unsigned char *p, lzo_uint l) {
unsigned char *v2;
lzo_uint la;
unsigned char c;
unsigned int i;
unsigned int ia;
unsigned char b[264];
unsigned long v9;
la = l;
v9 = __readfsqword(0x28u);
if (l > 1) {
i = 256;
do {
--i;
b[i] = i;
} while (i);
do {
c = *... | void t_mtf(lzo_bytep p, lzo_uint l) {
unsigned char b[256];
unsigned char c;
unsigned i;
if (l <= 1)
return;
i = 256;
do {
--i;
b[i] = (unsigned char)i;
} while (i != 0);
do {
c = *p;
for (i = 0; c != b[i];)
i++;
*p++ = (unsigned char)i;
if (i > 0) {
do
... | t_mtf | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void t_sub(unsigned char *p, lzo_uint l, int n) {
unsigned char *v3;
lzo_uint la;
int i;
int ia;
unsigned char b[24];
unsigned long v9;
la = l;
v9 = __readfsqword(0x28u);
if (n <= 0 || n > 16)
__assert_fail("n > 0 && n <= (int)sizeof(b)", "src/filter.c", 0x48u,
"t_sub");
if (l... | void t_sub(lzo_bytep p, lzo_uint l, int n) {
unsigned char b[16];
int i;
assert(n > 0 && n <= (int)sizeof(b));
if (l <= (lzo_uint)n)
return;
n--;
i = n;
do
b[i] = 0;
while (--i >= 0);
i = n;
do {
*p -= b[i];
b[i] += *p++;
if (--i < 0)
i = n;
} while (--l > 0);
} | t_sub | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void t_sub1(unsigned char *p, lzo_uint l) {
unsigned char *v2;
lzo_uint la;
unsigned char b;
la = l;
for (b = 0; la; --la) {
*p -= b;
v2 = p++;
b += *v2;
}
} | void t_sub1(lzo_bytep p, lzo_uint l) {
unsigned char b = 0;
if (l > 0)
do {
*p -= b;
b += *p++;
} while (--l > 0);
} | t_sub1 | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void t_unmtf(unsigned char *p, lzo_uint l) {
unsigned char *v2;
lzo_uint la;
unsigned char c;
unsigned int i;
unsigned int ia;
unsigned char b[264];
unsigned long v9;
la = l;
v9 = __readfsqword(0x28u);
if (l > 1) {
i = 256;
do {
--i;
b[i] = i;
} while (i);
do {
ia ... | void t_unmtf(lzo_bytep p, lzo_uint l) {
unsigned char b[256];
unsigned char c;
unsigned i;
if (l <= 1)
return;
i = 256;
do {
--i;
b[i] = (unsigned char)i;
} while (i != 0);
do {
i = *p;
c = b[i];
*p++ = c;
if (i > 0) {
do
b[i] = b[i - 1];
while (--i > 0... | t_unmtf | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void time2ls(char *s, size_t size, const time_t *t) {
struct tm *v3;
const char *fmt;
double d;
fmt = "%b %e %Y";
d = difftime(current_time, *t);
if (d <= 15552000.0 && d >= -3600.0)
fmt = "%b %e %H:%M";
if (size <= 0xC)
__assert_fail("size >= 13", "src/util.c", 0x119u, "time2ls");
v3 = localt... | void time2ls(char *s, size_t size, const time_t *t) {
#if defined(HAVE_LOCALTIME) && defined(HAVE_STRFTIME)
const char *fmt = "%b %e %Y";
#if defined(HAVE_DIFFTIME)
#if (ACC_OS_DOS16)
long d = (long)current_time - (long)*t;
#else
const double d = difftime(current_time, *t);
#endif
if (d <= 6 * 30 * 24 * 3600L... | time2ls | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void time2str(char *s, size_t size, const time_t *t) {
struct tm *v3;
v3 = localtime(t);
tm2str(s, size, v3);
} | void time2str(char *s, size_t size, const time_t *t) {
#if defined(HAVE_LOCALTIME)
tm2str(s, size, localtime(t));
#elif defined(HAVE_CTIME)
const char *p = ctime(t);
assert(size >= 18);
memset(s, ' ', 16);
memcpy(s + 2, p + 4, 6);
memcpy(s + 11, p + 11, 5);
s[16] = 0;
#else
s[0] = 0;
UNUSED(size);
#en... | time2str | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void tm2str(char *s, size_t size, const tm *tmp) {
if (size <= 0x11)
__assert_fail("size >= 18", "src/util.c", 0xE9u, "tm2str");
snprintf(s, size, "%04d-%02d-%02d %02d:%02d:%02d", tmp->tm_year + 1900,
tmp->tm_mon + 1, tmp->tm_mday, tmp->tm_hour, tmp->tm_min,
tmp->tm_sec);
} | void tm2str(char *s, size_t size, const struct tm *tmp) {
assert(size >= 18);
#if defined(HAVE_SNPRINTF)
snprintf(s, size, "%04d-%02d-%02d %02d:%02d:%02d", (int)tmp->tm_year + 1900,
(int)tmp->tm_mon + 1, (int)tmp->tm_mday, (int)tmp->tm_hour,
(int)tmp->tm_min, (int)tmp->tm_sec);
#else
sprintf... | tm2str | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void try_init(console_t *c, FILE *f) {
int k;
if (!c)
__assert_fail("c", "src/c_init.c", 0x2Fu, "try_init");
if (!c->init)
__assert_fail("c->init", "src/c_init.c", 0x30u, "try_init");
k = c->init(f, (unsigned int)opt_console, (unsigned int)con_mode);
if (k && k > con_mode) {
con_mode = k;
con... | static void try_init(console_t *c, FILE *f) {
int k;
assert(c);
assert(c->init);
k = c->init(f, opt_console, con_mode);
if (k == CON_INIT)
return;
#if 0
if (con_mode != CON_INIT && opt_console != CON_INIT)
if (k != opt_console)
return;
#endif
if (k > con_mode) {
con_mode = k... | try_init | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void usage() {
con_fprintf(con_term,
"Usage: %s [-dxlthIVL%s] [-qvcfFnNPkUp] [-o file] [-S suffix] "
"[%sfile..]\n",
progname, (const char *)&off_F2FF, (const char *)&unk_F2FE);
} | void usage(void) {
FILE *f = con_term;
con_fprintf(f,
"Usage: %s [-dxlthIVL%s] [-qvcfFnNPkUp] [-o file] [-S suffix] "
"[%sfile..]\n",
progname,
#if defined(USE_LZO1X_1_15) && defined(USE_LZO1X_999)
"19",
#elif defined(USE_LZO1X_1_15)
"1",
#else
... | usage | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void version() {
const unsigned char *qq;
char *q;
char *qa;
size_t i;
FILE *f;
const char *p;
char *s;
char pp[2056];
unsigned long v8;
v8 = __readfsqword(0x28u);
f = con_term;
head();
con_fprintf(f, "lzop version: v1.04, Aug 10th 2017\nlzop build date: Jul 18 "
"2022 22:06:... | void version(void) {
FILE *f = con_term;
char pp[2048];
const lzo_bytep qq;
char *p, *q, *s;
size_t i;
head();
con_fprintf(f,
"lzop version: v" LZOP_VERSION_STRING ", " LZOP_VERSION_DATE "\n"
"lzop build date: " LZOP_BUILD_DATE_TIME "\n");
for (i = 0, qq = lzo_copyright();... | version | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void warn(file_t *ft, const char *msg) { do_error(ft, err_nl, msg, 2, 0); } | void warn(file_t *ft, const char *msg) {
do_error(ft, err_nl, msg, EXIT_WARN, 0);
} | warn | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_bool warn_multipart(file_t *ft, const header_t *h) {
if (!ft->part && (h->flags & 0x400) == 0)
return 1;
if (opt_stdin && opt_stdout && opt_cmd == 3 && can_restore_name(ft, h))
return 1;
if (opt_stdout || opt_output_name) {
if (!ft->warn_multipart)
warn(&fi, "this is a multipart archive (try... | static lzo_bool warn_multipart(file_t *ft, const header_t *h) {
if (!((ft->part > 0) || (h->flags & F_MULTIPART)))
return 1;
if (opt_stdin && opt_stdout && opt_cmd == CMD_TEST && can_restore_name(ft, h))
return 1;
if (opt_stdout || opt_output_name) {
if (!ft->warn_multipart)
warn(&fi, "this is ... | warn_multipart | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void write32(file_t *ft, unsigned int v) {
unsigned char b[4];
unsigned long v3;
v3 = __readfsqword(0x28u);
set_be32(b, v);
write_buf(ft, b, 4);
} | void write32(file_t *ft, lzo_uint32 v) {
unsigned char b[4];
set_be32(b, v);
write_buf(ft, b, 4);
} | write32 | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void write_buf(file_t *ft, const void *buffer, lzo_int cnt) {
long l;
if ((unsigned long)cnt > 0x7FFFFFFFFFFFFFFELL)
__assert_fail("cnt >= 0 && cnt < LONG_MAX", "src/lzop.c", 0x1C3u,
"write_buf");
if (ft->fd >= 0) {
l = acc_safe_hwrite(ft->fd, buffer, cnt);
if (l < 0)
__assert... | void write_buf(file_t *ft, const lzo_voidp buffer, lzo_int cnt) {
lzo_int n;
long l;
assert(cnt >= 0 && cnt < LONG_MAX);
if (ft->fd < 0)
return;
l = acc_safe_hwrite(ft->fd, buffer, (long)cnt);
n = (lzo_int)l;
assert(n >= 0);
assert(n == l);
ft->bytes_written += n;
total_bytes_written += n;
i... | write_buf | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void write_error(file_t *ft) {
char *name;
int *v2;
char *errmsg;
const char *fn;
if (ft && ft->name[0])
name = ft->name;
else
name = "<unknown>";
fn = name;
errmsg = "write error";
if (*__errno_location()) {
v2 = __errno_location();
errmsg = strerror(*v2);
}
fflush(con_term);
f... | void write_error(file_t *ft) {
const char *fn = ft && ft->name[0] ? ft->name : UNKNOWN_NAME;
const char *errmsg = "write error";
if (errno != 0)
errmsg = strerror(errno);
fflush(con_term);
fprintf(stderr, "%s%s: %s: %s\n", err_nl, progname, errmsg, fn);
e_exit(EXIT_FATAL);
} | write_error | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void write_header(file_t *ft, const header_t *h) {
size_t l;
write_buf(ft, lzop_magic, 9);
ft->f_adler32 = 1;
ft->f_crc32 = 0;
f_write16(ft, h->version);
f_write16(ft, h->lib_version);
f_write16(ft, h->version_needed_to_extract);
f_write8(ft, h->method);
f_write8(ft, h->level);
f_write32(ft, h->fla... | void write_header(file_t *ft, const header_t *h) {
size_t l;
#ifdef MAINT
if (opt_noheader > 0) {
switch (opt_noheader) {
case 1:
write32(ft, h->flags);
break;
case 2:
write32(ft, h->flags);
write8(ft, h->method);
write8(ft, h->level);
break;
default:
bre... | write_header | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_bool x_compress(file_t *fip, file_t *fop, header_t *h) {
lzo_bool ok;
init_compress_header(h, fip, fop);
if ((unsigned int)h->method - 1 > 2)
fatal(fip, "Internal error");
else
lzo_init_compress_header(h);
if (!x_enter(h))
e_memory();
if (opt_verbose > 1) {
if (opt_unlink)
fprintf... | lzo_bool x_compress(file_t *fip, file_t *fop, header_t *h) {
lzo_bool ok = 0;
init_compress_header(h, fip, fop);
switch (h->method) {
#if defined(WITH_LZO)
case M_LZO1X_1:
case M_LZO1X_1_15:
case M_LZO1X_999:
lzo_init_compress_header(h);
break;
#endif
#if defined(WITH_NRV)
case M_NRV1A:
case M_... | x_compress | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_bool x_decompress(file_t *fip, file_t *fop, const header_t *h,
lzo_bool skip) {
lzo_bool ok;
if (!x_enter(h))
e_memory();
if (skip) {
if (opt_cmd == 3)
__assert_fail("opt_cmd != CMD_TEST", "src/compress.c", 0x118u,
"x_decompress");
if (fop->fd >= 0)... | lzo_bool x_decompress(file_t *fip, file_t *fop, const header_t *h,
lzo_bool skip) {
lzo_bool ok = 0;
if (!x_enter(h))
e_memory();
if (skip) {
assert(opt_cmd != CMD_TEST);
assert(fop->fd < 0);
if (opt_cmd == CMD_DECOMPRESS && opt_verbose > 0)
fprintf(con_term, "skippin... | x_decompress | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
lzo_bool x_enter(const header_t *h) {
if (!h)
return lzo_enter(0) & 1;
if ((unsigned int)h->method - 1 > 2)
return 0;
return lzo_enter(h);
} | lzo_bool x_enter(const header_t *h) {
if (h == NULL) {
lzo_bool ok = 1;
#if defined(WITH_LZO)
ok &= lzo_enter(NULL);
#endif
#if defined(WITH_NRV)
ok &= nrv_enter(NULL);
#endif
#if defined(WITH_ZLIB)
ok &= zlib_enter(NULL);
#endif
return ok;
}
switch (h->method) {
#if defined(WITH_LZO)
case ... | x_enter | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void x_filter(unsigned char *p, lzo_uint l, const header_t *h) {
unsigned int f;
f = h->filter;
if (f && l) {
if (f == 1) {
if (opt_cmd == 1)
t_sub1(p, l);
else
t_add1(p, l);
} else if (f > 0x10) {
fatal(0, "Invalid filter");
} else if (opt_cmd == 1) {
t_sub(p,... | void x_filter(lzo_bytep p, lzo_uint l, const header_t *h) {
unsigned f = (unsigned)h->filter;
lzo_bool c = (opt_cmd == CMD_COMPRESS);
if (f == 0 || l <= 0)
return;
if (f == 1) {
if (c)
t_sub1(p, l);
else
t_add1(p, l);
} else if (f <= 16) {
if (c)
t_sub(p, l, f);
else
... | x_filter | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
int x_get_method(header_t *h) {
int r;
r = lzo_get_method(h);
if (r < 0)
return 14;
else
return r;
} | int x_get_method(header_t *h) {
int r = -1;
#if defined(WITH_LZO)
r = lzo_get_method(h);
if (r >= 0)
return r;
#endif
#if defined(WITH_NRV)
r = nrv_get_method(h);
if (r >= 0)
return r;
#endif
#if defined(WITH_ZLIB)
r = zlib_get_method(h);
if (r >= 0)
return 0;
#endif
UNUSED(r);
return 14... | x_get_method | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
void x_leave(const header_t *h) {
if (h) {
if ((unsigned int)h->method - 1 <= 2)
lzo_leave(h);
} else {
lzo_leave(0);
}
} | void x_leave(const header_t *h) {
if (h == NULL) {
#if defined(WITH_ZLIB)
zlib_leave(NULL);
#endif
#if defined(WITH_NRV)
nrv_leave(NULL);
#endif
#if defined(WITH_LZO)
lzo_leave(NULL);
#endif
return;
}
switch (h->method) {
#if defined(WITH_LZO)
case M_LZO1X_1:
case M_LZO1X_1_15:
case M_LZO1X... | x_leave | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
int x_set_method(int m, int l) {
int r;
r = lzo_set_method(m, l);
if (r < 0)
return -1;
else
return r;
} | int x_set_method(int m, int l) {
int r = -1;
#if defined(WITH_LZO)
r = lzo_set_method(m, l);
if (r >= 0)
return r;
#endif
#if defined(WITH_NRV)
r = nrv_set_method(m, l);
if (r >= 0)
return r;
#endif
#if defined(WITH_ZLIB)
r = zlib_set_method(m, l);
if (r >= 0)
return r;
#endif
UNUSED(r);
... | x_set_method | lzop-1.04-r1 | app-arch | O0/app-arch/lzop-1.04-r1/lzop | ida | O0 |
WORKSPACE *AllocateWorkspace() {
WORKSPACE *ws;
ws = (WORKSPACE *)calloc(1u, 0x60u);
if (!ws)
return 0;
ws->iBufSize = 0x400000;
ws->pszUncompBuf = (char *)malloc(ws->iBufSize);
if (ws->pszUncompBuf) {
ws->iCheckBufSize = 10240;
ws->pszCheckBuf = (char *)malloc(ws->iBufSize);
if (ws->pszChe... | WORKSPACE *AllocateWorkspace(void) {
WORKSPACE *ws = calloc(1, sizeof(WORKSPACE));
if (ws == NULL)
return NULL;
ws->iBufSize = 4 * MEGABYTE;
ws->pszUncompBuf = malloc(ws->iBufSize);
if (ws->pszUncompBuf == NULL) {
free(ws);
return NULL;
}
ws->iCheckBufSize = 10 * 1024;
ws->pszCheckBuf = ... | AllocateWorkspace | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int CheckZipStatus(unz64_s *UnzipStream, WORKSPACE *ws) {
unsigned int v3;
char *pszCheckBuf;
long v5;
char *ep;
unsigned long target_checksum;
off_t ch_length;
off_t ch_offset;
off_t i;
FILE *f;
unsigned long checksum;
char comment_buffer[24];
unsigned long v14;
v14 = __readfsqword(0x28u);
... | int CheckZipStatus(unz64_s *UnzipStream, WORKSPACE *ws) {
unsigned long checksum, target_checksum = 0;
off_t ch_length = UnzipStream->size_central_dir;
off_t ch_offset = UnzipStream->central_pos - UnzipStream->size_central_dir;
off_t i = 0;
char comment_buffer[COMMENT_LENGTH + 1];
char *ep = NULL;
unsigne... | CheckZipStatus | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void DisplayMigrateSummary(MIGRATE *mig) {
double v1;
const char *v2;
const char *v3;
const char *v4;
const char *v5;
double ExecTime;
double ExecTimea;
if (mig->fProcessLog) {
ExecTime = mig->ExecTime;
logprint(stdout, mig->fProcessLog, "Execution time %d hours ",
(int)ExecTime / ... | void DisplayMigrateSummary(MIGRATE *mig) {
double ExecTime;
if (mig->fProcessLog) {
ExecTime = mig->ExecTime;
logprint(stdout, mig->fProcessLog, "Execution time %d hours ",
(int)ExecTime / (60 * 60));
ExecTime = fmod(ExecTime, (60 * 60));
logprint(stdout, mig->fProcessLog, "%d mins ",... | DisplayMigrateSummary | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void DynamicStringArrayCheck(char **StringArray, int iElements) {
int i;
for (i = 0; i < iElements; ++i)
strlen(StringArray[i]);
} | void DynamicStringArrayCheck(char **StringArray, int iElements) {
int i, l;
for (i = 0; i < iElements; ++i) {
assert(StringArray[i]);
l = strlen(StringArray[i]);
assert(l >= 0);
assert(l <= MAX_PATH);
}
} | DynamicStringArrayCheck | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
char **DynamicStringArrayCreate(int iElements) {
int iCount;
char **StringArray;
StringArray = (char **)calloc(8u, iElements);
if (!StringArray)
return 0;
for (iCount = 0; iCount < iElements; ++iCount) {
StringArray[iCount] = (char *)malloc(0x401u);
if (!StringArray[iCount])
return DynamicS... | char **DynamicStringArrayCreate(int iElements) {
int iCount;
char **StringArray;
StringArray = (char **)calloc(sizeof(char *), iElements);
if (!StringArray)
return NULL;
for (iCount = 0; iCount < iElements; iCount++) {
StringArray[iCount] = (char *)malloc(MAX_PATH + 1);
if (!StringArray[iCount]... | DynamicStringArrayCreate | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
char **DynamicStringArrayDestroy(char **StringArray, int iElements) {
int iCount;
for (iCount = 0; iCount < iElements; ++iCount)
free(StringArray[iCount]);
free(StringArray);
return 0;
} | char **DynamicStringArrayDestroy(char **StringArray, int iElements) {
int iCount;
CHECK_DYNAMIC_STRING_ARRAY(StringArray, iElements);
for (iCount = 0; iCount < iElements; iCount++) {
free(StringArray[iCount]);
}
free(StringArray);
return NULL;
} | DynamicStringArrayDestroy | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
char **DynamicStringArrayResize(char **StringArray, int *piElements,
int iNewElements) {
char **StringArraya;
int iCount;
int iCounta;
for (iCount = iNewElements; iCount < *piElements; ++iCount)
free(StringArray[iCount]);
StringArraya = (char **)realloc(StringArray, 8LL * ... | char **DynamicStringArrayResize(char **StringArray, int *piElements,
int iNewElements) {
int iCount;
char **TmpPtr = NULL;
CHECK_DYNAMIC_STRING_ARRAY(StringArray, *piElements);
for (iCount = iNewElements; iCount < *piElements; iCount++) {
free(StringArray[iCount]);
}
Tm... | DynamicStringArrayResize | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int EndsWithCaseInsensitive(const char *str1, const char *str2) {
int n1;
int n2;
n1 = strlen(str1);
n2 = strlen(str2);
if (n2 >= n1)
return strcasecmp(str1, &str2[n2 - (long)n1]);
else
return strcasecmp(&str1[n1 - (long)n2], str2);
} | int EndsWithCaseInsensitive(const char *str1, const char *str2) {
int n1, n2;
n1 = strlen(str1);
n2 = strlen(str2);
if (n2 < n1) {
return strcasecmp(str1 + n1 - n2, str2);
} else {
return strcasecmp(str1, str2 + n2 - n1);
}
} | EndsWithCaseInsensitive | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int FindAndFixBadSlashes(WORKSPACE *ws) {
int slashFound;
int iArray;
int c;
slashFound = 0;
for (iArray = 0; *ws->FileNameArray[iArray]; ++iArray) {
for (c = 0; ws->FileNameArray[iArray][c]; ++c) {
if (ws->FileNameArray[iArray][c] == 92) {
ws->FileNameArray[iArray][c] = 47;
slashFo... | int FindAndFixBadSlashes(WORKSPACE *ws) {
int slashFound = 0;
int iArray = 0;
for (iArray = 0; strlen(ws->FileNameArray[iArray]); iArray++) {
int c = 0;
while (ws->FileNameArray[iArray][c]) {
if (ws->FileNameArray[iArray][c] == '\\') {
ws->FileNameArray[iArray][c] = '/';
slashFound ... | FindAndFixBadSlashes | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void FreeWorkspace(WORKSPACE *ws) {
if (ws->FileNameArray)
DynamicStringArrayDestroy(ws->FileNameArray, ws->iElements);
if (ws->pszCheckBuf)
free(ws->pszCheckBuf);
free(ws->pszUncompBuf);
free(ws);
} | void FreeWorkspace(WORKSPACE *ws) {
if (ws->FileNameArray)
DynamicStringArrayDestroy(ws->FileNameArray, ws->iElements);
if (ws->pszCheckBuf != NULL)
free(ws->pszCheckBuf);
free(ws->pszUncompBuf);
free(ws);
} | FreeWorkspace | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
char **GetDirFileList(const char *pszPath, int *piElements) {
int iCount;
char **FileNameArray;
DIR *dirp;
struct dirent *direntp;
iCount = 0;
*piElements = 256;
FileNameArray = DynamicStringArrayCreate(*piElements);
if (!FileNameArray)
return 0;
dirp = opendir(pszPath);
if (dirp) {
while (... | char **GetDirFileList(const char *pszPath, int *piElements) {
int iCount = 0;
DIR *dirp = NULL;
struct dirent *direntp = NULL;
char **FileNameArray = 0;
*piElements = ARRAY_ELEMENTS;
FileNameArray = DynamicStringArrayCreate(*piElements);
if (!FileNameArray)
return NULL;
dirp = opendir(pszPath);
... | GetDirFileList | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
char **GetFileList(unzFile UnZipHandle, char **FileNameArray, int *piElements) {
int rc;
int iCount;
unz_file_info64 ZipInfo;
unsigned long v9;
v9 = __readfsqword(0x28u);
iCount = 0;
rc = unzGoToFirstFile(UnZipHandle);
while (!rc) {
if (iCount + 2 >= *piElements) {
FileNameArray =
D... | char **GetFileList(unzFile UnZipHandle, char **FileNameArray, int *piElements) {
int rc = 0;
int iCount = 0;
char **TmpPtr = NULL;
unz_file_info64 ZipInfo;
rc = unzGoToFirstFile(UnZipHandle);
while (!rc) {
if ((iCount + 2) >= *piElements) {
FileNameArray =
DynamicStringArrayResize(F... | GetFileList | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int LoadCentralDirectoryRecord(zip64_internal *pziinit) {
uLong v2;
int err;
int hasZIP64Record;
ZPOS64_T size_central_dir;
ZPOS64_T offset_central_dir;
uLong uL;
uLong number_disk;
uLong number_disk_with_CD;
ZPOS64_T number_entry;
ZPOS64_T number_entry_CD;
uLong VersionMadeBy;
uLong VersionNeed... | int LoadCentralDirectoryRecord(zip64_internal *pziinit) {
int err = ZIP_OK;
ZPOS64_T byte_before_the_zipfile;
ZPOS64_T size_central_dir;
ZPOS64_T offset_central_dir;
ZPOS64_T central_pos;
uLong uL;
uLong number_disk;
uLong number_disk_with_CD;
ZPOS64_T number_entry;
ZPOS64_T number_entry_CD;
... | LoadCentralDirectoryRecord | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int MigrateZip(const char *zip_path, const char *pDir, WORKSPACE *ws,
MIGRATE *mig) {
int *v5;
char *v6;
const char *v7;
const char *v8;
int zip64;
int iArray;
int iArray2;
int rc;
int rca;
int rcb;
int error;
unsigned int cTotalFilesInZip;
signed int iBytesRead;
linkedlist_da... | int MigrateZip(const char *zip_path, const char *pDir, WORKSPACE *ws,
MIGRATE *mig) {
unz_file_info64 ZipInfo;
unzFile UnZipHandle = NULL;
unz64_s *UnzipStream = NULL;
zipFile ZipHandle = NULL;
int zip64 = 0;
zip64_internal *zintinfo;
linkedlist_datablock_internal *ldi;
int iArray = 0;
... | MigrateZip | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
FILE *OpenErrorLog(char qGUILaunch) {
int v1;
stat istat;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (stat("error.log", &istat))
return OpenLog("error");
if (!istat.st_size)
return OpenLog("error");
if (qGUILaunch)
return OpenLog("error");
fwrite("There is a previous 'error.log'. Are y... | FILE *OpenErrorLog(char qGUILaunch) {
struct stat istat;
int rc;
rc = stat("error.log", &istat);
if (!rc && istat.st_size && !qGUILaunch) {
fprintf(stderr,
"There is a previous 'error.log'. Are you sure you have dealt\n"
"with the problems encountered last time this program was run... | OpenErrorLog | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
FILE *OpenLog(const char *szFileName) {
size_t v1;
void *v2;
size_t v3;
char v5[8];
const char *szFileNamea;
FILE *f;
size_t v8;
char (*p_szLog)[];
unsigned long v10;
szFileNamea = szFileName;
v10 = __readfsqword(0x28u);
f = 0;
v1 = strlen(szFileName) + 5;
v8 = v1 - 1;
v2 = alloca(16 * ((... | static FILE *OpenLog(const char *szFileName) {
FILE *f = NULL;
char szLog[strlen(szFileName) + 5];
strcpy(szLog, szFileName);
strcat(szLog, ".log");
f = fopen(szLog, "w");
if (!f) {
fprintf(stderr, "Could not open log file '%s'!\n", szLog);
}
return f;
} | OpenLog | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int OpenProcessLog(const char *pszWritePath, const char *pszRelPath,
MIGRATE *mig) {
int iPathLen;
time_t now;
char *pszDirname;
tm *t;
char szLogname[1040];
char szRelPathBuf[1032];
unsigned long v11;
v11 = __readfsqword(0x28u);
pszDirname = 0;
now = time(0);
t = localtime(&no... | int OpenProcessLog(const char *pszWritePath, const char *pszRelPath,
MIGRATE *mig) {
int iPathLen = 0;
time_t now;
struct tm *t;
char szLogname[MAX_PATH + 1];
char szRelPathBuf[MAX_PATH + 1];
char *pszDirname = NULL;
now = time(NULL);
t = localtime(&now);
if (pszRelPath) {
iPa... | OpenProcessLog | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int RecursiveMigrate(const char *pszRelPath, WORKSPACE *ws, MIGRATE *mig) {
int *v3;
char *v4;
time_t StartTime;
time_t v6;
const char *v8;
int rc;
char *pszFileName;
const char *pszFileNamea;
stat istat;
char szRelPathBuf[1032];
unsigned long v15;
v15 = __readfsqword(0x28u);
pszFileName = st... | int RecursiveMigrate(const char *pszRelPath, WORKSPACE *ws, MIGRATE *mig) {
int rc = 0;
char szRelPathBuf[MAX_PATH + 1];
const char *pszFileName = NULL;
struct stat istat;
pszFileName = strrchr(pszRelPath, DIRSEP);
if (pszFileName) {
memcpy(szRelPathBuf, pszRelPath, pszFileName - pszRelPath);
szR... | RecursiveMigrate | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int RecursiveMigrateDir(const char *pszRelPath, WORKSPACE *ws) {
int *v3;
char *v4;
time_t StartTime;
time_t v6;
double v7;
int iElements;
int rc;
int iCounter;
int FileNameStartPos;
char **FileNameArray;
DIR *dirp;
dirent *direntp;
MIGRATE mig;
stat istat;
char szRelPathBuf[1032];
unsig... | int RecursiveMigrateDir(const char *pszRelPath, WORKSPACE *ws) {
int rc = 0;
char szTmpBuf[MAX_PATH + 1];
char szRelPathBuf[MAX_PATH + 1];
int iElements = 0;
char **FileNameArray = NULL;
int iCounter = 0;
int n;
int FileNameStartPos;
DIR *dirp = NULL;
struct dirent *direntp = NULL;
struct stat i... | RecursiveMigrateDir | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int RecursiveMigrateTop(const char *pszRelPath, WORKSPACE *ws) {
time_t StartTime;
time_t v3;
double v4;
const char *pszRelPatha;
int n;
int rc;
MIGRATE mig;
char szRelPathBuf[1032];
unsigned long v11;
pszRelPatha = pszRelPath;
v11 = __readfsqword(0x28u);
memset(&mig, 0, sizeof(mig));
mig.Sta... | int RecursiveMigrateTop(const char *pszRelPath, WORKSPACE *ws) {
int rc;
MIGRATE mig;
char szRelPathBuf[MAX_PATH + 1];
int n;
memset(&mig, 0, sizeof(MIGRATE));
mig.StartTime = time(NULL);
n = strlen(pszRelPath);
if (n > 0 && pszRelPath[n - 1] == DIRSEP) {
sprintf(szRelPathBuf, "%s", pszRelPath);
... | RecursiveMigrateTop | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int ShouldFileBeRemoved(int iArray, WORKSPACE *ws) {
int c;
char *pszZipName;
pszZipName = strrchr(ws->FileNameArray[iArray], 47);
if (!pszZipName || pszZipName[1] || !*ws->FileNameArray[iArray + 1])
return 0;
for (c = 0;
ws->FileNameArray[iArray][c] == ws->FileNameArray[iArray + 1][c] &&
w... | int ShouldFileBeRemoved(int iArray, WORKSPACE *ws) {
char *pszZipName = NULL;
pszZipName = strrchr(ws->FileNameArray[iArray], '/');
if (pszZipName && !*(pszZipName + 1)) {
if (strlen(ws->FileNameArray[iArray + 1])) {
int c = 0;
while (ws->FileNameArray[iArray][c] == ws->FileNameArray[iArray + 1]... | ShouldFileBeRemoved | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int StringCompare(const void *str1, const void *str2) {
return strcasecmp(*(const char **)str1, *(const char **)str2);
} | int StringCompare(const void *str1, const void *str2) {
const char **p1 = (const char **)str1;
const char **p2 = (const char **)str2;
return (strcasecmp(*p1, *p2));
} | StringCompare | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int Write_EndOfCentralDirectoryRecord(zip64_internal *zi, uLong size_centraldir,
ZPOS64_T centraldir_pos_inzip) {
int err;
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, 0x6054B50u, 4);
if (!err)
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, 0, 2... | int Write_EndOfCentralDirectoryRecord(zip64_internal *zi, uLong size_centraldir,
ZPOS64_T centraldir_pos_inzip) {
int err = ZIP_OK;
err = zip64local_putValue(&zi->z_filefunc, zi->filestream,
(uLong)ENDHEADERMAGIC, 4);
if (err == ZIP_OK)
err =... | Write_EndOfCentralDirectoryRecord | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int Write_GlobalComment(zip64_internal *zi, const char *global_comment) {
int err;
uInt size_global_comment;
size_global_comment = 0;
if (global_comment)
size_global_comment = strlen(global_comment);
err = zip64local_putValue(&zi->z_filefunc, zi->filestream,
size_global_commen... | int Write_GlobalComment(zip64_internal *zi, const char *global_comment) {
int err = ZIP_OK;
uInt size_global_comment = 0;
if (global_comment != NULL)
size_global_comment = (uInt)strlen(global_comment);
err = zip64local_putValue(&zi->z_filefunc, zi->filestream,
(uLong)size_globa... | Write_GlobalComment | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int Write_LocalFileHeader(zip64_internal *zi, const char *filename,
uInt size_extrafield_local,
const void *extrafield_local) {
int err;
uInt size_extrafield;
uInt size_filename;
size_filename = strlen(filename);
size_extrafield = size_extrafield_local;
e... | int Write_LocalFileHeader(zip64_internal *zi, const char *filename,
uInt size_extrafield_local,
const void *extrafield_local) {
int err;
uInt size_filename = (uInt)strlen(filename);
uInt size_extrafield = size_extrafield_local;
err = zip64local_putValue(&zi-... | Write_LocalFileHeader | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal *zi,
ZPOS64_T zip64eocd_pos_inzip) {
int err;
ZPOS64_T pos;
pos = zip64eocd_pos_inzip - *(long *)((char *)&qword_10188 + (_QWORD)zi);
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, 0x7064B50u, 4);... | int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal *zi,
ZPOS64_T zip64eocd_pos_inzip) {
int err = ZIP_OK;
ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset;
err = zip64local_putValue(&zi->z_filefunc, zi->filestream,
... | Write_Zip64EndOfCentralDirectoryLocator | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal *zi,
uLong size_centraldir,
ZPOS64_T centraldir_pos_inzip) {
int err;
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, 0x6064B50u, 4);
if (!err)
err = zip6... | int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal *zi,
uLong size_centraldir,
ZPOS64_T centraldir_pos_inzip) {
int err = ZIP_OK;
uLong Zip64DataSize = 44;
err = zip64local_putValue(&zi->z_filefunc, zi->filestream,
... | Write_Zip64EndOfCentralDirectoryRecord | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int ZipHasDirEntry(WORKSPACE *ws) {
int iArray;
for (iArray = 0; *ws->FileNameArray[iArray]; ++iArray) {
if (ShouldFileBeRemoved(iArray, ws))
return 1;
}
return 0;
} | int ZipHasDirEntry(WORKSPACE *ws) {
int iArray = 0;
for (iArray = 0; strlen(ws->FileNameArray[iArray]); iArray++) {
if (ShouldFileBeRemoved(iArray, ws))
return 1;
}
return 0;
} | ZipHasDirEntry | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int add_data_in_datablock(linkedlist_data *ll, const void *buf, uLong len) {
uInt copy_this;
uInt i;
linkedlist_datablock_internal *ldi;
unsigned char *to_copy;
if (!ll)
return -104;
if (!ll->last_block) {
ll->last_block = allocate_new_datablock();
ll->first_block = ll->last_block;
if (!ll-... | local int add_data_in_datablock(linkedlist_data *ll, const void *buf,
uLong len) {
linkedlist_datablock_internal *ldi;
const unsigned char *from_copy;
if (ll == NULL)
return ZIP_INTERNALERROR;
if (ll->last_block == NULL) {
ll->first_block = ll->last_block = allocate_new... | add_data_in_datablock | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
linkedlist_datablock_internal *allocate_new_datablock() {
linkedlist_datablock_internal *ldi;
ldi = (linkedlist_datablock_internal *)malloc(0x1010u);
if (ldi) {
ldi->next_datablock = 0;
ldi->filled_in_this_block = 0;
ldi->avail_in_this_block = 4080;
}
return ldi;
} | local linkedlist_datablock_internal *allocate_new_datablock() {
linkedlist_datablock_internal *ldi;
ldi = (linkedlist_datablock_internal *)ALLOC(
sizeof(linkedlist_datablock_internal));
if (ldi != NULL) {
ldi->next_datablock = NULL;
ldi->filled_in_this_block = 0;
ldi->avail_in_this_block = SIZED... | allocate_new_datablock | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
voidpf call_zopen64(const zlib_filefunc64_32_def *pfilefunc,
const void *filename, int mode) {
if (pfilefunc->zfile_func64.zopen64_file)
return pfilefunc->zfile_func64.zopen64_file(pfilefunc->zfile_func64.opaque,
filename, (unsigned int)mode);
... | voidpf call_zopen64(const zlib_filefunc64_32_def *pfilefunc,
const void *filename, int mode) {
if (pfilefunc->zfile_func64.zopen64_file != NULL)
return (*(pfilefunc->zfile_func64.zopen64_file))(
pfilefunc->zfile_func64.opaque, filename, mode);
else {
return (*(pfilefunc->zopen32_... | call_zopen64 | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
long call_zseek64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream,
ZPOS64_T offset, int origin) {
if (pfilefunc->zfile_func64.zseek64_file)
return pfilefunc->zfile_func64.zseek64_file(pfilefunc->zfile_func64.opaque,
filestream, offset, o... | long call_zseek64(const zlib_filefunc64_32_def *pfilefunc, voidpf filestream,
ZPOS64_T offset, int origin) {
if (pfilefunc->zfile_func64.zseek64_file != NULL)
return (*(pfilefunc->zfile_func64.zseek64_file))(
pfilefunc->zfile_func64.opaque, filestream, offset, origin);
else {
uLong... | call_zseek64 | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
ZPOS64_T call_ztell64(const zlib_filefunc64_32_def *pfilefunc,
voidpf filestream) {
ZPOS64_T tell_uLong;
if (pfilefunc->zfile_func64.zseek64_file)
return pfilefunc->zfile_func64.ztell64_file(pfilefunc->zfile_func64.opaque,
filestream);
tel... | ZPOS64_T call_ztell64(const zlib_filefunc64_32_def *pfilefunc,
voidpf filestream) {
if (pfilefunc->zfile_func64.zseek64_file != NULL)
return (*(pfilefunc->zfile_func64.ztell64_file))(
pfilefunc->zfile_func64.opaque, filestream);
else {
uLong tell_uLong = (*(pfilefunc->ztell32_f... | call_ztell64 | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int fclose_file_func(voidpf opaque, voidpf stream) {
return fclose((FILE *)stream);
} | static int ZCALLBACK fclose_file_func(voidpf opaque, voidpf stream) {
int ret;
ret = fclose((FILE *)stream);
return ret;
} | fclose_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int ferror_file_func(voidpf opaque, voidpf stream) {
return ferror((FILE *)stream);
} | static int ZCALLBACK ferror_file_func(voidpf opaque, voidpf stream) {
int ret;
ret = ferror((FILE *)stream);
return ret;
} | ferror_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void fill_fopen64_filefunc(zlib_filefunc64_def *pzlib_filefunc_def) {
pzlib_filefunc_def->zopen64_file = (open64_file_func)fopen64_file_func;
pzlib_filefunc_def->zread_file = (read_file_func)fread_file_func;
pzlib_filefunc_def->zwrite_file = (write_file_func)fwrite_file_func;
pzlib_filefunc_def->ztell64_file = ... | void fill_fopen64_filefunc(zlib_filefunc64_def *pzlib_filefunc_def) {
pzlib_filefunc_def->zopen64_file = fopen64_file_func;
pzlib_filefunc_def->zread_file = fread_file_func;
pzlib_filefunc_def->zwrite_file = fwrite_file_func;
pzlib_filefunc_def->ztell64_file = ftell64_file_func;
pzlib_filefunc_def->zseek64_fi... | fill_fopen64_filefunc | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void fill_fopen_filefunc(zlib_filefunc_def *pzlib_filefunc_def) {
pzlib_filefunc_def->zopen_file = (open_file_func)fopen_file_func;
pzlib_filefunc_def->zread_file = (read_file_func)fread_file_func;
pzlib_filefunc_def->zwrite_file = (write_file_func)fwrite_file_func;
pzlib_filefunc_def->ztell_file = (tell_file_f... | void fill_fopen_filefunc(pzlib_filefunc_def)
zlib_filefunc_def *pzlib_filefunc_def;
{
pzlib_filefunc_def->zopen_file = fopen_file_func;
pzlib_filefunc_def->zread_file = fread_file_func;
pzlib_filefunc_def->zwrite_file = fwrite_file_func;
pzlib_filefunc_def->ztell_file = ftell_file_func;
pzlib_filefunc_def... | fill_fopen_filefunc | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void fill_zlib_filefunc64_32_def_from_filefunc32(
zlib_filefunc64_32_def *p_filefunc64_32,
const zlib_filefunc_def *p_filefunc32) {
p_filefunc64_32->zfile_func64.zopen64_file = 0;
p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;
p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_fil... | void fill_zlib_filefunc64_32_def_from_filefunc32(
zlib_filefunc64_32_def *p_filefunc64_32,
const zlib_filefunc_def *p_filefunc32) {
p_filefunc64_32->zfile_func64.zopen64_file = NULL;
p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;
p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_... | fill_zlib_filefunc64_32_def_from_filefunc32 | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
voidpf fopen64_file_func(voidpf opaque, const void *filename, int mode) {
FILE *file;
const char *mode_fopen;
file = 0;
mode_fopen = 0;
if ((mode & 3) == 1) {
mode_fopen = (const char *)&unk_F004;
} else if ((mode & 4) != 0) {
mode_fopen = (const char *)&unk_F007;
} else if ((mode & 8) != 0) {
... | static voidpf ZCALLBACK fopen64_file_func(voidpf opaque, const void *filename,
int mode) {
FILE *file = NULL;
const char *mode_fopen = NULL;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) == ZLIB_FILEFUNC_MODE_READ)
mode_fopen = "rb";
else if (mode & ZLIB_FILEFUNC_... | fopen64_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
voidpf fopen_file_func(voidpf opaque, const char *filename, int mode) {
FILE *file;
const char *mode_fopen;
file = 0;
mode_fopen = 0;
if ((mode & 3) == 1) {
mode_fopen = (const char *)&unk_F004;
} else if ((mode & 4) != 0) {
mode_fopen = (const char *)&unk_F007;
} else if ((mode & 8) != 0) {
... | static voidpf ZCALLBACK fopen_file_func(voidpf opaque, const char *filename,
int mode) {
FILE *file = NULL;
const char *mode_fopen = NULL;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) == ZLIB_FILEFUNC_MODE_READ)
mode_fopen = "rb";
else if (mode & ZLIB_FILEFUNC_MODE... | fopen_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
uLong fread_file_func(voidpf opaque, voidpf stream, void *buf, uLong size) {
return fread(buf, 1u, size, (FILE *)stream);
} | static uLong ZCALLBACK fread_file_func(voidpf opaque, voidpf stream, void *buf,
uLong size) {
uLong ret;
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
return ret;
} | fread_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void free_datablock(linkedlist_datablock_internal *ldi) {
linkedlist_datablock_internal_s *ldinext;
while (ldi) {
ldinext = ldi->next_datablock;
free(ldi);
ldi = ldinext;
}
} | local void free_datablock(linkedlist_datablock_internal *ldi) {
while (ldi != NULL) {
linkedlist_datablock_internal *ldinext = ldi->next_datablock;
TRYFREE(ldi);
ldi = ldinext;
}
} | free_datablock | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void free_linkedlist(linkedlist_data *ll) {
free_datablock(ll->first_block);
ll->last_block = 0;
ll->first_block = ll->last_block;
} | local void free_linkedlist(linkedlist_data *ll) {
free_datablock(ll->first_block);
ll->first_block = ll->last_block = NULL;
} | free_linkedlist | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
long fseek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset,
int origin) {
int fseek_origin;
long ret;
if (origin == 2) {
fseek_origin = 2;
} else {
if (origin > 2)
return -1;
if (!origin) {
fseek_origin = 0;
goto LABEL_9;
}
if (origin != 1)... | static long ZCALLBACK fseek64_file_func(voidpf opaque, voidpf stream,
ZPOS64_T offset, int origin) {
int fseek_origin = 0;
long ret;
switch (origin) {
case ZLIB_FILEFUNC_SEEK_CUR:
fseek_origin = SEEK_CUR;
break;
case ZLIB_FILEFUNC_SEEK_END:
fseek_origin = SE... | fseek64_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
long fseek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin) {
int fseek_origin;
long ret;
if (origin == 2) {
fseek_origin = 2;
} else {
if (origin > 2)
return -1;
if (!origin) {
fseek_origin = 0;
goto LABEL_9;
}
if (origin != 1)
return -1;
fseek_... | static long ZCALLBACK fseek_file_func(voidpf opaque, voidpf stream,
uLong offset, int origin) {
int fseek_origin = 0;
long ret;
switch (origin) {
case ZLIB_FILEFUNC_SEEK_CUR:
fseek_origin = SEEK_CUR;
break;
case ZLIB_FILEFUNC_SEEK_END:
fseek_origin = SEEK_END;... | fseek_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
ZPOS64_T ftell64_file_func(voidpf opaque, voidpf stream) {
return ftello64((FILE *)stream);
} | static ZPOS64_T ZCALLBACK ftell64_file_func(voidpf opaque, voidpf stream) {
ZPOS64_T ret;
ret = ftello64((FILE *)stream);
return ret;
} | ftell64_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
long ftell_file_func(voidpf opaque, voidpf stream) {
return ftell((FILE *)stream);
} | static long ZCALLBACK ftell_file_func(voidpf opaque, voidpf stream) {
long ret;
ret = ftell((FILE *)stream);
return ret;
} | ftell_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
uLong fwrite_file_func(voidpf opaque, voidpf stream, const void *buf,
uLong size) {
return fwrite(buf, 1u, size, (FILE *)stream);
} | static uLong ZCALLBACK fwrite_file_func(voidpf opaque, voidpf stream,
const void *buf, uLong size) {
uLong ret;
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
return ret;
} | fwrite_file_func | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
char *get_cwd() {
int cchCWD;
int cchCWDa;
char *pszCWD;
cchCWD = 1024;
pszCWD = (char *)malloc(0x400u);
if (!pszCWD)
return 0;
while (!getcwd(pszCWD, cchCWD - 2)) {
cchCWD += 1024;
free(pszCWD);
pszCWD = (char *)malloc(cchCWD);
if (!pszCWD)
return 0;
}
cchCWDa = strlen(pszC... | char *get_cwd(void) {
char *pszCWD = NULL;
int cchCWD = 1024;
pszCWD = malloc(cchCWD);
if (!pszCWD)
return NULL;
while (!getcwd(pszCWD, cchCWD - 2)) {
cchCWD += 1024;
free(pszCWD);
pszCWD = malloc(cchCWD);
if (!pszCWD)
return NULL;
}
cchCWD = strlen(pszCWD);
if (pszCWD[cch... | get_cwd | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
int getch() {
char c;
termios t;
termios t2;
unsigned long v4;
v4 = __readfsqword(0x28u);
c = 0;
tcgetattr(1, &t);
t2 = t;
cfmakeraw(&t2);
tcsetattr(1, 0, &t2);
fread(&c, 1u, 1u, stdin);
tcsetattr(1, 0, &t);
return c;
} | int getch(void) {
struct termios t, t2;
char c = 0;
tcgetattr(1, &t);
t2 = t;
cfmakeraw(&t2);
tcsetattr(1, TCSANOW, &t2);
fread(&c, 1, 1, stdin);
tcsetattr(1, TCSANOW, &t);
return c;
} | getch | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void init_linkedlist(linkedlist_data *ll) {
ll->last_block = 0;
ll->first_block = ll->last_block;
} | local void init_linkedlist(linkedlist_data *ll) {
ll->first_block = ll->last_block = NULL;
} | init_linkedlist | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
void logprint(FILE *stdf, FILE *f, char *format, ...) {
long v3;
long v4;
long v5;
time_t now;
tm *t;
va_list arglist;
char szTimeBuffer[2064];
char szMessageBuffer[2056];
unsigned long v12;
long v13;
long v14;
long v15;
va_start(arglist, format);
v3 = va_arg(arglist, _QWORD);
v4 = va_arg... | void logprint(FILE *stdf, FILE *f, char *format, ...) {
time_t now;
struct tm *t;
va_list arglist;
char szTimeBuffer[2048 + 1];
char szMessageBuffer[2048 + 1];
if (!continueline) {
now = time(NULL);
t = localtime(&now);
sprintf(szTimeBuffer, "[%04d/%02d/%02d - %02d:%02d:%02d] ",
t-... | logprint | torrentzip-0.9-r1 | app-arch | O0/app-arch/torrentzip-0.9-r1/trrntzip | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.