mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
merge
This commit is contained in:
commit
3c87e6b270
|
@ -304,7 +304,8 @@ PackLinuxElf32x86::buildLinuxLoader(
|
|||
unsigned fold_hdrlen = 0;
|
||||
if (0 < szfold) {
|
||||
cprElfHdr1 const *const hf = (cprElfHdr1 const *)fold;
|
||||
fold_hdrlen = sizeof(hf->ehdr) + hf->ehdr.e_phentsize * hf->ehdr.e_phnum +
|
||||
fold_hdrlen = sizeof(hf->ehdr) +
|
||||
get_native16(&hf->ehdr.e_phentsize) * get_native16(&hf->ehdr.e_phnum) +
|
||||
sizeof(l_info);
|
||||
if (0 == get_le32(fold_hdrlen + fold)) {
|
||||
// inconsistent SIZEOF_HEADERS in *.lds (ld, binutils)
|
||||
|
@ -354,11 +355,13 @@ PackLinuxElf32x86::buildLinuxLoader(
|
|||
// Elf32_Edhr
|
||||
sizeof(elfout.ehdr) +
|
||||
// Elf32_Phdr: 1 for exec86, 2 for sh86, 3 for elf86
|
||||
(elfout.ehdr.e_phentsize * elfout.ehdr.e_phnum) +
|
||||
(get_native16(&elfout.ehdr.e_phentsize) * get_native16(&elfout.ehdr.e_phnum)) +
|
||||
// checksum UPX! lsize version format
|
||||
sizeof(l_info) +
|
||||
// PT_DYNAMIC with DT_NEEDED "forwarded" from original file
|
||||
((elfout.ehdr.e_phnum==3) ? (unsigned) elfout.phdr[2].p_memsz : 0) +
|
||||
((get_native16(&elfout.ehdr.e_phnum)==3)
|
||||
? (unsigned) get_native32(&elfout.phdr[2].p_memsz)
|
||||
: 0) +
|
||||
// p_progid, p_filesize, p_blocksize
|
||||
sizeof(p_info) +
|
||||
// compressed data
|
||||
|
@ -1002,7 +1005,7 @@ void PackLinuxElf32::pack1(OutputFile */*fo*/, Filter &/*ft*/)
|
|||
void PackLinuxElf32x86::pack1(OutputFile *fo, Filter &ft)
|
||||
{
|
||||
super::pack1(fo, ft);
|
||||
generateElfHdr(fo, linux_i386elf_fold, getbrk(phdri, ehdri.e_phnum) );
|
||||
generateElfHdr(fo, linux_i386elf_fold, getbrk(phdri, get_native16(&ehdri.e_phnum)) );
|
||||
}
|
||||
|
||||
void PackLinuxElf32::ARM_pack1(OutputFile *fo, bool const isBE)
|
||||
|
@ -1023,7 +1026,7 @@ void PackLinuxElf32::ARM_pack1(OutputFile *fo, bool const isBE)
|
|||
sizeof(Elf32_Ehdr) + (unsigned char const *)&linux_elf32arm_fold,
|
||||
3*sizeof(Elf32_Phdr) );
|
||||
}
|
||||
generateElfHdr(fo, &h3, getbrk(phdri, ehdri.e_phnum) );
|
||||
generateElfHdr(fo, &h3, getbrk(phdri, get_native16(&ehdri.e_phnum)) );
|
||||
}
|
||||
|
||||
void PackLinuxElf32armLe::pack1(OutputFile *fo, Filter &ft)
|
||||
|
@ -1041,7 +1044,7 @@ void PackLinuxElf32armBe::pack1(OutputFile *fo, Filter &ft) // FIXME
|
|||
void PackLinuxElf32ppc::pack1(OutputFile *fo, Filter &ft)
|
||||
{
|
||||
super::pack1(fo, ft);
|
||||
generateElfHdr(fo, linux_elfppc32_fold, getbrk(phdri, ehdri.e_phnum) );
|
||||
generateElfHdr(fo, linux_elfppc32_fold, getbrk(phdri, get_native16(&ehdri.e_phnum)) );
|
||||
}
|
||||
|
||||
void PackLinuxElf64::pack1(OutputFile */*fo*/, Filter &/*ft*/)
|
||||
|
@ -1063,7 +1066,7 @@ void PackLinuxElf64::pack1(OutputFile */*fo*/, Filter &/*ft*/)
|
|||
void PackLinuxElf64amd::pack1(OutputFile *fo, Filter &ft)
|
||||
{
|
||||
super::pack1(fo, ft);
|
||||
generateElfHdr(fo, linux_elf64amd_fold, getbrk(phdri, ehdri.e_phnum) );
|
||||
generateElfHdr(fo, linux_elf64amd_fold, getbrk(phdri, get_native16(&ehdri.e_phnum)) );
|
||||
}
|
||||
|
||||
// Determine length of gap between PT_LOAD phdr[k] and closest PT_LOAD
|
||||
|
@ -1310,12 +1313,13 @@ void PackLinuxElf64amd::pack3(OutputFile *fo, Filter &ft)
|
|||
len += (7&-lsize) + lsize;
|
||||
bool const is_big = (lo_va_user < (lo_va_stub + len + 2*PAGE_SIZE));
|
||||
if (is_big) {
|
||||
elfout.ehdr.e_entry += lo_va_user - lo_va_stub;
|
||||
elfout.phdr[0].p_vaddr = lo_va_user;
|
||||
elfout.phdr[0].p_paddr = lo_va_user;
|
||||
set_native64( &elfout.ehdr.e_entry,
|
||||
get_native64(&elfout.ehdr.e_entry) + lo_va_user - lo_va_stub);
|
||||
set_native64(&elfout.phdr[0].p_vaddr, lo_va_user);
|
||||
set_native64(&elfout.phdr[0].p_paddr, lo_va_user);
|
||||
lo_va_stub = lo_va_user;
|
||||
adrc = lo_va_stub;
|
||||
adrm = getbrk(phdri, ehdri.e_phnum);
|
||||
adrm = getbrk(phdri, get_native16(&ehdri.e_phnum));
|
||||
adru = PAGE_MASK & (~PAGE_MASK + adrm); // round up to page boundary
|
||||
adrx = adru + hlen;
|
||||
lenm = PAGE_SIZE + len;
|
||||
|
@ -1551,13 +1555,14 @@ void PackLinuxElf32::pack4(OutputFile *fo, Filter &ft)
|
|||
#endif /*}*/
|
||||
|
||||
// rewrite Elf header
|
||||
if (Elf32_Ehdr::ET_DYN==ehdri.e_type) {
|
||||
unsigned const base= elfout.phdr[0].p_vaddr;
|
||||
elfout.ehdr.e_type= Elf32_Ehdr::ET_DYN;
|
||||
elfout.ehdr.e_phnum= 1;
|
||||
elfout.ehdr.e_entry -= base;
|
||||
elfout.phdr[0].p_vaddr -= base;
|
||||
elfout.phdr[0].p_paddr -= base;
|
||||
if (Elf32_Ehdr::ET_DYN==get_native16(&ehdri.e_type)) {
|
||||
unsigned const base= get_native32(&elfout.phdr[0].p_vaddr);
|
||||
set_native16(&elfout.ehdr.e_type, Elf32_Ehdr::ET_DYN);
|
||||
set_native16(&elfout.ehdr.e_phnum, 1);
|
||||
set_native32( &elfout.ehdr.e_entry,
|
||||
get_native32(&elfout.ehdr.e_entry) - base);
|
||||
set_native32(&elfout.phdr[0].p_vaddr, get_native32(&elfout.phdr[0].p_vaddr) - base);
|
||||
set_native32(&elfout.phdr[0].p_paddr, get_native32(&elfout.phdr[0].p_paddr) - base);
|
||||
// Strict SELinux (or PaX, grSecurity) disallows PF_W with PF_X
|
||||
//elfout.phdr[0].p_flags |= Elf32_Phdr::PF_W;
|
||||
}
|
||||
|
@ -1869,7 +1874,7 @@ unsigned
|
|||
PackLinuxElf32::elf_get_offset_from_address(unsigned const addr) const
|
||||
{
|
||||
Elf32_Phdr const *phdr = phdri;
|
||||
int j = ehdri.e_phnum;
|
||||
int j = get_native16(&ehdri.e_phnum);
|
||||
for (; --j>=0; ++phdr) if (PT_LOAD32 == get_native32(&phdr->p_type)) {
|
||||
unsigned const t = addr - get_native32(&phdr->p_vaddr);
|
||||
if (t < get_native32(&phdr->p_filesz)) {
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define NRV_LOADER_SIZE 8935
|
||||
#define NRV_LOADER_ADLER32 0x9306ce89
|
||||
#define NRV_LOADER_CRC32 0xbe44d912
|
||||
#define NRV_LOADER_ADLER32 0x466bce80
|
||||
#define NRV_LOADER_CRC32 0x957c8880
|
||||
|
||||
unsigned char nrv_loader[8935] = {
|
||||
30, 7,190, 73, 78, 80, 80,191, 79, 85, 84, 80, 87,131,205,255, /* 0x 0 */
|
||||
|
@ -85,11 +85,11 @@ unsigned char nrv_loader[8935] = {
|
|||
233, 0, 0, 0, 0,137,229,141,156, 36, 85, 80, 88, 97, 49,192, /* 0x 320 */
|
||||
80, 57,220,117,251, 70, 70, 83,104, 85, 80, 88, 98, 87,131,195, /* 0x 330 */
|
||||
4, 83,104, 85, 80, 88, 99, 86,131,195, 4, 83, 80,199, 3, 85, /* 0x 340 */
|
||||
80, 88,100,137,229,172,136,193, 36, 7,192,233, 3,187, 0,253, /* 0x 350 */
|
||||
255,255,211,227,141,156, 92,136,241,255,255,131,227,224,106, 0, /* 0x 360 */
|
||||
57,220,117,250, 83,131,195, 4,139, 85, 0,255, 50, 87, 83,131, /* 0x 370 */
|
||||
195, 4,139, 85, 0,136, 67, 2,172,136,193, 36, 15,136, 3,192, /* 0x 380 */
|
||||
233, 4,136, 75, 1, 74, 74, 82, 86, 83, 80, 85, 87, 86, 83,131, /* 0x 390 */
|
||||
80, 88,100,137,229,139, 85, 0,172, 74,136,193, 36, 7,192,233, /* 0x 350 */
|
||||
3,187, 0,253,255,255,211,227,141,156, 92,136,241,255,255,131, /* 0x 360 */
|
||||
227,224,106, 0, 57,220,117,250, 83,131,195, 4,139, 77, 0,255, /* 0x 370 */
|
||||
49, 87, 83,131,195, 4,136, 67, 2,172, 74,136,193, 36, 15,136, /* 0x 380 */
|
||||
3,192,233, 4,136, 75, 1, 82, 86, 83, 80, 85, 87, 86, 83,131, /* 0x 390 */
|
||||
236,124,139,148, 36,144, 0, 0, 0,199, 68, 36,116, 0, 0, 0, /* 0x 3a0 */
|
||||
0,198, 68, 36,115, 0,139,172, 36,156, 0, 0, 0,141, 66, 4, /* 0x 3b0 */
|
||||
137, 68, 36,120,184, 1, 0, 0, 0, 15,182, 74, 2,137,195,211, /* 0x 3c0 */
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define NRV_LOADER_SIZE 9096
|
||||
#define NRV_LOADER_ADLER32 0x9e84f495
|
||||
#define NRV_LOADER_CRC32 0x0b21fa57
|
||||
#define NRV_LOADER_ADLER32 0x4db1f48c
|
||||
#define NRV_LOADER_CRC32 0x103126a1
|
||||
|
||||
unsigned char nrv_loader[9096] = {
|
||||
191, 0, 0, 0, 0, 87,141,183, 69, 83, 73, 48,141,191, 69, 68, /* 0x 0 */
|
||||
|
@ -87,11 +87,11 @@ unsigned char nrv_loader[9096] = {
|
|||
199, 4,131,233, 4,119,241, 1,207,233, 0, 0, 0, 0,137,229, /* 0x 340 */
|
||||
141,156, 36, 85, 80, 88, 97, 49,192, 80, 57,220,117,251, 70, 70, /* 0x 350 */
|
||||
83,104, 85, 80, 88, 98, 87,131,195, 4, 83,104, 85, 80, 88, 99, /* 0x 360 */
|
||||
86,131,195, 4, 83, 80,199, 3, 85, 80, 88,100,137,229,172,136, /* 0x 370 */
|
||||
193, 36, 7,192,233, 3,187, 0,253,255,255,211,227,141,156, 92, /* 0x 380 */
|
||||
136,241,255,255,131,227,224,106, 0, 57,220,117,250, 83,131,195, /* 0x 390 */
|
||||
4,139, 85, 0,255, 50, 87, 83,131,195, 4,139, 85, 0,136, 67, /* 0x 3a0 */
|
||||
2,172,136,193, 36, 15,136, 3,192,233, 4,136, 75, 1, 74, 74, /* 0x 3b0 */
|
||||
86,131,195, 4, 83, 80,199, 3, 85, 80, 88,100,137,229,139, 85, /* 0x 370 */
|
||||
0,172, 74,136,193, 36, 7,192,233, 3,187, 0,253,255,255,211, /* 0x 380 */
|
||||
227,141,156, 92,136,241,255,255,131,227,224,106, 0, 57,220,117, /* 0x 390 */
|
||||
250, 83,131,195, 4,139, 77, 0,255, 49, 87, 83,131,195, 4,136, /* 0x 3a0 */
|
||||
67, 2,172, 74,136,193, 36, 15,136, 3,192,233, 4,136, 75, 1, /* 0x 3b0 */
|
||||
82, 86, 83, 80, 85, 87, 86, 83,131,236,124,139,148, 36,144, 0, /* 0x 3c0 */
|
||||
0, 0,199, 68, 36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139, /* 0x 3d0 */
|
||||
172, 36,156, 0, 0, 0,141, 66, 4,137, 68, 36,120,184, 1, 0, /* 0x 3e0 */
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define NRV_LOADER_SIZE 9184
|
||||
#define NRV_LOADER_ADLER32 0x14d4136a
|
||||
#define NRV_LOADER_CRC32 0x48f81dad
|
||||
#define NRV_LOADER_ADLER32 0xc12b1361
|
||||
#define NRV_LOADER_CRC32 0x3aa3ea60
|
||||
|
||||
unsigned char nrv_loader[9184] = {
|
||||
191, 97,108,105, 98,105, 87, 65, 84, 67, 79, 77, 6, 30, 7, 87, /* 0x 0 */
|
||||
|
@ -88,11 +88,11 @@ unsigned char nrv_loader[9184] = {
|
|||
1,207,233, 0, 0, 0, 0,137,229,141,156, 36, 85, 80, 88, 97, /* 0x 350 */
|
||||
49,192, 80, 57,220,117,251, 70, 70, 83,104, 85, 80, 88, 98, 87, /* 0x 360 */
|
||||
131,195, 4, 83,104, 85, 80, 88, 99, 86,131,195, 4, 83, 80,199, /* 0x 370 */
|
||||
3, 85, 80, 88,100,137,229,172,136,193, 36, 7,192,233, 3,187, /* 0x 380 */
|
||||
0,253,255,255,211,227,141,156, 92,136,241,255,255,131,227,224, /* 0x 390 */
|
||||
106, 0, 57,220,117,250, 83,131,195, 4,139, 85, 0,255, 50, 87, /* 0x 3a0 */
|
||||
83,131,195, 4,139, 85, 0,136, 67, 2,172,136,193, 36, 15,136, /* 0x 3b0 */
|
||||
3,192,233, 4,136, 75, 1, 74, 74, 82, 86, 83, 80, 85, 87, 86, /* 0x 3c0 */
|
||||
3, 85, 80, 88,100,137,229,139, 85, 0,172, 74,136,193, 36, 7, /* 0x 380 */
|
||||
192,233, 3,187, 0,253,255,255,211,227,141,156, 92,136,241,255, /* 0x 390 */
|
||||
255,131,227,224,106, 0, 57,220,117,250, 83,131,195, 4,139, 77, /* 0x 3a0 */
|
||||
0,255, 49, 87, 83,131,195, 4,136, 67, 2,172, 74,136,193, 36, /* 0x 3b0 */
|
||||
15,136, 3,192,233, 4,136, 75, 1, 82, 86, 83, 80, 85, 87, 86, /* 0x 3c0 */
|
||||
83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68, 36,116, 0, /* 0x 3d0 */
|
||||
0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0, 0, 0,141, /* 0x 3e0 */
|
||||
66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182, 74, 2,137, /* 0x 3f0 */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define LINUX_I386EXEC_LOADER_SIZE 10886
|
||||
#define LINUX_I386EXEC_LOADER_ADLER32 0x8e247f34
|
||||
#define LINUX_I386EXEC_LOADER_CRC32 0x935a7d80
|
||||
#define LINUX_I386EXEC_LOADER_ADLER32 0x03967f2b
|
||||
#define LINUX_I386EXEC_LOADER_CRC32 0xd22a2289
|
||||
|
||||
unsigned char linux_i386exec_loader[10886] = {
|
||||
232, 0, 0, 0, 0,184, 78, 77, 82, 85, 96,106, 63,139,116, 36, /* 0x 0 */
|
||||
|
@ -84,11 +84,11 @@ unsigned char linux_i386exec_loader[10886] = {
|
|||
4,131,233, 4,119,241, 1,207,233, 0, 0, 0, 0,137,229,141, /* 0x 310 */
|
||||
156, 36, 85, 80, 88, 97, 49,192, 80, 57,220,117,251, 70, 70, 83, /* 0x 320 */
|
||||
104, 85, 80, 88, 98, 87,131,195, 4, 83,104, 85, 80, 88, 99, 86, /* 0x 330 */
|
||||
131,195, 4, 83, 80,199, 3, 85, 80, 88,100,137,229,172,136,193, /* 0x 340 */
|
||||
36, 7,192,233, 3,187, 0,253,255,255,211,227,141,156, 92,136, /* 0x 350 */
|
||||
241,255,255,131,227,224,106, 0, 57,220,117,250, 83,131,195, 4, /* 0x 360 */
|
||||
139, 85, 52,255, 50, 87, 83,131,195, 4,139, 85, 44,136, 67, 2, /* 0x 370 */
|
||||
172,136,193, 36, 15,136, 3,192,233, 4,136, 75, 1, 74, 74, 82, /* 0x 380 */
|
||||
131,195, 4, 83, 80,199, 3, 85, 80, 88,100,137,229,139, 85, 44, /* 0x 340 */
|
||||
172, 74,136,193, 36, 7,192,233, 3,187, 0,253,255,255,211,227, /* 0x 350 */
|
||||
141,156, 92,136,241,255,255,131,227,224,106, 0, 57,220,117,250, /* 0x 360 */
|
||||
83,131,195, 4,139, 77, 52,255, 49, 87, 83,131,195, 4,136, 67, /* 0x 370 */
|
||||
2,172, 74,136,193, 36, 15,136, 3,192,233, 4,136, 75, 1, 82, /* 0x 380 */
|
||||
86, 83, 80, 85, 87, 86, 83,131,236,124,139,148, 36,144, 0, 0, /* 0x 390 */
|
||||
0,199, 68, 36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139,172, /* 0x 3a0 */
|
||||
36,156, 0, 0, 0,141, 66, 4,137, 68, 36,120,184, 1, 0, 0, /* 0x 3b0 */
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define LINUX_I386PTI_LOADER_SIZE 12149
|
||||
#define LINUX_I386PTI_LOADER_ADLER32 0x82de9366
|
||||
#define LINUX_I386PTI_LOADER_CRC32 0x714d9939
|
||||
#define LINUX_I386PTI_LOADER_ADLER32 0xcf4d935d
|
||||
#define LINUX_I386PTI_LOADER_CRC32 0xdb04e6dd
|
||||
|
||||
unsigned char linux_i386pti_loader[12149] = {
|
||||
232, 28, 0, 0, 0,131,248, 70,185,109, 27, 0, 0,116, 15,131, /* 0x 0 */
|
||||
|
@ -103,11 +103,11 @@ unsigned char linux_i386pti_loader[12149] = {
|
|||
243,164,235,236,137,229,141,156, 36, 85, 80, 88, 97, 49,192, 80, /* 0x 440 */
|
||||
57,220,117,251, 70, 70, 83,104, 85, 80, 88, 98, 87,131,195, 4, /* 0x 450 */
|
||||
83,104, 85, 80, 88, 99, 86,131,195, 4, 83, 80,199, 3, 85, 80, /* 0x 460 */
|
||||
88,100,137,229,172,136,193, 36, 7,192,233, 3,187, 0,253,255, /* 0x 470 */
|
||||
255,211,227,141,156, 92,136,241,255,255,131,227,224,106, 0, 57, /* 0x 480 */
|
||||
220,117,250, 83,131,195, 4,139, 85, 0,255, 50, 87, 83,131,195, /* 0x 490 */
|
||||
4,139, 85, 0,136, 67, 2,172,136,193, 36, 15,136, 3,192,233, /* 0x 4a0 */
|
||||
4,136, 75, 1, 74, 74, 82, 86, 83, 80, 85, 87, 86, 83,131,236, /* 0x 4b0 */
|
||||
88,100,137,229,139, 85, 0,172, 74,136,193, 36, 7,192,233, 3, /* 0x 470 */
|
||||
187, 0,253,255,255,211,227,141,156, 92,136,241,255,255,131,227, /* 0x 480 */
|
||||
224,106, 0, 57,220,117,250, 83,131,195, 4,139, 77, 0,255, 49, /* 0x 490 */
|
||||
87, 83,131,195, 4,136, 67, 2,172, 74,136,193, 36, 15,136, 3, /* 0x 4a0 */
|
||||
192,233, 4,136, 75, 1, 82, 86, 83, 80, 85, 87, 86, 83,131,236, /* 0x 4b0 */
|
||||
124,139,148, 36,144, 0, 0, 0,199, 68, 36,116, 0, 0, 0, 0, /* 0x 4c0 */
|
||||
198, 68, 36,115, 0,139,172, 36,156, 0, 0, 0,141, 66, 4,137, /* 0x 4d0 */
|
||||
68, 36,120,184, 1, 0, 0, 0, 15,182, 74, 2,137,195,211,227, /* 0x 4e0 */
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define LINUX_I386SH_LOADER_SIZE 10007
|
||||
#define LINUX_I386SH_LOADER_ADLER32 0xf6aeb98b
|
||||
#define LINUX_I386SH_LOADER_CRC32 0xda9a2548
|
||||
#define LINUX_I386SH_LOADER_ADLER32 0x8bbcb982
|
||||
#define LINUX_I386SH_LOADER_CRC32 0x45fbf30e
|
||||
|
||||
unsigned char linux_i386sh_loader[10007] = {
|
||||
232, 0, 0, 0, 0, 96,139,116, 36, 36,139,124, 36, 44,131,205, /* 0x 0 */
|
||||
|
@ -98,11 +98,11 @@ unsigned char linux_i386sh_loader[10007] = {
|
|||
235,240,243,164,235,236,137,229,141,156, 36, 85, 80, 88, 97, 49, /* 0x 3f0 */
|
||||
192, 80, 57,220,117,251, 70, 70, 83,104, 85, 80, 88, 98, 87,131, /* 0x 400 */
|
||||
195, 4, 83,104, 85, 80, 88, 99, 86,131,195, 4, 83, 80,199, 3, /* 0x 410 */
|
||||
85, 80, 88,100,137,229,172,136,193, 36, 7,192,233, 3,187, 0, /* 0x 420 */
|
||||
253,255,255,211,227,141,156, 92,136,241,255,255,131,227,224,106, /* 0x 430 */
|
||||
0, 57,220,117,250, 83,131,195, 4,139, 85, 0,255, 50, 87, 83, /* 0x 440 */
|
||||
131,195, 4,139, 85, 0,136, 67, 2,172,136,193, 36, 15,136, 3, /* 0x 450 */
|
||||
192,233, 4,136, 75, 1, 74, 74, 82, 86, 83, 80, 85, 87, 86, 83, /* 0x 460 */
|
||||
85, 80, 88,100,137,229,139, 85, 0,172, 74,136,193, 36, 7,192, /* 0x 420 */
|
||||
233, 3,187, 0,253,255,255,211,227,141,156, 92,136,241,255,255, /* 0x 430 */
|
||||
131,227,224,106, 0, 57,220,117,250, 83,131,195, 4,139, 77, 0, /* 0x 440 */
|
||||
255, 49, 87, 83,131,195, 4,136, 67, 2,172, 74,136,193, 36, 15, /* 0x 450 */
|
||||
136, 3,192,233, 4,136, 75, 1, 82, 86, 83, 80, 85, 87, 86, 83, /* 0x 460 */
|
||||
131,236,124,139,148, 36,144, 0, 0, 0,199, 68, 36,116, 0, 0, /* 0x 470 */
|
||||
0, 0,198, 68, 36,115, 0,139,172, 36,156, 0, 0, 0,141, 66, /* 0x 480 */
|
||||
4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182, 74, 2,137,195, /* 0x 490 */
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define NRV_LOADER_SIZE 9246
|
||||
#define NRV_LOADER_ADLER32 0x012118a8
|
||||
#define NRV_LOADER_CRC32 0x7e6ce735
|
||||
#define NRV_LOADER_ADLER32 0xa90a189f
|
||||
#define NRV_LOADER_CRC32 0xdf38c938
|
||||
|
||||
unsigned char nrv_loader[9246] = {
|
||||
90, 80, 87, 86, 80, 80,106, 63,104, 85, 76, 69, 78,232, 0, 0, /* 0x 0 */
|
||||
|
@ -84,11 +84,11 @@ unsigned char nrv_loader[9246] = {
|
|||
1,207,233, 0, 0, 0, 0,137,229,141,156, 36, 85, 80, 88, 97, /* 0x 310 */
|
||||
49,192, 80, 57,220,117,251, 70, 70, 83,104, 85, 80, 88, 98, 87, /* 0x 320 */
|
||||
131,195, 4, 83,104, 85, 80, 88, 99, 86,131,195, 4, 83, 80,199, /* 0x 330 */
|
||||
3, 85, 80, 88,100,137,229,172,136,193, 36, 7,192,233, 3,187, /* 0x 340 */
|
||||
0,253,255,255,211,227,141,156, 92,136,241,255,255,131,227,224, /* 0x 350 */
|
||||
106, 0, 57,220,117,250, 83,131,195, 4,139, 85, 0,255, 50, 87, /* 0x 360 */
|
||||
83,131,195, 4,139, 85, 0,136, 67, 2,172,136,193, 36, 15,136, /* 0x 370 */
|
||||
3,192,233, 4,136, 75, 1, 74, 74, 82, 86, 83, 80, 85, 87, 86, /* 0x 380 */
|
||||
3, 85, 80, 88,100,137,229,139, 85, 0,172, 74,136,193, 36, 7, /* 0x 340 */
|
||||
192,233, 3,187, 0,253,255,255,211,227,141,156, 92,136,241,255, /* 0x 350 */
|
||||
255,131,227,224,106, 0, 57,220,117,250, 83,131,195, 4,139, 77, /* 0x 360 */
|
||||
0,255, 49, 87, 83,131,195, 4,136, 67, 2,172, 74,136,193, 36, /* 0x 370 */
|
||||
15,136, 3,192,233, 4,136, 75, 1, 82, 86, 83, 80, 85, 87, 86, /* 0x 380 */
|
||||
83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68, 36,116, 0, /* 0x 390 */
|
||||
0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0, 0, 0,141, /* 0x 3a0 */
|
||||
66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182, 74, 2,137, /* 0x 3b0 */
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define NRV_LOADER_SIZE 9280
|
||||
#define NRV_LOADER_ADLER32 0xd68b1f14
|
||||
#define NRV_LOADER_CRC32 0xc012051d
|
||||
#define NRV_LOADER_ADLER32 0x7ffd1f0b
|
||||
#define NRV_LOADER_CRC32 0xc5d9f315
|
||||
|
||||
unsigned char nrv_loader[9280] = {
|
||||
140,200,131,192, 8,142,216,142,192,141,142, 83, 84, 65, 75,137, /* 0x 0 */
|
||||
|
@ -89,11 +89,11 @@ unsigned char nrv_loader[9280] = {
|
|||
0, 0, 0,137,229,141,156, 36, 85, 80, 88, 97, 49,192, 80, 57, /* 0x 360 */
|
||||
220,117,251, 70, 70, 83,104, 85, 80, 88, 98, 87,131,195, 4, 83, /* 0x 370 */
|
||||
104, 85, 80, 88, 99, 86,131,195, 4, 83, 80,199, 3, 85, 80, 88, /* 0x 380 */
|
||||
100,137,229,172,136,193, 36, 7,192,233, 3,187, 0,253,255,255, /* 0x 390 */
|
||||
211,227,141,156, 92,136,241,255,255,131,227,224,106, 0, 57,220, /* 0x 3a0 */
|
||||
117,250, 83,131,195, 4,139, 85, 0,255, 50, 87, 83,131,195, 4, /* 0x 3b0 */
|
||||
139, 85, 0,136, 67, 2,172,136,193, 36, 15,136, 3,192,233, 4, /* 0x 3c0 */
|
||||
136, 75, 1, 74, 74, 82, 86, 83, 80, 85, 87, 86, 83,131,236,124, /* 0x 3d0 */
|
||||
100,137,229,139, 85, 0,172, 74,136,193, 36, 7,192,233, 3,187, /* 0x 390 */
|
||||
0,253,255,255,211,227,141,156, 92,136,241,255,255,131,227,224, /* 0x 3a0 */
|
||||
106, 0, 57,220,117,250, 83,131,195, 4,139, 77, 0,255, 49, 87, /* 0x 3b0 */
|
||||
83,131,195, 4,136, 67, 2,172, 74,136,193, 36, 15,136, 3,192, /* 0x 3c0 */
|
||||
233, 4,136, 75, 1, 82, 86, 83, 80, 85, 87, 86, 83,131,236,124, /* 0x 3d0 */
|
||||
139,148, 36,144, 0, 0, 0,199, 68, 36,116, 0, 0, 0, 0,198, /* 0x 3e0 */
|
||||
68, 36,115, 0,139,172, 36,156, 0, 0, 0,141, 66, 4,137, 68, /* 0x 3f0 */
|
||||
36,120,184, 1, 0, 0, 0, 15,182, 74, 2,137,195,211,227,137, /* 0x 400 */
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define NRV_LOADER_SIZE 9972
|
||||
#define NRV_LOADER_ADLER32 0x5a3ee773
|
||||
#define NRV_LOADER_CRC32 0x081fc642
|
||||
#define NRV_LOADER_ADLER32 0xe98be76a
|
||||
#define NRV_LOADER_CRC32 0xd518d2aa
|
||||
|
||||
unsigned char nrv_loader[9972] = {
|
||||
128,124, 36, 8, 1, 15,133, 0, 0, 0, 0, 96,190, 69, 83, 73, /* 0x 0 */
|
||||
|
@ -86,11 +86,11 @@ unsigned char nrv_loader[9972] = {
|
|||
0,137,229,141,156, 36, 85, 80, 88, 97, 49,192, 80, 57,220,117, /* 0x 330 */
|
||||
251, 70, 70, 83,104, 85, 80, 88, 98, 87,131,195, 4, 83,104, 85, /* 0x 340 */
|
||||
80, 88, 99, 86,131,195, 4, 83, 80,199, 3, 85, 80, 88,100,137, /* 0x 350 */
|
||||
229,172,136,193, 36, 7,192,233, 3,187, 0,253,255,255,211,227, /* 0x 360 */
|
||||
141,156, 92,136,241,255,255,131,227,224,106, 0, 57,220,117,250, /* 0x 370 */
|
||||
83,131,195, 4,139, 85, 0,255, 50, 87, 83,131,195, 4,139, 85, /* 0x 380 */
|
||||
0,136, 67, 2,172,136,193, 36, 15,136, 3,192,233, 4,136, 75, /* 0x 390 */
|
||||
1, 74, 74, 82, 86, 83, 80, 85, 87, 86, 83,131,236,124,139,148, /* 0x 3a0 */
|
||||
229,139, 85, 0,172, 74,136,193, 36, 7,192,233, 3,187, 0,253, /* 0x 360 */
|
||||
255,255,211,227,141,156, 92,136,241,255,255,131,227,224,106, 0, /* 0x 370 */
|
||||
57,220,117,250, 83,131,195, 4,139, 77, 0,255, 49, 87, 83,131, /* 0x 380 */
|
||||
195, 4,136, 67, 2,172, 74,136,193, 36, 15,136, 3,192,233, 4, /* 0x 390 */
|
||||
136, 75, 1, 82, 86, 83, 80, 85, 87, 86, 83,131,236,124,139,148, /* 0x 3a0 */
|
||||
36,144, 0, 0, 0,199, 68, 36,116, 0, 0, 0, 0,198, 68, 36, /* 0x 3b0 */
|
||||
115, 0,139,172, 36,156, 0, 0, 0,141, 66, 4,137, 68, 36,120, /* 0x 3c0 */
|
||||
184, 1, 0, 0, 0, 15,182, 74, 2,137,195,211,227,137,217, 73, /* 0x 3d0 */
|
||||
|
|
|
@ -93,8 +93,10 @@ LZMA_LIT_SIZE equ 768
|
|||
%endif
|
||||
|
||||
mov ebp, esp ; save stack
|
||||
mov edx,[O_INS + ebp] ; inSize
|
||||
|
||||
lodsb ; first byte, replaces LzmaDecodeProperties()
|
||||
dec edx
|
||||
mov cl,al ; cl= ((lit_context_bits + lit_pos_bits)<<3) | pos_bits
|
||||
and al,7 ; al= pos_bits
|
||||
shr cl,3 ; cl= lit_context_bits + lit_pos_bits
|
||||
|
@ -111,23 +113,21 @@ LZMA_LIT_SIZE equ 768
|
|||
|
||||
push ebx ; &outSizeProcessed
|
||||
add ebx, 4
|
||||
mov edx,[O_OUTS + ebp] ; &outSize
|
||||
push dword [edx] ; outSize
|
||||
mov ecx,[O_OUTS + ebp] ; &outSize
|
||||
push dword [ecx] ; outSize
|
||||
push edi ; out
|
||||
push ebx ; &inSizeProcessed
|
||||
add ebx, 4
|
||||
mov edx,[O_INS + ebp] ; inSize
|
||||
|
||||
mov [2+ ebx],al ; store pos_bits
|
||||
lodsb ; second byte, replaces LzmaDecodeProperties()
|
||||
dec edx
|
||||
mov cl,al ; cl= (lit_pos_bits<<4) | lit_context_bits
|
||||
and al,0xf
|
||||
mov [ ebx],al ; store lit_context_bits
|
||||
shr cl,4
|
||||
mov [1+ ebx],cl ; store lit_pos_bits
|
||||
|
||||
dec edx ; 2 bytes replace LzmaDecodeProperties()
|
||||
dec edx
|
||||
push edx ; inSize -2
|
||||
push esi ; in
|
||||
push ebx ; &CLzmaDecoderState
|
||||
|
|
Loading…
Reference in New Issue
Block a user