Browse code

Final UPX tweaks

git-svn: trunk@2973

aCaB authored on 2007/03/27 05:00:58
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Mar 26 20:08:06 CEST 2007 (acab)
2
+------------------------------------
3
+  * libclamav/upx.c: final tweaks
4
+
1 5
 Mon Mar 26 13:41:33 CEST 2007 (acab)
2 6
 ------------------------------------
3 7
   * libclamav/upx.c: craft some kind of header if everything else fails
... ...
@@ -34,12 +34,6 @@
34 34
 */
35 35
 
36 36
 /*
37
-  TODO:
38
-  - pass dll flag from pe.c ?
39
-  - grab statistical magic data from teh zoo
40
-*/
41
-
42
-/*
43 37
 ** This code unpacks a dumped UPX1 section to a file.
44 38
 ** It was written reversing the loader found on some Win32 UPX compressed trojans; while porting
45 39
 ** it to C i've kinda followed the asm flow so it will probably be a bit hard to read.
... ...
@@ -296,7 +290,7 @@ static int doubleebx(char *src, uint32_t *myebx, uint32_t *scur, uint32_t ssize)
296 296
 int upx_inflate2b(char *src, uint32_t ssize, char *dst, uint32_t *dsize, uint32_t upx0, uint32_t upx1, uint32_t ep)
297 297
 {
298 298
   int32_t backbytes, unp_offset = -1;
299
-  uint32_t backsize, myebx = 0, scur=0, dcur=0, i, magic[]={0x108,0x110,0};
299
+  uint32_t backsize, myebx = 0, scur=0, dcur=0, i, magic[]={0x108,0x110,0xd5,0};
300 300
   int oob;
301 301
   
302 302
   while (1) {