From 9bb6ba93118004a791659774b2359387ee7e8e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Moln=C3=A1r?= Date: Mon, 8 May 2006 08:48:41 +0000 Subject: [PATCH] dos/exe: device driver support added (thanks Michael Devore) committer: ml1050 1147078121 +0000 --- NEWS | 4 + PROJECTS | 2 - doc/upx.pod | 3 - src/p_exe.cpp | 23 +++- src/p_exe.h | 1 + src/stub/l_exe.asm | 62 +++++++++- src/stub/l_exe.h | 298 +++++++++++++++++++++++---------------------- 7 files changed, 241 insertions(+), 152 deletions(-) diff --git a/NEWS b/NEWS index b89ade0e..a0c81722 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ User visible changes for UPX ================================================================== +Changes in 2.01 (27 May 2006): + * dos/exe: device driver support added (thanks Michael Devore) + * arm/pe: better .dll support + Changes in 2.00 (27 Apr 2006): * linux/386: the stub now prints an error message if some strict SELinux mode does prevent runtime decompression and execution diff --git a/PROJECTS b/PROJECTS index 1c9e578e..dbf0a2d6 100644 --- a/PROJECTS +++ b/PROJECTS @@ -56,8 +56,6 @@ Existing formats: - dos/exe: implement filter support - - dos/sys: add support for sys/exe combos - - linux/i386: - use the new assembly preprocessor stuff (ie. process the file headers internally) diff --git a/doc/upx.pod b/doc/upx.pod index 84f62996..b1c73380 100644 --- a/doc/upx.pod +++ b/doc/upx.pod @@ -340,9 +340,6 @@ Extra options available for this executable format: =head2 NOTES FOR DOS/SYS -You can only compress plain sys files, sys/exe (two in one) -combos are not supported. - Compressed programs only work on a 286+. Packed programs will be byte-identical to the original after uncompression. diff --git a/src/p_exe.cpp b/src/p_exe.cpp index c33666a1..3a1ed475 100644 --- a/src/p_exe.cpp +++ b/src/p_exe.cpp @@ -80,7 +80,6 @@ int PackExe::fillExeHeader(struct exe_header_t *eh) const memset(&oh,0,sizeof(oh)); oh.ident = 'M' + 'Z' * 256; oh.headsize16 = 2; - oh.ip = 0; oh.sp = ih.sp > 0x200 ? (unsigned) ih.sp : 0x200; @@ -108,7 +107,11 @@ int PackExe::buildLoader(const Filter *) // prepare loader initLoader(nrv_loader,sizeof(nrv_loader)); + if (device_driver) + addLoader("DEVICEENTRY", NULL); addLoader("EXEENTRY", + device_driver ? "DEVICESUB" : "EXESUB", + "JNCDOCOPY", relocsize ? "EXERELPU" : "", "EXEMAIN4,+G5DXXXX,UPX1HEAD,EXECUTPO", NULL @@ -162,6 +165,7 @@ int PackExe::buildLoader(const Filter *) NULL ); addLoader("EXEMAIN8", + device_driver ? "DEVICEEND" : "", (flag & SS) ? "EXESTACK" : "", (flag & SP) ? "EXESTASP" : "", (flag & USEJUMP) ? "EXEJUMPF" : "", @@ -367,6 +371,8 @@ void PackExe::pack(OutputFile *fo) checkAlreadyPacked(ibuf, UPX_MIN(ih_imagesize, 127u)); + device_driver = get_le32(ibuf) == 0xffffffffu; + // relocations has_9a = false; upx_byte *w = ibuf + ih_imagesize; @@ -523,6 +529,19 @@ void PackExe::pack(OutputFile *fo) oh.m512 = outputlen & 511; oh.p512 = (outputlen + 511) >> 9; + oh.ip = 0; + if (device_driver) + { + patch_le16(loader, e_len, "OP", oh.sp); + patch_le16(loader, e_len, "OS", oh.ss); + // copy .sys header + memcpy(loader + 4, ibuf + 4, 2); + memcpy(loader + 8, ibuf + 8, 2); + // copy original strategy + memcpy(loader + 10, ibuf + 6, 2); + oh.ip = getLoaderSection("EXEENTRY") - 3; + } + //fprintf(stderr,"\ne_len=%x d_len=%x clen=%x oo=%x ulen=%x destp=%x copys=%x images=%x",e_len,d_len,packedsize,ph.overlap_overhead,ph.u_len,destpara,copysize,ih_imagesize); // write header + write loader + compressed file @@ -567,7 +586,7 @@ int PackExe::canUnpack() return false; const off_t off = ih.headsize16 * 16; fi->seek(off, SEEK_SET); - bool b = readPackHeader(128); + bool b = readPackHeader(256); return b && (off + (off_t) ph.c_len <= file_size); } diff --git a/src/p_exe.h b/src/p_exe.h index b27078ac..b7e2b2d1 100644 --- a/src/p_exe.h +++ b/src/p_exe.h @@ -98,6 +98,7 @@ protected: unsigned relocsize; bool has_9a; + bool device_driver; enum { NORELOC = 1, diff --git a/src/stub/l_exe.asm b/src/stub/l_exe.asm index deee2949..a4807eed 100644 --- a/src/stub/l_exe.asm +++ b/src/stub/l_exe.asm @@ -35,10 +35,46 @@ SECTION .text CPU 8086 +; __DEVICEENTRY__ + + dd -1 + dw 0 + dw strategy ; .sys header + dw 0 ; opendos wants this field untouched +original_strategy: + dw 'ST' +strategy: + push cs + push word [cs:original_strategy] + push ax + push bx + push cx + push dx + mov ax, cs + add ax, 'OS' ; calculate normal EXE stack + mov bx, 'OP' + mov cx, ss + mov dx, sp + mov ss, ax ; switch to stack EXE normally has + mov sp, bx + push cx ; save device stack on EXE stack + push dx + push si + push di + push bp + push ds + push es + mov ax, 1 + db 0xa9 +exe_as_device_entry: + xor ax, ax + push ax + ; ============= ; ============= ENTRY POINT ; ============= ; __EXEENTRY__ +exe_entry: mov cx, 'CX' ; first_copy_len/2 mov si, 'SI' ; cx*2-2 mov di, si @@ -56,8 +92,11 @@ do_copy: rep movsw cld - +; __DEVICESUB__ sub [byte cs:si+do_copy+6+2], byte 0x10 +; __EXESUB__ + sub [byte cs:si+do_copy-exe_entry+6+2], byte 0x10 +; __JNCDOCOPY__ jnc do_copy xchg ax, dx scasw @@ -152,6 +191,27 @@ reloc_5: pop es push es pop ds + +; __DEVICEEND__ + pop ax + dec ax + jnz loaded_as_exe + pop es + pop ds + pop bp + pop di + pop si + pop bx ; get original device SS:SP + pop ax + mov ss,ax ; switch to device driver stack + mov sp,bx + pop dx + pop cx + pop bx + pop ax + retf ; return to original strategy + +loaded_as_exe: %ifdef __EXESTACK__ lea ax, ['SS'+bp] mov ss, ax diff --git a/src/stub/l_exe.h b/src/stub/l_exe.h index f853da1b..040d3c4f 100644 --- a/src/stub/l_exe.h +++ b/src/stub/l_exe.h @@ -1,4 +1,4 @@ -/* l_exe.h -- created from l_exe.bin, 2215 (0x8a7) bytes +/* l_exe.h -- created from l_exe.bin, 2381 (0x94d) bytes This file is part of the UPX executable compressor. @@ -27,148 +27,158 @@ */ -#define NRV_LOADER_SIZE 2215 -#define NRV_LOADER_ADLER32 0x4b5438fc -#define NRV_LOADER_CRC32 0x250186be +#define NRV_LOADER_SIZE 2381 +#define NRV_LOADER_ADLER32 0x33a66f6c +#define NRV_LOADER_CRC32 0x35b523f4 -unsigned char nrv_loader[2215] = { -185, 67, 88,190, 83, 73,137,247, 30,169,181,128,140,200, 5, 68, /* 0x 0 */ - 83,142,216, 5, 69, 83,142,192,253,243,165,252, 46,128,108, 18, /* 0x 10 */ - 16,115,231,146,175,173, 14, 14, 14, 6, 31, 7, 22,189, 66, 80, /* 0x 20 */ -187, 66, 88, 85,203, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, /* 0x 30 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, /* 0x 40 */ -164, 0,255,117, 3,232, 0, 0,114,246, 65,140,192, 1,255,115, /* 0x 50 */ - 5,128,196, 8,142,192,209,239,232, 0, 0,227, 0,115,249, 73, /* 0x 60 */ - 73,116, 0, 1,201, 1,201, 1,201, 1,201,193,225, 4,137,205, /* 0x 70 */ -138, 28, 70,246,211, 49,201,232, 0, 0, 17,201,117, 8, 65,232, /* 0x 80 */ - 0, 0,115,251, 65, 65,129,253,209, 0,131,217,254, 41,232,114, /* 0x 90 */ - 14,142,216,141, 1, 40,252,150,243,164,150,142,218,235, 0,209, /* 0x a0 */ -224,209,224,209,224,209,224, 80, 49,192,142,216, 88,193,224, 4, /* 0x b0 */ -106, 0, 31, 1,216, 1,248,235, 0, 0,255,117, 3,232, 6, 0, /* 0x c0 */ - 17,201, 0,255,117, 0,138, 60, 17,246,115, 5,128,198, 8,142, /* 0x d0 */ -218,209,238, 70, 16,255,195,164, 0,255,117, 3,232, 0, 0,114, /* 0x e0 */ -246, 65,140,192, 1,255,115, 5,128,196, 8,142,192,209,239,232, /* 0x f0 */ - 0, 0,114, 10, 73,232, 0, 0, 17,201,121,243,235, 0, 73, 73, /* 0x 100 */ -116, 0, 1,201, 1,201, 1,201,193,225, 3,137,205,138, 28, 70, /* 0x 110 */ -246,211, 49,201,208,235,235, 3,232, 0, 0, 17,201,232, 0, 0, /* 0x 120 */ - 17,201,117, 8, 65,232, 0, 0,115,251, 65, 65,131,253, 81,131, /* 0x 130 */ -217,254, 41,232,114, 14,142,216,141, 1, 40,252,150,243,164,150, /* 0x 140 */ -142,218,235, 0,209,224,209,224,209,224,209,224, 80, 49,192,142, /* 0x 150 */ -216, 88,193,224, 4,106, 0, 31, 1,216, 1,248,235, 0, 0,255, /* 0x 160 */ -117, 3,232, 6, 0, 17,201, 0,255,117, 0,138, 60, 17,246,115, /* 0x 170 */ - 5,128,198, 8,142,218,209,238, 70, 16,255,195,164, 0,255,117, /* 0x 180 */ - 3,232, 0, 0,114,246, 65,140,192, 1,255,115, 5,128,196, 8, /* 0x 190 */ -142,192,209,239,232, 0, 0,114, 10, 73,232, 0, 0, 17,201,121, /* 0x 1a0 */ -243,235, 0, 73, 73,116, 0, 1,201, 1,201, 1,201,193,225, 3, /* 0x 1b0 */ -137,205,138, 28, 70,246,211, 49,201,208,235,115, 12,232, 0, 0, /* 0x 1c0 */ - 17,201,235, 18,232, 0, 0,114,244, 65,232, 0, 0,114,238,232, /* 0x 1d0 */ - 0, 0,115,251, 65, 65,131,253, 81,131,217,253, 41,232,114, 14, /* 0x 1e0 */ -142,216,141, 1, 40,252,150,243,164,150,142,218,235, 0,209,224, /* 0x 1f0 */ -209,224,209,224,209,224, 80, 49,192,142,216, 88,193,224, 4,106, /* 0x 200 */ - 0, 31, 1,216, 1,248,235, 0, 0,255,117, 3,232, 6, 0, 17, /* 0x 210 */ -201, 0,255,117, 0,138, 60, 17,246,115, 5,128,198, 8,142,218, /* 0x 220 */ -209,238, 70, 16,255,195, 93,140,192,128,236, 6,142,216, 6, 31, /* 0x 230 */ -141,181, 82, 83,173, 91,145,173,146,173,151,173, 1,195,142,195, /* 0x 240 */ - 49,192, 1,199, 38, 1, 45,172, 72,116, 0, 64,117,244, 71, 71, /* 0x 250 */ - 38,128, 61,154,117,249, 38, 57, 85, 3,119,243,176, 3,235, 0, /* 0x 260 */ -129,199,254, 0,114, 0,226, 0, 7, 6, 31,141,134, 83, 83,142, /* 0x 270 */ -208,188, 83, 80,234, 73, 80, 67, 83,129,197, 67, 83, 85,184, 73, /* 0x 280 */ - 80, 80,203, 0, 69, 88, 69, 69, 78, 84, 82, 89, 0, 0, 0, 0, /* 0x 290 */ - 0, 69, 88, 69, 82, 69, 76, 80, 85, 0, 38, 0, 0, 0, 69, 88, /* 0x 2a0 */ - 69, 77, 65, 73, 78, 52, 0, 39, 0, 0, 0, 85, 80, 88, 49, 72, /* 0x 2b0 */ - 69, 65, 68, 0, 53, 0, 0, 0, 69, 88, 69, 67, 85, 84, 80, 79, /* 0x 2c0 */ - 0, 80, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 83, 0, 80, 0, /* 0x 2d0 */ - 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 78, 82, 86, 50, 66, 69, /* 0x 2e0 */ - 88, 51, 0, 19, 0, 0, 0, 78, 50, 66, 54, 52, 75, 48, 49, 0, /* 0x 2f0 */ - 93, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 49, 0,104, 0, 0, /* 0x 300 */ - 0, 0, 0, 0, 0,107, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, /* 0x 310 */ - 51, 0, 6, 0, 0, 0, 0, 0, 0, 0,109, 0, 0, 0, 78, 82, /* 0x 320 */ - 86, 50, 66, 69, 88, 57, 0, 4, 0, 0, 0, 0, 0, 0, 0,115, /* 0x 330 */ - 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 50, 0, 9, 0, 0, 0, /* 0x 340 */ - 78, 50, 66, 88, 56, 54, 48, 49, 0,115, 0, 0, 0, 78, 50, 66, /* 0x 350 */ - 50, 56, 54, 48, 49, 0,123, 0, 0, 0, 78, 82, 86, 50, 66, 69, /* 0x 360 */ - 88, 50, 0,126, 0, 0, 0, 0, 0, 0, 0,138, 0, 0, 0, 78, /* 0x 370 */ - 82, 86, 50, 66, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 380 */ -146, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, 0, 6, 0, 0, /* 0x 390 */ - 0, 0, 0, 0, 0,175, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, /* 0x 3a0 */ - 83, 0, 1, 0, 0, 0, 78, 50, 66, 88, 56, 54, 48, 50, 0,175, /* 0x 3b0 */ - 0, 0, 0, 78, 50, 66, 50, 56, 54, 48, 50, 0,189, 0, 0, 0, /* 0x 3c0 */ - 78, 82, 86, 50, 66, 69, 88, 51, 0,195, 0, 0, 0, 0, 0, 0, /* 0x 3d0 */ - 0,201, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 50, 0, 39, 0, /* 0x 3e0 */ - 0, 0, 0, 0, 0, 0,214, 0, 0, 0, 78, 82, 86, 50, 66, 69, /* 0x 3f0 */ - 88, 57, 0, 3, 0, 0, 0, 78, 50, 66, 54, 52, 75, 48, 50, 0, /* 0x 400 */ -216, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 57, 0,227, 0, 0, /* 0x 410 */ - 0, 78, 82, 86, 50, 66, 49, 54, 69, 0,231, 0, 0, 0, 78, 82, /* 0x 420 */ - 86, 50, 68, 49, 54, 83, 0,231, 0, 0, 0, 0, 0, 0, 0,239, /* 0x 430 */ - 0, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 19, 0, 0, 0, /* 0x 440 */ - 78, 50, 68, 54, 52, 75, 48, 49, 0,244, 0, 0, 0, 78, 82, 86, /* 0x 450 */ - 50, 68, 69, 88, 49, 0,255, 0, 0, 0, 0, 0, 0, 0, 2, 1, /* 0x 460 */ - 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 6, 0, 0, 0, 0, /* 0x 470 */ - 0, 0, 0, 8, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, /* 0x 480 */ - 15, 0, 0, 0, 0, 0, 0, 0, 14, 1, 0, 0, 78, 82, 86, 50, /* 0x 490 */ - 68, 69, 88, 57, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 1, 0, /* 0x 4a0 */ - 0, 78, 82, 86, 50, 68, 69, 88, 50, 0, 13, 0, 0, 0, 78, 50, /* 0x 4b0 */ - 68, 88, 56, 54, 48, 49, 0, 18, 1, 0, 0, 78, 50, 68, 50, 56, /* 0x 4c0 */ - 54, 48, 49, 0, 24, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 50, /* 0x 4d0 */ - 0, 27, 1, 0, 0, 0, 0, 0, 0, 43, 1, 0, 0, 78, 82, 86, /* 0x 4e0 */ - 50, 68, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0, 48, 1, /* 0x 4f0 */ - 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 15, 0, 0, 0, 0, /* 0x 500 */ - 0, 0, 0, 56, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, /* 0x 510 */ - 6, 0, 0, 0, 0, 0, 0, 0, 84, 1, 0, 0, 78, 82, 86, 50, /* 0x 520 */ - 68, 49, 54, 83, 0, 1, 0, 0, 0, 78, 50, 68, 88, 56, 54, 48, /* 0x 530 */ - 50, 0, 84, 1, 0, 0, 78, 50, 68, 50, 56, 54, 48, 50, 0, 98, /* 0x 540 */ - 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0,104, 1, 0, 0, /* 0x 550 */ - 0, 0, 0, 0,110, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 50, /* 0x 560 */ - 0, 47, 0, 0, 0, 0, 0, 0, 0,123, 1, 0, 0, 78, 82, 86, /* 0x 570 */ - 50, 68, 69, 88, 57, 0, 3, 0, 0, 0, 78, 50, 68, 54, 52, 75, /* 0x 580 */ - 48, 50, 0,125, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 57, 0, /* 0x 590 */ -136, 1, 0, 0, 78, 82, 86, 50, 68, 49, 54, 69, 0,140, 1, 0, /* 0x 5a0 */ - 0, 78, 82, 86, 50, 69, 49, 54, 83, 0,140, 1, 0, 0, 0, 0, /* 0x 5b0 */ - 0, 0,148, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 19, /* 0x 5c0 */ - 0, 0, 0, 78, 50, 69, 54, 52, 75, 48, 49, 0,153, 1, 0, 0, /* 0x 5d0 */ - 78, 82, 86, 50, 69, 69, 88, 49, 0,164, 1, 0, 0, 0, 0, 0, /* 0x 5e0 */ - 0,167, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 6, 0, /* 0x 5f0 */ - 0, 0, 0, 0, 0, 0,173, 1, 0, 0, 78, 82, 86, 50, 69, 69, /* 0x 600 */ - 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0,179, 1, 0, 0, 78, /* 0x 610 */ - 82, 86, 50, 69, 69, 88, 57, 0, 4, 0, 0, 0, 0, 0, 0, 0, /* 0x 620 */ -183, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 50, 0, 20, 0, 0, /* 0x 630 */ - 0, 78, 50, 69, 88, 56, 54, 48, 49, 0,183, 1, 0, 0, 78, 50, /* 0x 640 */ - 69, 50, 56, 54, 48, 49, 0,189, 1, 0, 0, 78, 82, 86, 50, 69, /* 0x 650 */ - 69, 88, 50, 0,192, 1, 0, 0, 0, 0, 0, 0,208, 1, 0, 0, /* 0x 660 */ - 78, 82, 86, 50, 69, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, /* 0x 670 */ - 0,215, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 15, 0, /* 0x 680 */ - 0, 0, 0, 0, 0, 0,221, 1, 0, 0, 78, 82, 86, 50, 69, 69, /* 0x 690 */ - 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0,226, 1, 0, 0, 78, /* 0x 6a0 */ - 82, 86, 50, 69, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 6b0 */ -254, 1, 0, 0, 78, 82, 86, 50, 69, 49, 54, 83, 0, 1, 0, 0, /* 0x 6c0 */ - 0, 78, 50, 69, 88, 56, 54, 48, 50, 0,254, 1, 0, 0, 78, 50, /* 0x 6d0 */ - 69, 50, 56, 54, 48, 50, 0, 12, 2, 0, 0, 78, 82, 86, 50, 69, /* 0x 6e0 */ - 69, 88, 51, 0, 18, 2, 0, 0, 0, 0, 0, 0, 24, 2, 0, 0, /* 0x 6f0 */ - 78, 82, 86, 50, 69, 69, 88, 50, 0, 52, 0, 0, 0, 0, 0, 0, /* 0x 700 */ - 0, 37, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 57, 0, 3, 0, /* 0x 710 */ - 0, 0, 78, 50, 69, 54, 52, 75, 48, 50, 0, 39, 2, 0, 0, 78, /* 0x 720 */ - 82, 86, 50, 69, 69, 88, 57, 0, 50, 2, 0, 0, 78, 82, 86, 50, /* 0x 730 */ - 69, 49, 54, 69, 0, 54, 2, 0, 0, 69, 88, 69, 77, 65, 73, 78, /* 0x 740 */ - 53, 0, 54, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 67, 0, 55, /* 0x 750 */ - 2, 0, 0, 69, 88, 69, 65, 68, 74, 85, 83, 0, 55, 2, 0, 0, /* 0x 760 */ - 69, 88, 69, 78, 79, 65, 68, 74, 0, 62, 2, 0, 0, 69, 88, 69, /* 0x 770 */ - 82, 69, 76, 79, 49, 0, 64, 2, 0, 0, 0, 0, 0, 0, 91, 2, /* 0x 780 */ - 0, 0, 69, 88, 69, 82, 69, 76, 79, 50, 0, 0, 0, 0, 0, 69, /* 0x 790 */ - 88, 69, 82, 69, 76, 57, 65, 0, 94, 2, 0, 0, 0, 0, 0, 0, /* 0x 7a0 */ -112, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 0, 18, 0, 0, /* 0x 7b0 */ - 0, 69, 88, 69, 82, 69, 76, 79, 50, 0,112, 2, 0, 0, 69, 88, /* 0x 7c0 */ - 69, 82, 69, 66, 73, 71, 0,116, 2, 0, 0, 0, 0, 0, 0,118, /* 0x 7d0 */ - 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 0, 9, 0, 0, 0, /* 0x 7e0 */ - 69, 88, 69, 82, 69, 76, 79, 51, 0,118, 2, 0, 0, 0, 0, 0, /* 0x 7f0 */ - 0,120, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 0, 23, 0, /* 0x 800 */ - 0, 0, 69, 88, 69, 77, 65, 73, 78, 56, 0,120, 2, 0, 0, 69, /* 0x 810 */ - 88, 69, 83, 84, 65, 67, 75, 0,123, 2, 0, 0, 69, 88, 69, 68, /* 0x 820 */ - 85, 77, 77, 83, 0,129, 2, 0, 0, 69, 88, 69, 83, 84, 65, 83, /* 0x 830 */ - 80, 0,129, 2, 0, 0, 69, 88, 69, 68, 85, 77, 77, 80, 0,132, /* 0x 840 */ - 2, 0, 0, 69, 88, 69, 74, 85, 77, 80, 70, 0,132, 2, 0, 0, /* 0x 850 */ - 69, 88, 69, 82, 69, 84, 85, 82, 0,137, 2, 0, 0, 69, 88, 69, /* 0x 860 */ - 82, 67, 83, 80, 79, 0,137, 2, 0, 0, 69, 88, 69, 82, 69, 84, /* 0x 870 */ - 73, 80, 0,141, 2, 0, 0, 69, 88, 69, 68, 85, 77, 77, 90, 0, /* 0x 880 */ -147, 2, 0, 0, 69, 88, 69, 84, 72, 69, 78, 68, 0,147, 2, 0, /* 0x 890 */ - 0,255,255,255,255,147, 2 /* 0x 8a0 */ +unsigned char nrv_loader[2381] = { +255,255,255,255, 0, 0, 12, 0, 0, 0, 83, 84, 14, 46,255, 54, /* 0x 0 */ + 10, 0, 80, 83, 81, 82,140,200, 5, 79, 83,187, 79, 80,140,209, /* 0x 10 */ +137,226,142,208,137,220, 81, 82, 86, 87, 85, 30, 6,184, 1, 0, /* 0x 20 */ +169, 49,192, 80,185, 67, 88,190, 83, 73,137,247, 30,169,181,128, /* 0x 30 */ +140,200, 5, 68, 83,142,216, 5, 69, 83,142,192,253,243,165,252, /* 0x 40 */ + 46,128,108, 70, 16, 46,128,108, 18, 16,115, 0,146,175,173, 14, /* 0x 50 */ + 14, 14, 6, 31, 7, 22,189, 66, 80,187, 66, 88, 85,203, 85, 80, /* 0x 60 */ + 88, 33,161,216,208,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */ + 0, 0, 0, 0, 0, 0, 0, 0, 45,164, 0,255,117, 3,232, 0, /* 0x 80 */ + 0,114,246, 65,140,192, 1,255,115, 5,128,196, 8,142,192,209, /* 0x 90 */ +239,232, 0, 0,227, 0,115,249, 73, 73,116, 0, 1,201, 1,201, /* 0x a0 */ + 1,201, 1,201,193,225, 4,137,205,138, 28, 70,246,211, 49,201, /* 0x b0 */ +232, 0, 0, 17,201,117, 8, 65,232, 0, 0,115,251, 65, 65,129, /* 0x c0 */ +253,209, 0,131,217,254, 41,232,114, 14,142,216,141, 1, 40,252, /* 0x d0 */ +150,243,164,150,142,218,235, 0,209,224,209,224,209,224,209,224, /* 0x e0 */ + 80, 49,192,142,216, 88,193,224, 4,106, 0, 31, 1,216, 1,248, /* 0x f0 */ +235, 0, 0,255,117, 3,232, 6, 0, 17,201, 0,255,117, 0,138, /* 0x 100 */ + 60, 17,246,115, 5,128,198, 8,142,218,209,238, 70, 16,255,195, /* 0x 110 */ +164, 0,255,117, 3,232, 0, 0,114,246, 65,140,192, 1,255,115, /* 0x 120 */ + 5,128,196, 8,142,192,209,239,232, 0, 0,114, 10, 73,232, 0, /* 0x 130 */ + 0, 17,201,121,243,235, 0, 73, 73,116, 0, 1,201, 1,201, 1, /* 0x 140 */ +201,193,225, 3,137,205,138, 28, 70,246,211, 49,201,208,235,235, /* 0x 150 */ + 3,232, 0, 0, 17,201,232, 0, 0, 17,201,117, 8, 65,232, 0, /* 0x 160 */ + 0,115,251, 65, 65,131,253, 81,131,217,254, 41,232,114, 14,142, /* 0x 170 */ +216,141, 1, 40,252,150,243,164,150,142,218,235, 0,209,224,209, /* 0x 180 */ +224,209,224,209,224, 80, 49,192,142,216, 88,193,224, 4,106, 0, /* 0x 190 */ + 31, 1,216, 1,248,235, 0, 0,255,117, 3,232, 6, 0, 17,201, /* 0x 1a0 */ + 0,255,117, 0,138, 60, 17,246,115, 5,128,198, 8,142,218,209, /* 0x 1b0 */ +238, 70, 16,255,195,164, 0,255,117, 3,232, 0, 0,114,246, 65, /* 0x 1c0 */ +140,192, 1,255,115, 5,128,196, 8,142,192,209,239,232, 0, 0, /* 0x 1d0 */ +114, 10, 73,232, 0, 0, 17,201,121,243,235, 0, 73, 73,116, 0, /* 0x 1e0 */ + 1,201, 1,201, 1,201,193,225, 3,137,205,138, 28, 70,246,211, /* 0x 1f0 */ + 49,201,208,235,115, 12,232, 0, 0, 17,201,235, 18,232, 0, 0, /* 0x 200 */ +114,244, 65,232, 0, 0,114,238,232, 0, 0,115,251, 65, 65,131, /* 0x 210 */ +253, 81,131,217,253, 41,232,114, 14,142,216,141, 1, 40,252,150, /* 0x 220 */ +243,164,150,142,218,235, 0,209,224,209,224,209,224,209,224, 80, /* 0x 230 */ + 49,192,142,216, 88,193,224, 4,106, 0, 31, 1,216, 1,248,235, /* 0x 240 */ + 0, 0,255,117, 3,232, 6, 0, 17,201, 0,255,117, 0,138, 60, /* 0x 250 */ + 17,246,115, 5,128,198, 8,142,218,209,238, 70, 16,255,195, 93, /* 0x 260 */ +140,192,128,236, 6,142,216, 6, 31,141,181, 82, 83,173, 91,145, /* 0x 270 */ +173,146,173,151,173, 1,195,142,195, 49,192, 1,199, 38, 1, 45, /* 0x 280 */ +172, 72,116, 0, 64,117,244, 71, 71, 38,128, 61,154,117,249, 38, /* 0x 290 */ + 57, 85, 3,119,243,176, 3,235, 0,129,199,254, 0,114, 0,226, /* 0x 2a0 */ + 0, 7, 6, 31, 88, 72,117, 16, 7, 31, 93, 95, 94, 91, 88,142, /* 0x 2b0 */ +208,137,220, 90, 89, 91, 88,203,141,134, 83, 83,142,208,188, 83, /* 0x 2c0 */ + 80,234, 73, 80, 67, 83,129,197, 67, 83, 85,184, 73, 80, 80,203, /* 0x 2d0 */ + 68, 69, 86, 73, 67, 69, 69, 78, 84, 82, 89, 0, 0, 0, 0, 0, /* 0x 2e0 */ + 69, 88, 69, 69, 78, 84, 82, 89, 0, 52, 0, 0, 0, 68, 69, 86, /* 0x 2f0 */ + 73, 67, 69, 83, 85, 66, 0, 80, 0, 0, 0, 69, 88, 69, 83, 85, /* 0x 300 */ + 66, 0, 85, 0, 0, 0, 74, 78, 67, 68, 79, 67, 79, 80, 89, 0, /* 0x 310 */ + 90, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, 69, 88, 69, 69, /* 0x 320 */ + 78, 84, 82, 89, 0, 10, 0, 0, 0, 69, 88, 69, 82, 69, 76, 80, /* 0x 330 */ + 85, 0, 95, 0, 0, 0, 69, 88, 69, 77, 65, 73, 78, 52, 0, 96, /* 0x 340 */ + 0, 0, 0, 85, 80, 88, 49, 72, 69, 65, 68, 0,110, 0, 0, 0, /* 0x 350 */ + 69, 88, 69, 67, 85, 84, 80, 79, 0,137, 0, 0, 0, 78, 82, 86, /* 0x 360 */ + 50, 66, 49, 54, 83, 0,137, 0, 0, 0, 0, 0, 0, 0,145, 0, /* 0x 370 */ + 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, 0, 19, 0, 0, 0, 78, /* 0x 380 */ + 50, 66, 54, 52, 75, 48, 49, 0,150, 0, 0, 0, 78, 82, 86, 50, /* 0x 390 */ + 66, 69, 88, 49, 0,161, 0, 0, 0, 0, 0, 0, 0,164, 0, 0, /* 0x 3a0 */ + 0, 78, 82, 86, 50, 66, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, /* 0x 3b0 */ + 0, 0,166, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 57, 0, 4, /* 0x 3c0 */ + 0, 0, 0, 0, 0, 0, 0,172, 0, 0, 0, 78, 82, 86, 50, 66, /* 0x 3d0 */ + 69, 88, 50, 0, 9, 0, 0, 0, 78, 50, 66, 88, 56, 54, 48, 49, /* 0x 3e0 */ + 0,172, 0, 0, 0, 78, 50, 66, 50, 56, 54, 48, 49, 0,180, 0, /* 0x 3f0 */ + 0, 0, 78, 82, 86, 50, 66, 69, 88, 50, 0,183, 0, 0, 0, 0, /* 0x 400 */ + 0, 0, 0,195, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, 0, /* 0x 410 */ + 6, 0, 0, 0, 0, 0, 0, 0,203, 0, 0, 0, 78, 82, 86, 50, /* 0x 420 */ + 66, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0,232, 0, 0, /* 0x 430 */ + 0, 78, 82, 86, 50, 66, 49, 54, 83, 0, 1, 0, 0, 0, 78, 50, /* 0x 440 */ + 66, 88, 56, 54, 48, 50, 0,232, 0, 0, 0, 78, 50, 66, 50, 56, /* 0x 450 */ + 54, 48, 50, 0,246, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, /* 0x 460 */ + 0,252, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 78, 82, 86, /* 0x 470 */ + 50, 66, 69, 88, 50, 0, 39, 0, 0, 0, 0, 0, 0, 0, 15, 1, /* 0x 480 */ + 0, 0, 78, 82, 86, 50, 66, 69, 88, 57, 0, 3, 0, 0, 0, 78, /* 0x 490 */ + 50, 66, 54, 52, 75, 48, 50, 0, 17, 1, 0, 0, 78, 82, 86, 50, /* 0x 4a0 */ + 66, 69, 88, 57, 0, 28, 1, 0, 0, 78, 82, 86, 50, 66, 49, 54, /* 0x 4b0 */ + 69, 0, 32, 1, 0, 0, 78, 82, 86, 50, 68, 49, 54, 83, 0, 32, /* 0x 4c0 */ + 1, 0, 0, 0, 0, 0, 0, 40, 1, 0, 0, 78, 82, 86, 50, 68, /* 0x 4d0 */ + 69, 88, 51, 0, 19, 0, 0, 0, 78, 50, 68, 54, 52, 75, 48, 49, /* 0x 4e0 */ + 0, 45, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 49, 0, 56, 1, /* 0x 4f0 */ + 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 78, 82, 86, 50, 68, 69, /* 0x 500 */ + 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0, 65, 1, 0, 0, 78, /* 0x 510 */ + 82, 86, 50, 68, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0, /* 0x 520 */ + 71, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 57, 0, 4, 0, 0, /* 0x 530 */ + 0, 0, 0, 0, 0, 75, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, /* 0x 540 */ + 50, 0, 13, 0, 0, 0, 78, 50, 68, 88, 56, 54, 48, 49, 0, 75, /* 0x 550 */ + 1, 0, 0, 78, 50, 68, 50, 56, 54, 48, 49, 0, 81, 1, 0, 0, /* 0x 560 */ + 78, 82, 86, 50, 68, 69, 88, 50, 0, 84, 1, 0, 0, 0, 0, 0, /* 0x 570 */ + 0,100, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 15, 0, /* 0x 580 */ + 0, 0, 0, 0, 0, 0,105, 1, 0, 0, 78, 82, 86, 50, 68, 69, /* 0x 590 */ + 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 78, /* 0x 5a0 */ + 82, 86, 50, 68, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 5b0 */ +141, 1, 0, 0, 78, 82, 86, 50, 68, 49, 54, 83, 0, 1, 0, 0, /* 0x 5c0 */ + 0, 78, 50, 68, 88, 56, 54, 48, 50, 0,141, 1, 0, 0, 78, 50, /* 0x 5d0 */ + 68, 50, 56, 54, 48, 50, 0,155, 1, 0, 0, 78, 82, 86, 50, 68, /* 0x 5e0 */ + 69, 88, 51, 0,161, 1, 0, 0, 0, 0, 0, 0,167, 1, 0, 0, /* 0x 5f0 */ + 78, 82, 86, 50, 68, 69, 88, 50, 0, 47, 0, 0, 0, 0, 0, 0, /* 0x 600 */ + 0,180, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 57, 0, 3, 0, /* 0x 610 */ + 0, 0, 78, 50, 68, 54, 52, 75, 48, 50, 0,182, 1, 0, 0, 78, /* 0x 620 */ + 82, 86, 50, 68, 69, 88, 57, 0,193, 1, 0, 0, 78, 82, 86, 50, /* 0x 630 */ + 68, 49, 54, 69, 0,197, 1, 0, 0, 78, 82, 86, 50, 69, 49, 54, /* 0x 640 */ + 83, 0,197, 1, 0, 0, 0, 0, 0, 0,205, 1, 0, 0, 78, 82, /* 0x 650 */ + 86, 50, 69, 69, 88, 51, 0, 19, 0, 0, 0, 78, 50, 69, 54, 52, /* 0x 660 */ + 75, 48, 49, 0,210, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 49, /* 0x 670 */ + 0,221, 1, 0, 0, 0, 0, 0, 0,224, 1, 0, 0, 78, 82, 86, /* 0x 680 */ + 50, 69, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0,230, 1, /* 0x 690 */ + 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 15, 0, 0, 0, 0, /* 0x 6a0 */ + 0, 0, 0,236, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 57, 0, /* 0x 6b0 */ + 4, 0, 0, 0, 0, 0, 0, 0,240, 1, 0, 0, 78, 82, 86, 50, /* 0x 6c0 */ + 69, 69, 88, 50, 0, 20, 0, 0, 0, 78, 50, 69, 88, 56, 54, 48, /* 0x 6d0 */ + 49, 0,240, 1, 0, 0, 78, 50, 69, 50, 56, 54, 48, 49, 0,246, /* 0x 6e0 */ + 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 50, 0,249, 1, 0, 0, /* 0x 6f0 */ + 0, 0, 0, 0, 9, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, /* 0x 700 */ + 0, 15, 0, 0, 0, 0, 0, 0, 0, 16, 2, 0, 0, 78, 82, 86, /* 0x 710 */ + 50, 69, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0, 22, 2, /* 0x 720 */ + 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 15, 0, 0, 0, 0, /* 0x 730 */ + 0, 0, 0, 27, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, /* 0x 740 */ + 6, 0, 0, 0, 0, 0, 0, 0, 55, 2, 0, 0, 78, 82, 86, 50, /* 0x 750 */ + 69, 49, 54, 83, 0, 1, 0, 0, 0, 78, 50, 69, 88, 56, 54, 48, /* 0x 760 */ + 50, 0, 55, 2, 0, 0, 78, 50, 69, 50, 56, 54, 48, 50, 0, 69, /* 0x 770 */ + 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 75, 2, 0, 0, /* 0x 780 */ + 0, 0, 0, 0, 81, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 50, /* 0x 790 */ + 0, 52, 0, 0, 0, 0, 0, 0, 0, 94, 2, 0, 0, 78, 82, 86, /* 0x 7a0 */ + 50, 69, 69, 88, 57, 0, 3, 0, 0, 0, 78, 50, 69, 54, 52, 75, /* 0x 7b0 */ + 48, 50, 0, 96, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 57, 0, /* 0x 7c0 */ +107, 2, 0, 0, 78, 82, 86, 50, 69, 49, 54, 69, 0,111, 2, 0, /* 0x 7d0 */ + 0, 69, 88, 69, 77, 65, 73, 78, 53, 0,111, 2, 0, 0, 69, 88, /* 0x 7e0 */ + 69, 82, 69, 76, 79, 67, 0,112, 2, 0, 0, 69, 88, 69, 65, 68, /* 0x 7f0 */ + 74, 85, 83, 0,112, 2, 0, 0, 69, 88, 69, 78, 79, 65, 68, 74, /* 0x 800 */ + 0,119, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 0,121, 2, /* 0x 810 */ + 0, 0, 0, 0, 0, 0,148, 2, 0, 0, 69, 88, 69, 82, 69, 76, /* 0x 820 */ + 79, 50, 0, 0, 0, 0, 0, 69, 88, 69, 82, 69, 76, 57, 65, 0, /* 0x 830 */ +151, 2, 0, 0, 0, 0, 0, 0,169, 2, 0, 0, 69, 88, 69, 82, /* 0x 840 */ + 69, 76, 79, 49, 0, 18, 0, 0, 0, 69, 88, 69, 82, 69, 76, 79, /* 0x 850 */ + 50, 0,169, 2, 0, 0, 69, 88, 69, 82, 69, 66, 73, 71, 0,173, /* 0x 860 */ + 2, 0, 0, 0, 0, 0, 0,175, 2, 0, 0, 69, 88, 69, 82, 69, /* 0x 870 */ + 76, 79, 49, 0, 9, 0, 0, 0, 69, 88, 69, 82, 69, 76, 79, 51, /* 0x 880 */ + 0,175, 2, 0, 0, 0, 0, 0, 0,177, 2, 0, 0, 69, 88, 69, /* 0x 890 */ + 82, 69, 76, 79, 49, 0, 23, 0, 0, 0, 69, 88, 69, 77, 65, 73, /* 0x 8a0 */ + 78, 56, 0,177, 2, 0, 0, 68, 69, 86, 73, 67, 69, 69, 78, 68, /* 0x 8b0 */ + 0,180, 2, 0, 0, 69, 88, 69, 83, 84, 65, 67, 75, 0,200, 2, /* 0x 8c0 */ + 0, 0, 69, 88, 69, 68, 85, 77, 77, 83, 0,206, 2, 0, 0, 69, /* 0x 8d0 */ + 88, 69, 83, 84, 65, 83, 80, 0,206, 2, 0, 0, 69, 88, 69, 68, /* 0x 8e0 */ + 85, 77, 77, 80, 0,209, 2, 0, 0, 69, 88, 69, 74, 85, 77, 80, /* 0x 8f0 */ + 70, 0,209, 2, 0, 0, 69, 88, 69, 82, 69, 84, 85, 82, 0,214, /* 0x 900 */ + 2, 0, 0, 69, 88, 69, 82, 67, 83, 80, 79, 0,214, 2, 0, 0, /* 0x 910 */ + 69, 88, 69, 82, 69, 84, 73, 80, 0,218, 2, 0, 0, 69, 88, 69, /* 0x 920 */ + 68, 85, 77, 77, 90, 0,224, 2, 0, 0, 69, 88, 69, 84, 72, 69, /* 0x 930 */ + 78, 68, 0,224, 2, 0, 0,255,255,255,255,224, 2 /* 0x 940 */ };