diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-09-29 10:31:09 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2018-09-29 10:31:09 +0800 |
commit | d73b9944848e8cd544564ecb0dd0ec96710237bb (patch) | |
tree | 12515455b04431dcfa0d1fb0b36e3dda33bab81a /csrc/mkf_decompress.c | |
parent | d02dbcac9d53d84a8b0c8b5a46479dd87a37ae93 (diff) | |
download | rich4-d73b9944848e8cd544564ecb0dd0ec96710237bb.tar.xz |
name mkf_00455040 as mkf_decompress
Now it's a correct implementation, tested with dump_600
Diffstat (limited to 'csrc/mkf_decompress.c')
-rw-r--r-- | csrc/mkf_decompress.c | 688 |
1 files changed, 688 insertions, 0 deletions
diff --git a/csrc/mkf_decompress.c b/csrc/mkf_decompress.c new file mode 100644 index 0000000..ea9ac4f --- /dev/null +++ b/csrc/mkf_decompress.c @@ -0,0 +1,688 @@ +#include <stdint.h> +#include <stdlib.h> +#include <string.h> + +const uint8_t table_483430[256] = { + 0x3f, 0x0b, 0x17, 0x03, 0x2f, 0x0a, 0x16, 0x00, 0x2e, 0x09, + 0x15, 0x02, 0x2d, 0x01, 0x08, 0x00, 0x3e, 0x07, 0x14, 0x03, + 0x2c, 0x06, 0x13, 0x00, 0x2b, 0x05, 0x12, 0x02, 0x2a, 0x01, + 0x04, 0x00, 0x3d, 0x0b, 0x11, 0x03, 0x29, 0x0a, 0x10, 0x00, + 0x28, 0x09, 0x0f, 0x02, 0x27, 0x01, 0x08, 0x00, 0x3c, 0x07, + 0x0e, 0x03, 0x26, 0x06, 0x0d, 0x00, 0x25, 0x05, 0x0c, 0x02, + 0x24, 0x01, 0x04, 0x00, 0x3b, 0x0b, 0x17, 0x03, 0x23, 0x0a, + 0x16, 0x00, 0x22, 0x09, 0x15, 0x02, 0x21, 0x01, 0x08, 0x00, + 0x3a, 0x07, 0x14, 0x03, 0x20, 0x06, 0x13, 0x00, 0x1f, 0x05, + 0x12, 0x02, 0x1e, 0x01, 0x04, 0x00, 0x39, 0x0b, 0x11, 0x03, + 0x1d, 0x0a, 0x10, 0x00, 0x1c, 0x09, 0x0f, 0x02, 0x1b, 0x01, + 0x08, 0x00, 0x38, 0x07, 0x0e, 0x03, 0x1a, 0x06, 0x0d, 0x00, + 0x19, 0x05, 0x0c, 0x02, 0x18, 0x01, 0x04, 0x00, 0x37, 0x0b, + 0x17, 0x03, 0x2f, 0x0a, 0x16, 0x00, 0x2e, 0x09, 0x15, 0x02, + 0x2d, 0x01, 0x08, 0x00, 0x36, 0x07, 0x14, 0x03, 0x2c, 0x06, + 0x13, 0x00, 0x2b, 0x05, 0x12, 0x02, 0x2a, 0x01, 0x04, 0x00, + 0x35, 0x0b, 0x11, 0x03, 0x29, 0x0a, 0x10, 0x00, 0x28, 0x09, + 0x0f, 0x02, 0x27, 0x01, 0x08, 0x00, 0x34, 0x07, 0x0e, 0x03, + 0x26, 0x06, 0x0d, 0x00, 0x25, 0x05, 0x0c, 0x02, 0x24, 0x01, + 0x04, 0x00, 0x33, 0x0b, 0x17, 0x03, 0x23, 0x0a, 0x16, 0x00, + 0x22, 0x09, 0x15, 0x02, 0x21, 0x01, 0x08, 0x00, 0x32, 0x07, + 0x14, 0x03, 0x20, 0x06, 0x13, 0x00, 0x1f, 0x05, 0x12, 0x02, + 0x1e, 0x01, 0x04, 0x00, 0x31, 0x0b, 0x11, 0x03, 0x1d, 0x0a, + 0x10, 0x00, 0x1c, 0x09, 0x0f, 0x02, 0x1b, 0x01, 0x08, 0x00, + 0x30, 0x07, 0x0e, 0x03, 0x1a, 0x06, 0x0d, 0x00, 0x19, 0x05, + 0x0c, 0x02, 0x18, 0x01, 0x04, 0x00 +}; + +const uint8_t table_483530[256] = { + 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, + 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, + 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, + 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, + 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, + 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, + 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, + 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, + 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, + 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, + 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, + 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, + 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, + 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, + 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, + 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, + 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, + 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, + 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, + 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, + 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, + 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, + 0x07, 0x04, 0x05, 0x03, 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, + 0x06, 0x03, 0x07, 0x05, 0x06, 0x04, 0x07, 0x04, 0x05, 0x03, + 0x08, 0x05, 0x06, 0x04, 0x07, 0x05, 0x06, 0x03, 0x07, 0x05, + 0x06, 0x04, 0x07, 0x04, 0x05, 0x03 +}; + +const uint8_t data_483630[4492] = { + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, + 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x05, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, + 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, + 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, + 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, + 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, + 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, + 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, + 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, + 0x08, 0x00, 0x09, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, + 0x10, 0x00, 0x11, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, + 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, + 0x20, 0x00, 0x21, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, + 0x40, 0x00, 0x41, 0x00, 0x80, 0x00, 0x80, 0x00, 0xc1, 0x00, + 0x41, 0x01, 0xff, 0xff, 0x02, 0x05, 0x04, 0x05, 0x06, 0x05, + 0x08, 0x05, 0x0a, 0x05, 0x0c, 0x05, 0x0e, 0x05, 0x10, 0x05, + 0x12, 0x05, 0x14, 0x05, 0x16, 0x05, 0x18, 0x05, 0x1a, 0x05, + 0x1c, 0x05, 0x1e, 0x05, 0x20, 0x05, 0x22, 0x05, 0x24, 0x05, + 0x26, 0x05, 0x28, 0x05, 0x2a, 0x05, 0x2c, 0x05, 0x2e, 0x05, + 0x30, 0x05, 0x32, 0x05, 0x34, 0x05, 0x36, 0x05, 0x38, 0x05, + 0x3a, 0x05, 0x3c, 0x05, 0x3e, 0x05, 0x40, 0x05, 0x42, 0x05, + 0x44, 0x05, 0x46, 0x05, 0x48, 0x05, 0x4a, 0x05, 0x4c, 0x05, + 0x4e, 0x05, 0x50, 0x05, 0x52, 0x05, 0x54, 0x05, 0x56, 0x05, + 0x58, 0x05, 0x5a, 0x05, 0x5c, 0x05, 0x5e, 0x05, 0x60, 0x05, + 0x62, 0x05, 0x64, 0x05, 0x66, 0x05, 0x68, 0x05, 0x6a, 0x05, + 0x6c, 0x05, 0x6e, 0x05, 0x70, 0x05, 0x72, 0x05, 0x74, 0x05, + 0x76, 0x05, 0x78, 0x05, 0x7a, 0x05, 0x7c, 0x05, 0x7e, 0x05, + 0x80, 0x05, 0x82, 0x05, 0x84, 0x05, 0x86, 0x05, 0x88, 0x05, + 0x8a, 0x05, 0x8c, 0x05, 0x8e, 0x05, 0x90, 0x05, 0x92, 0x05, + 0x94, 0x05, 0x96, 0x05, 0x98, 0x05, 0x9a, 0x05, 0x9c, 0x05, + 0x9e, 0x05, 0xa0, 0x05, 0xa2, 0x05, 0xa4, 0x05, 0xa6, 0x05, + 0xa8, 0x05, 0xaa, 0x05, 0xac, 0x05, 0xae, 0x05, 0xb0, 0x05, + 0xb2, 0x05, 0xb4, 0x05, 0xb6, 0x05, 0xb8, 0x05, 0xba, 0x05, + 0xbc, 0x05, 0xbe, 0x05, 0xc0, 0x05, 0xc2, 0x05, 0xc4, 0x05, + 0xc6, 0x05, 0xc8, 0x05, 0xca, 0x05, 0xcc, 0x05, 0xce, 0x05, + 0xd0, 0x05, 0xd2, 0x05, 0xd4, 0x05, 0xd6, 0x05, 0xd8, 0x05, + 0xda, 0x05, 0xdc, 0x05, 0xde, 0x05, 0xe0, 0x05, 0xe2, 0x05, + 0xe4, 0x05, 0xe6, 0x05, 0xe8, 0x05, 0xea, 0x05, 0xec, 0x05, + 0xee, 0x05, 0xf0, 0x05, 0xf2, 0x05, 0xf4, 0x05, 0xf6, 0x05, + 0xf8, 0x05, 0xfa, 0x05, 0xfc, 0x05, 0xfe, 0x05, 0x00, 0x06, + 0x02, 0x06, 0x04, 0x06, 0x06, 0x06, 0x08, 0x06, 0x0a, 0x06, + 0x0c, 0x06, 0x0e, 0x06, 0x10, 0x06, 0x12, 0x06, 0x14, 0x06, + 0x16, 0x06, 0x18, 0x06, 0x1a, 0x06, 0x1c, 0x06, 0x1e, 0x06, + 0x20, 0x06, 0x22, 0x06, 0x24, 0x06, 0x26, 0x06, 0x28, 0x06, + 0x2a, 0x06, 0x2c, 0x06, 0x2e, 0x06, 0x30, 0x06, 0x32, 0x06, + 0x34, 0x06, 0x36, 0x06, 0x38, 0x06, 0x3a, 0x06, 0x3c, 0x06, + 0x3e, 0x06, 0x40, 0x06, 0x42, 0x06, 0x44, 0x06, 0x46, 0x06, + 0x48, 0x06, 0x4a, 0x06, 0x4c, 0x06, 0x4e, 0x06, 0x50, 0x06, + 0x52, 0x06, 0x54, 0x06, 0x56, 0x06, 0x58, 0x06, 0x5a, 0x06, + 0x5c, 0x06, 0x5e, 0x06, 0x60, 0x06, 0x62, 0x06, 0x64, 0x06, + 0x66, 0x06, 0x68, 0x06, 0x6a, 0x06, 0x6c, 0x06, 0x6e, 0x06, + 0x70, 0x06, 0x72, 0x06, 0x74, 0x06, 0x76, 0x06, 0x78, 0x06, + 0x7a, 0x06, 0x7c, 0x06, 0x7e, 0x06, 0x80, 0x06, 0x82, 0x06, + 0x84, 0x06, 0x86, 0x06, 0x88, 0x06, 0x8a, 0x06, 0x8c, 0x06, + 0x8e, 0x06, 0x90, 0x06, 0x92, 0x06, 0x94, 0x06, 0x96, 0x06, + 0x98, 0x06, 0x9a, 0x06, 0x9c, 0x06, 0x9e, 0x06, 0xa0, 0x06, + 0xa2, 0x06, 0xa4, 0x06, 0xa6, 0x06, 0xa8, 0x06, 0xaa, 0x06, + 0xac, 0x06, 0xae, 0x06, 0xb0, 0x06, 0xb2, 0x06, 0xb4, 0x06, + 0xb6, 0x06, 0xb8, 0x06, 0xba, 0x06, 0xbc, 0x06, 0xbe, 0x06, + 0xc0, 0x06, 0xc2, 0x06, 0xc4, 0x06, 0xc6, 0x06, 0xc8, 0x06, + 0xca, 0x06, 0xcc, 0x06, 0xce, 0x06, 0xd0, 0x06, 0xd2, 0x06, + 0xd4, 0x06, 0xd6, 0x06, 0xd8, 0x06, 0xda, 0x06, 0xdc, 0x06, + 0xde, 0x06, 0xe0, 0x06, 0xe2, 0x06, 0xe4, 0x06, 0xe6, 0x06, + 0xe8, 0x06, 0xea, 0x06, 0xec, 0x06, 0xee, 0x06, 0xf0, 0x06, + 0xf2, 0x06, 0xf4, 0x06, 0xf6, 0x06, 0xf8, 0x06, 0xfa, 0x06, + 0xfc, 0x06, 0xfe, 0x06, 0x00, 0x07, 0x02, 0x07, 0x04, 0x07, + 0x06, 0x07, 0x08, 0x07, 0x0a, 0x07, 0x0c, 0x07, 0x0e, 0x07, + 0x10, 0x07, 0x12, 0x07, 0x14, 0x07, 0x16, 0x07, 0x18, 0x07, + 0x1a, 0x07, 0x1c, 0x07, 0x1e, 0x07, 0x20, 0x07, 0x22, 0x07, + 0x24, 0x07, 0x26, 0x07, 0x28, 0x07, 0x2a, 0x07, 0x2c, 0x07, + 0x2e, 0x07, 0x30, 0x07, 0x32, 0x07, 0x34, 0x07, 0x36, 0x07, + 0x38, 0x07, 0x3a, 0x07, 0x3c, 0x07, 0x3e, 0x07, 0x40, 0x07, + 0x42, 0x07, 0x44, 0x07, 0x46, 0x07, 0x48, 0x07, 0x4a, 0x07, + 0x4c, 0x07, 0x4e, 0x07, 0x50, 0x07, 0x52, 0x07, 0x54, 0x07, + 0x56, 0x07, 0x58, 0x07, 0x5a, 0x07, 0x5c, 0x07, 0x5e, 0x07, + 0x60, 0x07, 0x62, 0x07, 0x64, 0x07, 0x66, 0x07, 0x68, 0x07, + 0x6a, 0x07, 0x6c, 0x07, 0x6e, 0x07, 0x70, 0x07, 0x72, 0x07, + 0x74, 0x07, 0x76, 0x07, 0x78, 0x07, 0x7a, 0x07, 0x7c, 0x07, + 0x7e, 0x07, 0x80, 0x07, 0x82, 0x07, 0x00, 0x00, 0x04, 0x00, + 0x08, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x14, 0x00, 0x18, 0x00, + 0x1c, 0x00, 0x20, 0x00, 0x24, 0x00, 0x28, 0x00, 0x2c, 0x00, + 0x30, 0x00, 0x34, 0x00, 0x38, 0x00, 0x3c, 0x00, 0x40, 0x00, + 0x44, 0x00, 0x48, 0x00, 0x4c, 0x00, 0x50, 0x00, 0x54, 0x00, + 0x58, 0x00, 0x5c, 0x00, 0x60, 0x00, 0x64, 0x00, 0x68, 0x00, + 0x6c, 0x00, 0x70, 0x00, 0x74, 0x00, 0x78, 0x00, 0x7c, 0x00, + 0x80, 0x00, 0x84, 0x00, 0x88, 0x00, 0x8c, 0x00, 0x90, 0x00, + 0x94, 0x00, 0x98, 0x00, 0x9c, 0x00, 0xa0, 0x00, 0xa4, 0x00, + 0xa8, 0x00, 0xac, 0x00, 0xb0, 0x00, 0xb4, 0x00, 0xb8, 0x00, + 0xbc, 0x00, 0xc0, 0x00, 0xc4, 0x00, 0xc8, 0x00, 0xcc, 0x00, + 0xd0, 0x00, 0xd4, 0x00, 0xd8, 0x00, 0xdc, 0x00, 0xe0, 0x00, + 0xe4, 0x00, 0xe8, 0x00, 0xec, 0x00, 0xf0, 0x00, 0xf4, 0x00, + 0xf8, 0x00, 0xfc, 0x00, 0x00, 0x01, 0x04, 0x01, 0x08, 0x01, + 0x0c, 0x01, 0x10, 0x01, 0x14, 0x01, 0x18, 0x01, 0x1c, 0x01, + 0x20, 0x01, 0x24, 0x01, 0x28, 0x01, 0x2c, 0x01, 0x30, 0x01, + 0x34, 0x01, 0x38, 0x01, 0x3c, 0x01, 0x40, 0x01, 0x44, 0x01, + 0x48, 0x01, 0x4c, 0x01, 0x50, 0x01, 0x54, 0x01, 0x58, 0x01, + 0x5c, 0x01, 0x60, 0x01, 0x64, 0x01, 0x68, 0x01, 0x6c, 0x01, + 0x70, 0x01, 0x74, 0x01, 0x78, 0x01, 0x7c, 0x01, 0x80, 0x01, + 0x84, 0x01, 0x88, 0x01, 0x8c, 0x01, 0x90, 0x01, 0x94, 0x01, + 0x98, 0x01, 0x9c, 0x01, 0xa0, 0x01, 0xa4, 0x01, 0xa8, 0x01, + 0xac, 0x01, 0xb0, 0x01, 0xb4, 0x01, 0xb8, 0x01, 0xbc, 0x01, + 0xc0, 0x01, 0xc4, 0x01, 0xc8, 0x01, 0xcc, 0x01, 0xd0, 0x01, + 0xd4, 0x01, 0xd8, 0x01, 0xdc, 0x01, 0xe0, 0x01, 0xe4, 0x01, + 0xe8, 0x01, 0xec, 0x01, 0xf0, 0x01, 0xf4, 0x01, 0xf8, 0x01, + 0xfc, 0x01, 0x00, 0x02, 0x04, 0x02, 0x08, 0x02, 0x0c, 0x02, + 0x10, 0x02, 0x14, 0x02, 0x18, 0x02, 0x1c, 0x02, 0x20, 0x02, + 0x24, 0x02, 0x28, 0x02, 0x2c, 0x02, 0x30, 0x02, 0x34, 0x02, + 0x38, 0x02, 0x3c, 0x02, 0x40, 0x02, 0x44, 0x02, 0x48, 0x02, + 0x4c, 0x02, 0x50, 0x02, 0x54, 0x02, 0x58, 0x02, 0x5c, 0x02, + 0x60, 0x02, 0x64, 0x02, 0x68, 0x02, 0x6c, 0x02, 0x70, 0x02, + 0x74, 0x02, 0x78, 0x02, 0x7c, 0x02, 0x80, 0x02, 0x84, 0x02, + 0x88, 0x02, 0x8c, 0x02, 0x90, 0x02, 0x94, 0x02, 0x98, 0x02, + 0x9c, 0x02, 0xa0, 0x02, 0xa4, 0x02, 0xa8, 0x02, 0xac, 0x02, + 0xb0, 0x02, 0xb4, 0x02, 0xb8, 0x02, 0xbc, 0x02, 0xc0, 0x02, + 0xc4, 0x02, 0xc8, 0x02, 0xcc, 0x02, 0xd0, 0x02, 0xd4, 0x02, + 0xd8, 0x02, 0xdc, 0x02, 0xe0, 0x02, 0xe4, 0x02, 0xe8, 0x02, + 0xec, 0x02, 0xf0, 0x02, 0xf4, 0x02, 0xf8, 0x02, 0xfc, 0x02, + 0x00, 0x03, 0x04, 0x03, 0x08, 0x03, 0x0c, 0x03, 0x10, 0x03, + 0x14, 0x03, 0x18, 0x03, 0x1c, 0x03, 0x20, 0x03, 0x24, 0x03, + 0x28, 0x03, 0x2c, 0x03, 0x30, 0x03, 0x34, 0x03, 0x38, 0x03, + 0x3c, 0x03, 0x40, 0x03, 0x44, 0x03, 0x48, 0x03, 0x4c, 0x03, + 0x50, 0x03, 0x54, 0x03, 0x58, 0x03, 0x5c, 0x03, 0x60, 0x03, + 0x64, 0x03, 0x68, 0x03, 0x6c, 0x03, 0x70, 0x03, 0x74, 0x03, + 0x78, 0x03, 0x7c, 0x03, 0x80, 0x03, 0x84, 0x03, 0x88, 0x03, + 0x8c, 0x03, 0x90, 0x03, 0x94, 0x03, 0x98, 0x03, 0x9c, 0x03, + 0xa0, 0x03, 0xa4, 0x03, 0xa8, 0x03, 0xac, 0x03, 0xb0, 0x03, + 0xb4, 0x03, 0xb8, 0x03, 0xbc, 0x03, 0xc0, 0x03, 0xc4, 0x03, + 0xc8, 0x03, 0xcc, 0x03, 0xd0, 0x03, 0xd4, 0x03, 0xd8, 0x03, + 0xdc, 0x03, 0xe0, 0x03, 0xe4, 0x03, 0xe8, 0x03, 0xec, 0x03, + 0xf0, 0x03, 0xf4, 0x03, 0xf8, 0x03, 0xfc, 0x03, 0x00, 0x04, + 0x04, 0x04, 0x08, 0x04, 0x0c, 0x04, 0x10, 0x04, 0x14, 0x04, + 0x18, 0x04, 0x1c, 0x04, 0x20, 0x04, 0x24, 0x04, 0x28, 0x04, + 0x2c, 0x04, 0x30, 0x04, 0x34, 0x04, 0x38, 0x04, 0x3c, 0x04, + 0x40, 0x04, 0x44, 0x04, 0x48, 0x04, 0x4c, 0x04, 0x50, 0x04, + 0x54, 0x04, 0x58, 0x04, 0x5c, 0x04, 0x60, 0x04, 0x64, 0x04, + 0x68, 0x04, 0x6c, 0x04, 0x70, 0x04, 0x74, 0x04, 0x78, 0x04, + 0x7c, 0x04, 0x80, 0x04, 0x84, 0x04, 0x88, 0x04, 0x8c, 0x04, + 0x90, 0x04, 0x94, 0x04, 0x98, 0x04, 0x9c, 0x04, 0xa0, 0x04, + 0xa4, 0x04, 0xa8, 0x04, 0xac, 0x04, 0xb0, 0x04, 0xb4, 0x04, + 0xb8, 0x04, 0xbc, 0x04, 0xc0, 0x04, 0xc4, 0x04, 0xc8, 0x04, + 0xcc, 0x04, 0xd0, 0x04, 0xd4, 0x04, 0xd8, 0x04, 0xdc, 0x04, + 0xe0, 0x04, 0xe4, 0x04, 0xe8, 0x04, 0xec, 0x04, 0xf0, 0x04, + 0xf4, 0x04, 0xf8, 0x04, 0xfc, 0x04, 0x82, 0x02, 0x82, 0x02, + 0x84, 0x02, 0x84, 0x02, 0x86, 0x02, 0x86, 0x02, 0x88, 0x02, + 0x88, 0x02, 0x8a, 0x02, 0x8a, 0x02, 0x8c, 0x02, 0x8c, 0x02, + 0x8e, 0x02, 0x8e, 0x02, 0x90, 0x02, 0x90, 0x02, 0x92, 0x02, + 0x92, 0x02, 0x94, 0x02, 0x94, 0x02, 0x96, 0x02, 0x96, 0x02, + 0x98, 0x02, 0x98, 0x02, 0x9a, 0x02, 0x9a, 0x02, 0x9c, 0x02, + 0x9c, 0x02, 0x9e, 0x02, 0x9e, 0x02, 0xa0, 0x02, 0xa0, 0x02, + 0xa2, 0x02, 0xa2, 0x02, 0xa4, 0x02, 0xa4, 0x02, 0xa6, 0x02, + 0xa6, 0x02, 0xa8, 0x02, 0xa8, 0x02, 0xaa, 0x02, 0xaa, 0x02, + 0xac, 0x02, 0xac, 0x02, 0xae, 0x02, 0xae, 0x02, 0xb0, 0x02, + 0xb0, 0x02, 0xb2, 0x02, 0xb2, 0x02, 0xb4, 0x02, 0xb4, 0x02, + 0xb6, 0x02, 0xb6, 0x02, 0xb8, 0x02, 0xb8, 0x02, 0xba, 0x02, + 0xba, 0x02, 0xbc, 0x02, 0xbc, 0x02, 0xbe, 0x02, 0xbe, 0x02, + 0xc0, 0x02, 0xc0, 0x02, 0xc2, 0x02, 0xc2, 0x02, 0xc4, 0x02, + 0xc4, 0x02, 0xc6, 0x02, 0xc6, 0x02, 0xc8, 0x02, 0xc8, 0x02, + 0xca, 0x02, 0xca, 0x02, 0xcc, 0x02, 0xcc, 0x02, 0xce, 0x02, + 0xce, 0x02, 0xd0, 0x02, 0xd0, 0x02, 0xd2, 0x02, 0xd2, 0x02, + 0xd4, 0x02, 0xd4, 0x02, 0xd6, 0x02, 0xd6, 0x02, 0xd8, 0x02, + 0xd8, 0x02, 0xda, 0x02, 0xda, 0x02, 0xdc, 0x02, 0xdc, 0x02, + 0xde, 0x02, 0xde, 0x02, 0xe0, 0x02, 0xe0, 0x02, 0xe2, 0x02, + 0xe2, 0x02, 0xe4, 0x02, 0xe4, 0x02, 0xe6, 0x02, 0xe6, 0x02, + 0xe8, 0x02, 0xe8, 0x02, 0xea, 0x02, 0xea, 0x02, 0xec, 0x02, + 0xec, 0x02, 0xee, 0x02, 0xee, 0x02, 0xf0, 0x02, 0xf0, 0x02, + 0xf2, 0x02, 0xf2, 0x02, 0xf4, 0x02, 0xf4, 0x02, 0xf6, 0x02, + 0xf6, 0x02, 0xf8, 0x02, 0xf8, 0x02, 0xfa, 0x02, 0xfa, 0x02, + 0xfc, 0x02, 0xfc, 0x02, 0xfe, 0x02, 0xfe, 0x02, 0x00, 0x03, + 0x00, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, + 0x06, 0x03, 0x06, 0x03, 0x08, 0x03, 0x08, 0x03, 0x0a, 0x03, + 0x0a, 0x03, 0x0c, 0x03, 0x0c, 0x03, 0x0e, 0x03, 0x0e, 0x03, + 0x10, 0x03, 0x10, 0x03, 0x12, 0x03, 0x12, 0x03, 0x14, 0x03, + 0x14, 0x03, 0x16, 0x03, 0x16, 0x03, 0x18, 0x03, 0x18, 0x03, + 0x1a, 0x03, 0x1a, 0x03, 0x1c, 0x03, 0x1c, 0x03, 0x1e, 0x03, + 0x1e, 0x03, 0x20, 0x03, 0x20, 0x03, 0x22, 0x03, 0x22, 0x03, + 0x24, 0x03, 0x24, 0x03, 0x26, 0x03, 0x26, 0x03, 0x28, 0x03, + 0x28, 0x03, 0x2a, 0x03, 0x2a, 0x03, 0x2c, 0x03, 0x2c, 0x03, + 0x2e, 0x03, 0x2e, 0x03, 0x30, 0x03, 0x30, 0x03, 0x32, 0x03, + 0x32, 0x03, 0x34, 0x03, 0x34, 0x03, 0x36, 0x03, 0x36, 0x03, + 0x38, 0x03, 0x38, 0x03, 0x3a, 0x03, 0x3a, 0x03, 0x3c, 0x03, + 0x3c, 0x03, 0x3e, 0x03, 0x3e, 0x03, 0x40, 0x03, 0x40, 0x03, + 0x42, 0x03, 0x42, 0x03, 0x44, 0x03, 0x44, 0x03, 0x46, 0x03, + 0x46, 0x03, 0x48, 0x03, 0x48, 0x03, 0x4a, 0x03, 0x4a, 0x03, + 0x4c, 0x03, 0x4c, 0x03, 0x4e, 0x03, 0x4e, 0x03, 0x50, 0x03, + 0x50, 0x03, 0x52, 0x03, 0x52, 0x03, 0x54, 0x03, 0x54, 0x03, + 0x56, 0x03, 0x56, 0x03, 0x58, 0x03, 0x58, 0x03, 0x5a, 0x03, + 0x5a, 0x03, 0x5c, 0x03, 0x5c, 0x03, 0x5e, 0x03, 0x5e, 0x03, + 0x60, 0x03, 0x60, 0x03, 0x62, 0x03, 0x62, 0x03, 0x64, 0x03, + 0x64, 0x03, 0x66, 0x03, 0x66, 0x03, 0x68, 0x03, 0x68, 0x03, + 0x6a, 0x03, 0x6a, 0x03, 0x6c, 0x03, 0x6c, 0x03, 0x6e, 0x03, + 0x6e, 0x03, 0x70, 0x03, 0x70, 0x03, 0x72, 0x03, 0x72, 0x03, + 0x74, 0x03, 0x74, 0x03, 0x76, 0x03, 0x76, 0x03, 0x78, 0x03, + 0x78, 0x03, 0x7a, 0x03, 0x7a, 0x03, 0x7c, 0x03, 0x7c, 0x03, + 0x7e, 0x03, 0x7e, 0x03, 0x80, 0x03, 0x80, 0x03, 0x82, 0x03, + 0x82, 0x03, 0x84, 0x03, 0x84, 0x03, 0x86, 0x03, 0x86, 0x03, + 0x88, 0x03, 0x88, 0x03, 0x8a, 0x03, 0x8a, 0x03, 0x8c, 0x03, + 0x8c, 0x03, 0x8e, 0x03, 0x8e, 0x03, 0x90, 0x03, 0x90, 0x03, + 0x92, 0x03, 0x92, 0x03, 0x94, 0x03, 0x94, 0x03, 0x96, 0x03, + 0x96, 0x03, 0x98, 0x03, 0x98, 0x03, 0x9a, 0x03, 0x9a, 0x03, + 0x9c, 0x03, 0x9c, 0x03, 0x9e, 0x03, 0x9e, 0x03, 0xa0, 0x03, + 0xa0, 0x03, 0xa2, 0x03, 0xa2, 0x03, 0xa4, 0x03, 0xa4, 0x03, + 0xa6, 0x03, 0xa6, 0x03, 0xa8, 0x03, 0xa8, 0x03, 0xaa, 0x03, + 0xaa, 0x03, 0xac, 0x03, 0xac, 0x03, 0xae, 0x03, 0xae, 0x03, + 0xb0, 0x03, 0xb0, 0x03, 0xb2, 0x03, 0xb2, 0x03, 0xb4, 0x03, + 0xb4, 0x03, 0xb6, 0x03, 0xb6, 0x03, 0xb8, 0x03, 0xb8, 0x03, + 0xba, 0x03, 0xba, 0x03, 0xbc, 0x03, 0xbc, 0x03, 0xbe, 0x03, + 0xbe, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc2, 0x03, 0xc2, 0x03, + 0xc4, 0x03, 0xc4, 0x03, 0xc6, 0x03, 0xc6, 0x03, 0xc8, 0x03, + 0xc8, 0x03, 0xca, 0x03, 0xca, 0x03, 0xcc, 0x03, 0xcc, 0x03, + 0xce, 0x03, 0xce, 0x03, 0xd0, 0x03, 0xd0, 0x03, 0xd2, 0x03, + 0xd2, 0x03, 0xd4, 0x03, 0xd4, 0x03, 0xd6, 0x03, 0xd6, 0x03, + 0xd8, 0x03, 0xd8, 0x03, 0xda, 0x03, 0xda, 0x03, 0xdc, 0x03, + 0xdc, 0x03, 0xde, 0x03, 0xde, 0x03, 0xe0, 0x03, 0xe0, 0x03, + 0xe2, 0x03, 0xe2, 0x03, 0xe4, 0x03, 0xe4, 0x03, 0xe6, 0x03, + 0xe6, 0x03, 0xe8, 0x03, 0xe8, 0x03, 0xea, 0x03, 0xea, 0x03, + 0xec, 0x03, 0xec, 0x03, 0xee, 0x03, 0xee, 0x03, 0xf0, 0x03, + 0xf0, 0x03, 0xf2, 0x03, 0xf2, 0x03, 0xf4, 0x03, 0xf4, 0x03, + 0xf6, 0x03, 0xf6, 0x03, 0xf8, 0x03, 0xf8, 0x03, 0xfa, 0x03, + 0xfa, 0x03, 0xfc, 0x03, 0xfc, 0x03, 0xfe, 0x03, 0xfe, 0x03, + 0x00, 0x04, 0x00, 0x04, 0x02, 0x04, 0x02, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x06, 0x04, 0x06, 0x04, 0x08, 0x04, 0x08, 0x04, + 0x0a, 0x04, 0x0a, 0x04, 0x0c, 0x04, 0x0c, 0x04, 0x0e, 0x04, + 0x0e, 0x04, 0x10, 0x04, 0x10, 0x04, 0x12, 0x04, 0x12, 0x04, + 0x14, 0x04, 0x14, 0x04, 0x16, 0x04, 0x16, 0x04, 0x18, 0x04, + 0x18, 0x04, 0x1a, 0x04, 0x1a, 0x04, 0x1c, 0x04, 0x1c, 0x04, + 0x1e, 0x04, 0x1e, 0x04, 0x20, 0x04, 0x20, 0x04, 0x22, 0x04, + 0x22, 0x04, 0x24, 0x04, 0x24, 0x04, 0x26, 0x04, 0x26, 0x04, + 0x28, 0x04, 0x28, 0x04, 0x2a, 0x04, 0x2a, 0x04, 0x2c, 0x04, + 0x2c, 0x04, 0x2e, 0x04, 0x2e, 0x04, 0x30, 0x04, 0x30, 0x04, + 0x32, 0x04, 0x32, 0x04, 0x34, 0x04, 0x34, 0x04, 0x36, 0x04, + 0x36, 0x04, 0x38, 0x04, 0x38, 0x04, 0x3a, 0x04, 0x3a, 0x04, + 0x3c, 0x04, 0x3c, 0x04, 0x3e, 0x04, 0x3e, 0x04, 0x40, 0x04, + 0x40, 0x04, 0x42, 0x04, 0x42, 0x04, 0x44, 0x04, 0x44, 0x04, + 0x46, 0x04, 0x46, 0x04, 0x48, 0x04, 0x48, 0x04, 0x4a, 0x04, + 0x4a, 0x04, 0x4c, 0x04, 0x4c, 0x04, 0x4e, 0x04, 0x4e, 0x04, + 0x50, 0x04, 0x50, 0x04, 0x52, 0x04, 0x52, 0x04, 0x54, 0x04, + 0x54, 0x04, 0x56, 0x04, 0x56, 0x04, 0x58, 0x04, 0x58, 0x04, + 0x5a, 0x04, 0x5a, 0x04, 0x5c, 0x04, 0x5c, 0x04, 0x5e, 0x04, + 0x5e, 0x04, 0x60, 0x04, 0x60, 0x04, 0x62, 0x04, 0x62, 0x04, + 0x64, 0x04, 0x64, 0x04, 0x66, 0x04, 0x66, 0x04, 0x68, 0x04, + 0x68, 0x04, 0x6a, 0x04, 0x6a, 0x04, 0x6c, 0x04, 0x6c, 0x04, + 0x6e, 0x04, 0x6e, 0x04, 0x70, 0x04, 0x70, 0x04, 0x72, 0x04, + 0x72, 0x04, 0x74, 0x04, 0x74, 0x04, 0x76, 0x04, 0x76, 0x04, + 0x78, 0x04, 0x78, 0x04, 0x7a, 0x04, 0x7a, 0x04, 0x7c, 0x04, + 0x7c, 0x04, 0x7e, 0x04, 0x7e, 0x04, 0x80, 0x04, 0x80, 0x04, + 0x82, 0x04, 0x82, 0x04, 0x84, 0x04, 0x84, 0x04, 0x86, 0x04, + 0x86, 0x04, 0x88, 0x04, 0x88, 0x04, 0x8a, 0x04, 0x8a, 0x04, + 0x8c, 0x04, 0x8c, 0x04, 0x8e, 0x04, 0x8e, 0x04, 0x90, 0x04, + 0x90, 0x04, 0x92, 0x04, 0x92, 0x04, 0x94, 0x04, 0x94, 0x04, + 0x96, 0x04, 0x96, 0x04, 0x98, 0x04, 0x98, 0x04, 0x9a, 0x04, + 0x9a, 0x04, 0x9c, 0x04, 0x9c, 0x04, 0x9e, 0x04, 0x9e, 0x04, + 0xa0, 0x04, 0xa0, 0x04, 0xa2, 0x04, 0xa2, 0x04, 0xa4, 0x04, + 0xa4, 0x04, 0xa6, 0x04, 0xa6, 0x04, 0xa8, 0x04, 0xa8, 0x04, + 0xaa, 0x04, 0xaa, 0x04, 0xac, 0x04, 0xac, 0x04, 0xae, 0x04, + 0xae, 0x04, 0xb0, 0x04, 0xb0, 0x04, 0xb2, 0x04, 0xb2, 0x04, + 0xb4, 0x04, 0xb4, 0x04, 0xb6, 0x04, 0xb6, 0x04, 0xb8, 0x04, + 0xb8, 0x04, 0xba, 0x04, 0xba, 0x04, 0xbc, 0x04, 0xbc, 0x04, + 0xbe, 0x04, 0xbe, 0x04, 0xc0, 0x04, 0xc0, 0x04, 0xc2, 0x04, + 0xc2, 0x04, 0xc4, 0x04, 0xc4, 0x04, 0xc6, 0x04, 0xc6, 0x04, + 0xc8, 0x04, 0xc8, 0x04, 0xca, 0x04, 0xca, 0x04, 0xcc, 0x04, + 0xcc, 0x04, 0xce, 0x04, 0xce, 0x04, 0xd0, 0x04, 0xd0, 0x04, + 0xd2, 0x04, 0xd2, 0x04, 0xd4, 0x04, 0xd4, 0x04, 0xd6, 0x04, + 0xd6, 0x04, 0xd8, 0x04, 0xd8, 0x04, 0xda, 0x04, 0xda, 0x04, + 0xdc, 0x04, 0xdc, 0x04, 0xde, 0x04, 0xde, 0x04, 0xe0, 0x04, + 0xe0, 0x04, 0xe2, 0x04, 0xe2, 0x04, 0xe4, 0x04, 0xe4, 0x04, + 0xe6, 0x04, 0xe6, 0x04, 0xe8, 0x04, 0xe8, 0x04, 0xea, 0x04, + 0xea, 0x04, 0xec, 0x04, 0xec, 0x04, 0xee, 0x04, 0xee, 0x04, + 0xf0, 0x04, 0xf0, 0x04, 0xf2, 0x04, 0xf2, 0x04, 0xf4, 0x04, + 0xf4, 0x04, 0xf6, 0x04, 0xf6, 0x04, 0xf8, 0x04, 0xf8, 0x04, + 0xfa, 0x04, 0xfa, 0x04, 0xfc, 0x04, 0xfc, 0x04, 0xfe, 0x04, + 0xfe, 0x04, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x04, 0x00, 0x06, 0x00, 0x08, 0x00, 0x0a, 0x00, + 0x0c, 0x00, 0x0e, 0x00, 0x10, 0x00, 0x12, 0x00, 0x14, 0x00, + 0x16, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1c, 0x00, 0x1e, 0x00, + 0x20, 0x00, 0x22, 0x00, 0x24, 0x00, 0x26, 0x00, 0x28, 0x00, + 0x2a, 0x00, 0x2c, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x32, 0x00, + 0x34, 0x00, 0x36, 0x00, 0x38, 0x00, 0x3a, 0x00, 0x3c, 0x00, + 0x3e, 0x00, 0x40, 0x00, 0x42, 0x00, 0x44, 0x00, 0x46, 0x00, + 0x48, 0x00, 0x4a, 0x00, 0x4c, 0x00, 0x4e, 0x00, 0x50, 0x00, + 0x52, 0x00, 0x54, 0x00, 0x56, 0x00, 0x58, 0x00, 0x5a, 0x00, + 0x5c, 0x00, 0x5e, 0x00, 0x60, 0x00, 0x62, 0x00, 0x64, 0x00, + 0x66, 0x00, 0x68, 0x00, 0x6a, 0x00, 0x6c, 0x00, 0x6e, 0x00, + 0x70, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76, 0x00, 0x78, 0x00, + 0x7a, 0x00, 0x7c, 0x00, 0x7e, 0x00, 0x80, 0x00, 0x82, 0x00, + 0x84, 0x00, 0x86, 0x00, 0x88, 0x00, 0x8a, 0x00, 0x8c, 0x00, + 0x8e, 0x00, 0x90, 0x00, 0x92, 0x00, 0x94, 0x00, 0x96, 0x00, + 0x98, 0x00, 0x9a, 0x00, 0x9c, 0x00, 0x9e, 0x00, 0xa0, 0x00, + 0xa2, 0x00, 0xa4, 0x00, 0xa6, 0x00, 0xa8, 0x00, 0xaa, 0x00, + 0xac, 0x00, 0xae, 0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb4, 0x00, + 0xb6, 0x00, 0xb8, 0x00, 0xba, 0x00, 0xbc, 0x00, 0xbe, 0x00, + 0xc0, 0x00, 0xc2, 0x00, 0xc4, 0x00, 0xc6, 0x00, 0xc8, 0x00, + 0xca, 0x00, 0xcc, 0x00, 0xce, 0x00, 0xd0, 0x00, 0xd2, 0x00, + 0xd4, 0x00, 0xd6, 0x00, 0xd8, 0x00, 0xda, 0x00, 0xdc, 0x00, + 0xde, 0x00, 0xe0, 0x00, 0xe2, 0x00, 0xe4, 0x00, 0xe6, 0x00, + 0xe8, 0x00, 0xea, 0x00, 0xec, 0x00, 0xee, 0x00, 0xf0, 0x00, + 0xf2, 0x00, 0xf4, 0x00, 0xf6, 0x00, 0xf8, 0x00, 0xfa, 0x00, + 0xfc, 0x00, 0xfe, 0x00, 0x00, 0x01, 0x02, 0x01, 0x04, 0x01, + 0x06, 0x01, 0x08, 0x01, 0x0a, 0x01, 0x0c, 0x01, 0x0e, 0x01, + 0x10, 0x01, 0x12, 0x01, 0x14, 0x01, 0x16, 0x01, 0x18, 0x01, + 0x1a, 0x01, 0x1c, 0x01, 0x1e, 0x01, 0x20, 0x01, 0x22, 0x01, + 0x24, 0x01, 0x26, 0x01, 0x28, 0x01, 0x2a, 0x01, 0x2c, 0x01, + 0x2e, 0x01, 0x30, 0x01, 0x32, 0x01, 0x34, 0x01, 0x36, 0x01, + 0x38, 0x01, 0x3a, 0x01, 0x3c, 0x01, 0x3e, 0x01, 0x40, 0x01, + 0x42, 0x01, 0x44, 0x01, 0x46, 0x01, 0x48, 0x01, 0x4a, 0x01, + 0x4c, 0x01, 0x4e, 0x01, 0x50, 0x01, 0x52, 0x01, 0x54, 0x01, + 0x56, 0x01, 0x58, 0x01, 0x5a, 0x01, 0x5c, 0x01, 0x5e, 0x01, + 0x60, 0x01, 0x62, 0x01, 0x64, 0x01, 0x66, 0x01, 0x68, 0x01, + 0x6a, 0x01, 0x6c, 0x01, 0x6e, 0x01, 0x70, 0x01, 0x72, 0x01, + 0x74, 0x01, 0x76, 0x01, 0x78, 0x01, 0x7a, 0x01, 0x7c, 0x01, + 0x7e, 0x01, 0x80, 0x01, 0x82, 0x01, 0x84, 0x01, 0x86, 0x01, + 0x88, 0x01, 0x8a, 0x01, 0x8c, 0x01, 0x8e, 0x01, 0x90, 0x01, + 0x92, 0x01, 0x94, 0x01, 0x96, 0x01, 0x98, 0x01, 0x9a, 0x01, + 0x9c, 0x01, 0x9e, 0x01, 0xa0, 0x01, 0xa2, 0x01, 0xa4, 0x01, + 0xa6, 0x01, 0xa8, 0x01, 0xaa, 0x01, 0xac, 0x01, 0xae, 0x01, + 0xb0, 0x01, 0xb2, 0x01, 0xb4, 0x01, 0xb6, 0x01, 0xb8, 0x01, + 0xba, 0x01, 0xbc, 0x01, 0xbe, 0x01, 0xc0, 0x01, 0xc2, 0x01, + 0xc4, 0x01, 0xc6, 0x01, 0xc8, 0x01, 0xca, 0x01, 0xcc, 0x01, + 0xce, 0x01, 0xd0, 0x01, 0xd2, 0x01, 0xd4, 0x01, 0xd6, 0x01, + 0xd8, 0x01, 0xda, 0x01, 0xdc, 0x01, 0xde, 0x01, 0xe0, 0x01, + 0xe2, 0x01, 0xe4, 0x01, 0xe6, 0x01, 0xe8, 0x01, 0xea, 0x01, + 0xec, 0x01, 0xee, 0x01, 0xf0, 0x01, 0xf2, 0x01, 0xf4, 0x01, + 0xf6, 0x01, 0xf8, 0x01, 0xfa, 0x01, 0xfc, 0x01, 0xfe, 0x01, + 0x00, 0x02, 0x02, 0x02, 0x04, 0x02, 0x06, 0x02, 0x08, 0x02, + 0x0a, 0x02, 0x0c, 0x02, 0x0e, 0x02, 0x10, 0x02, 0x12, 0x02, + 0x14, 0x02, 0x16, 0x02, 0x18, 0x02, 0x1a, 0x02, 0x1c, 0x02, + 0x1e, 0x02, 0x20, 0x02, 0x22, 0x02, 0x24, 0x02, 0x26, 0x02, + 0x28, 0x02, 0x2a, 0x02, 0x2c, 0x02, 0x2e, 0x02, 0x30, 0x02, + 0x32, 0x02, 0x34, 0x02, 0x36, 0x02, 0x38, 0x02, 0x3a, 0x02, + 0x3c, 0x02, 0x3e, 0x02, 0x40, 0x02, 0x42, 0x02, 0x44, 0x02, + 0x46, 0x02, 0x48, 0x02, 0x4a, 0x02, 0x4c, 0x02, 0x4e, 0x02, + 0x50, 0x02, 0x52, 0x02, 0x54, 0x02, 0x56, 0x02, 0x58, 0x02, + 0x5a, 0x02, 0x5c, 0x02, 0x5e, 0x02, 0x60, 0x02, 0x62, 0x02, + 0x64, 0x02, 0x66, 0x02, 0x68, 0x02, 0x6a, 0x02, 0x6c, 0x02, + 0x6e, 0x02, 0x70, 0x02, 0x72, 0x02, 0x74, 0x02, 0x76, 0x02, + 0x78, 0x02, 0x7a, 0x02, 0x7c, 0x02, 0x7e, 0x02, 0x80, 0x02, + 0x00, 0x00 +}; + +struct { + uint16_t tab1[642]; /* 0x4847bc, from 0x483630 */ + uint16_t tab2[641]; /* 0x484cc0, from 0x483b34 */ + uint16_t tab3[641]; /* 0x4851c2, from 0x484036 */ + uint16_t tab4[322]; /* 0x4856c4, from 0x484538 */ +} gtables; /* 0x4847bc */ + +static void cfcn_45511b(uint32_t ebx) +{ + uint16_t ax, cx, tmp; + ebx = gtables.tab4[ebx / 2]; + do { + gtables.tab1[ebx / 2]++; + ax = gtables.tab1[ebx / 2]; + if (ax <= gtables.tab1[ebx / 2 + 1]) { + ebx = gtables.tab3[ebx / 2]; + if (ebx) + continue; + else + break; + } + + uint16_t *edi = >ables.tab1[ebx / 2 + 1]; + cx = 0x282; + ax --; + int zf; + do { + zf = (*edi == ax); + edi++; + cx--; + } while (zf && cx); + + uint32_t _edi = (uint32_t)edi - (uint32_t)(>ables.tab1[2]); + ax++; + + tmp = ax; + ax = gtables.tab1[_edi / 2]; + gtables.tab1[_edi / 2] = tmp; + gtables.tab1[ebx / 2] = ax; + + ax = gtables.tab2[ebx / 2]; + cx = gtables.tab2[_edi / 2]; + gtables.tab3[cx / 2] = ebx; + if (cx < 0x502) { + gtables.tab3[cx / 2 + 1] = ebx; + } + + tmp = ax; + ax = cx; + cx = tmp; + + gtables.tab3[cx / 2] = _edi; + if (cx < 0x502) { + gtables.tab3[cx / 2 + 1] = _edi; + } + gtables.tab2[ebx / 2] = ax; + gtables.tab2[_edi / 2] = cx; + ebx = _edi & 0xffff; + ebx = gtables.tab3[ebx / 2]; + } while (ebx); +} + +static void cfcn_004550cc() +{ + uint16_t cx; + size_t ebp = 0; + int edx = 0x141; + do { + cx = gtables.tab4[ebp/2]; + if (gtables.tab1[cx/2] & 1) { + cfcn_45511b(ebp); + } + ebp += 2; + edx--; + } while(edx); + for (size_t i = 0; i < 0x502; i += 2) { + gtables.tab1[i/2] >>= 1; + } + return; +} + +static void cfcn_00455109(uint32_t ebx) +{ + if (gtables.tab1[640] == 0x8000) { + cfcn_004550cc(); + } + cfcn_45511b(ebx); +} + +static void cfcn_004551bb(uint16_t *esi, uint32_t *ecx, uint32_t *ebx) +{ + uint16_t bx = 0x500; + + while (1) { + bx = gtables.tab2[bx / 2]; + + if (bx >= 0x502) + break; + + uint32_t _ecx = *ecx; + uint16_t cf = esi[_ecx / 16] & (1 << (_ecx % 16)); + + (*ecx)++; + + if (cf) { + bx += 2; + } + } + + bx -= 0x502; + cfcn_00455109(bx); + bx >>= 1; + *ebx = bx; +} + +void mkf_decompress(void *arg1, void *arg2) +{ + uint32_t bx; + uint32_t eax, ecx; + + memcpy(>ables, data_483630, sizeof(gtables)); + ecx = 0; + void *edi = arg1; + void *esi = arg2; + + while (1) { + cfcn_004551bb(esi, &ecx, &bx); + if ((bx & 0xff00) == 0) { + *(char*)edi = bx & 0xff; + edi++; + continue; + } + eax = ecx; + uint32_t old_ecx = ecx; + eax >>= 3; + ecx &= 7; + eax = *(uint32_t*)(esi + eax); + eax >>= ecx; + size_t ebp = eax & 0xff; + uint8_t cl = table_483530[ebp]; + uint8_t dh = table_483430[ebp]; + eax >>= cl; + uint8_t dl = eax << 2; + uint16_t dx = (((uint16_t)dh << 8) | dl) >> 2; + cl += 6; + eax = cl; + ecx = old_ecx + eax; + if (dx == 0xfff) + return; + old_ecx = ecx; + bx -= 0xfd; + void *old_esi = esi; + esi = edi - 1 - dx; + + /* the following is a little bit tricky, + * if we use memcpy/memmove, the picture is broken + */ +#if 1 + ecx = bx; + do { + *(uint8_t*)edi = *(uint8_t*)esi; + edi++; + esi++; + ecx--; + } while (ecx); +#else + memmove(edi, esi, bx); /* using rep movsb */ + edi += bx; /* by movsb */ +#endif + esi = old_esi; + ecx = old_ecx; + } +} |