From: Michael Gernoth Date: Fri, 30 Jan 2009 23:48:40 +0000 (+0100) Subject: fn_598b4 implemented X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/commitdiff_plain/3772880c0ada686aad13f578c0e219ecc1bd4d85 fn_598b4 implemented --- diff --git a/rsb-lz.c b/rsb-lz.c index ed0c813..4f077b1 100644 --- a/rsb-lz.c +++ b/rsb-lz.c @@ -428,10 +428,12 @@ void fn_59560(unsigned int arg1) { + fprintf(stderr,"%s\n", __func__); } void fn_59578(unsigned int arg1, unsigned int arg2, unsigned int arg3, unsigned int arg4) { + fprintf(stderr,"%s\n", __func__); } void fn_59788() @@ -449,14 +451,56 @@ struct s_59b78 { unsigned int fn_59848(struct s_59b78 *data) { + fprintf(stderr,"%s\n", __func__); return 0; } -unsigned int fn_598b4(struct s_59b78 *data, unsigned int arg2) +unsigned int fn_597c8(struct s_59b78 *r11_data) { + fprintf(stderr,"%s\n", __func__); return 0; } +unsigned int fn_598b4(struct s_59b78 *r11_data, unsigned int r10_arg2) +{ + unsigned int r1; + unsigned int r2; + unsigned int r6; + unsigned int r7; + + fprintf(stderr,"%s\n", __func__); + + r1 = r10_arg2 - 1; + r6 = 1 << r1; + + r7 = 0; + do { + r1 = r11_data->y; + if (r1 == 0x80) { + r1 = fn_597c8(r11_data); + } + r11_data->x = r1; + r1 = r11_data->y; + r2 = r11_data->x; + r1 = r1 & r2; + if (r1 != 0) + r7 = r7 | r6; + + r6 = r6 >> 1; + + r2 = r11_data->y; + r2 = r2 >> 1; + r11_data->y = r2; + + r1 = r11_data->y; + if(r1 == 0) { + r11_data->y = 0x80; + } + } while (r6 != 0); + + return r7; +} + void fn_5980c(unsigned int arg1, unsigned int mem[]) { unsigned char *r1; @@ -560,6 +604,7 @@ unsigned int crc_check_59684(unsigned char *arg1, unsigned int arg2, unsigned in void fn_59508() { + fprintf(stderr,"%s\n", __func__); } void extract_lz_file(unsigned char *buf, unsigned char *name)