Browse code

New pointer handling rules.

Török Edvin authored on 2010/02/12 23:47:44
Showing 18 changed files
... ...
@@ -1747,9 +1747,9 @@ int cli_bytecode_runhook(cli_ctx *cctx, const struct cl_engine *engine, struct c
1747 1747
     return CL_CLEAN;
1748 1748
 }
1749 1749
 
1750
-int cli_bytecode_context_setpe(struct cli_bc_ctx *ctx, const struct cli_pe_hook_data *data)
1750
+int cli_bytecode_context_setpe(struct cli_bc_ctx *ctx, const struct cli_pe_hook_data *data, const struct cli_exe_section *sections)
1751 1751
 {
1752
-    ctx->hooks.exeinfo = &data->exe_info;
1752
+    ctx->sections = sections;
1753 1753
     ctx->hooks.pedata = data;
1754 1754
     return 0;
1755 1755
 }
... ...
@@ -75,6 +75,7 @@ struct cli_all_bc {
75 75
 };
76 76
 
77 77
 struct cli_pe_hook_data;
78
+struct cli_exe_section;
78 79
 struct cli_bc_ctx *cli_bytecode_context_alloc(void);
79 80
 /* FIXME: we can't include others.h because others.h includes us...*/
80 81
 void cli_bytecode_context_setctx(struct cli_bc_ctx *ctx, void *cctx);
... ...
@@ -82,7 +83,7 @@ int cli_bytecode_context_setfuncid(struct cli_bc_ctx *ctx, const struct cli_bc *
82 82
 int cli_bytecode_context_setparam_int(struct cli_bc_ctx *ctx, unsigned i, uint64_t c);
83 83
 int cli_bytecode_context_setparam_ptr(struct cli_bc_ctx *ctx, unsigned i, void *data, unsigned datalen);
84 84
 int cli_bytecode_context_setfile(struct cli_bc_ctx *ctx, fmap_t *map);
85
-int cli_bytecode_context_setpe(struct cli_bc_ctx *ctx, const struct cli_pe_hook_data *data);
85
+int cli_bytecode_context_setpe(struct cli_bc_ctx *ctx, const struct cli_pe_hook_data *data, const struct cli_exe_section *sections);
86 86
 int cli_bytecode_context_clear(struct cli_bc_ctx *ctx);
87 87
 /* returns file descriptor, sets tempfile. Caller takes ownership, and is
88 88
  * responsible for freeing/unlinking */
... ...
@@ -42,11 +42,6 @@
42 42
 #include "pe.h"
43 43
 #include "disasm.h"
44 44
 
45
-uint32_t cli_bcapi_test0(struct cli_bc_ctx *ctx, struct foo* s, uint32_t u)
46
-{
47
-    return (s && s->nxt == s && u == 0xdeadbeef) ? 0x12345678 : 0x55;
48
-}
49
-
50 45
 uint32_t cli_bcapi_test1(struct cli_bc_ctx *ctx, uint32_t a, uint32_t b)
51 46
 {
52 47
     return (a==0xf00dbeef && b==0xbeeff00d) ? 0x12345678 : 0x55;
... ...
@@ -273,7 +268,7 @@ uint32_t cli_bcapi_pe_rawaddr(struct cli_bc_ctx *ctx, uint32_t rva)
273 273
   uint32_t ret;
274 274
   int err = 0;
275 275
   const struct cli_pe_hook_data *pe = ctx->hooks.pedata;
276
-  ret = cli_rawaddr(rva, pe->exe_info.section, pe->exe_info.nsections, &err,
276
+  ret = cli_rawaddr(rva, ctx->sections, pe->nsections, &err,
277 277
 		    ctx->file_size, pe->hdr_size);
278 278
   if (err)
279 279
     return PE_INVALID_RVA;
... ...
@@ -355,3 +350,11 @@ uint8_t* cli_bcapi_malloc(struct cli_bc_ctx *ctx, uint32_t size)
355 355
 #endif
356 356
 }
357 357
 
358
+int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx, struct cli_exe_section* section, uint32_t num)
359
+{
360
+    if (num < ctx->hooks.pedata->nsections) {
361
+	memcpy(section, &ctx->sections[num], sizeof(*section));
362
+	return 0;
363
+    }
364
+    return -1;
365
+}
... ...
@@ -40,10 +40,6 @@
40 40
 struct DISASM_RESULT;
41 41
 #endif
42 42
 
43
-struct foo {
44
-    struct foo *nxt;
45
-};
46
-
47 43
 /** Bytecode trigger kind */
48 44
 enum BytecodeKind {
49 45
     /** generic bytecode, not tied a specific hook */
... ...
@@ -66,8 +62,6 @@ enum { PE_INVALID_RVA = 0xFFFFFFFF };
66 66
  *  access it.
67 67
  * */
68 68
 extern const uint32_t __clambc_match_counts[64];
69
-/** Executable info, if this is a PE hook */
70
-extern const struct cli_exe_info __clambc_exeinfo;
71 69
 /** PE data, if this is a PE hook */
72 70
 extern const struct cli_pe_hook_data __clambc_pedata;
73 71
 /** File size (max 4G) */
... ...
@@ -76,7 +70,6 @@ extern const uint32_t __clambc_filesize[1];
76 76
 /** Kind of the bytecode */
77 77
 const uint16_t __clambc_kind;
78 78
 
79
-uint32_t test0(struct foo*, uint32_t);
80 79
 uint32_t test1(uint32_t, uint32_t);
81 80
 
82 81
 /**
... ...
@@ -197,5 +190,7 @@ void* malloc(uint32_t size);
197 197
 
198 198
 uint32_t test2(uint32_t a);
199 199
 
200
+int32_t get_pe_section(struct cli_exe_section *section, uint32_t num);
201
+
200 202
 #endif
201 203
 #endif
... ...
@@ -33,7 +33,6 @@
33 33
 #include "bytecode_priv.h"
34 34
 #include <stdlib.h>
35 35
 
36
-uint32_t cli_bcapi_test0(struct cli_bc_ctx *ctx, struct foo*, uint32_t);
37 36
 uint32_t cli_bcapi_test1(struct cli_bc_ctx *ctx, uint32_t, uint32_t);
38 37
 int32_t cli_bcapi_read(struct cli_bc_ctx *ctx, uint8_t*, int32_t);
39 38
 int32_t cli_bcapi_write(struct cli_bc_ctx *ctx, uint8_t*, int32_t);
... ...
@@ -53,107 +52,90 @@ int32_t cli_bcapi_file_find(struct cli_bc_ctx *ctx, const uint8_t*, uint32_t);
53 53
 int32_t cli_bcapi_file_byteat(struct cli_bc_ctx *ctx, uint32_t);
54 54
 uint8_t* cli_bcapi_malloc(struct cli_bc_ctx *ctx, uint32_t);
55 55
 uint32_t cli_bcapi_test2(struct cli_bc_ctx *ctx, uint32_t);
56
+int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx, struct cli_exe_section*, uint32_t);
56 57
 
57 58
 const struct cli_apiglobal cli_globals[] = {
58 59
 /* Bytecode globals BEGIN */
59 60
 	{"__clambc_kind", GLOBAL_KIND, 16,
60 61
 	 ((char*)&((struct cli_bc_ctx*)0)->hooks.kind - (char*)NULL)},
61
-	{"__clambc_match_counts", GLOBAL_MATCH_COUNTS, 84,
62
+	{"__clambc_match_counts", GLOBAL_MATCH_COUNTS, 76,
62 63
 	 ((char*)&((struct cli_bc_ctx*)0)->hooks.match_counts - (char*)NULL)},
63
-	{"__clambc_filesize", GLOBAL_FILESIZE, 83,
64
+	{"__clambc_filesize", GLOBAL_FILESIZE, 75,
64 65
 	 ((char*)&((struct cli_bc_ctx*)0)->hooks.filesize - (char*)NULL)},
65
-	{"__clambc_exeinfo", GLOBAL_EXEINFO, 79,
66
-	 ((char*)&((struct cli_bc_ctx*)0)->hooks.exeinfo - (char*)NULL)},
67 66
 	{"__clambc_pedata", GLOBAL_PEDATA, 69,
68 67
 	 ((char*)&((struct cli_bc_ctx*)0)->hooks.pedata - (char*)NULL)}
69 68
 /* Bytecode globals END */
70 69
 };
71 70
 const unsigned cli_apicall_maxglobal = _LAST_GLOBAL-1;
72
-static uint16_t cli_tmp0[]={79, 77, 75, 72, 70, 32, 32, 32, 32, 8, 65};
71
+static uint16_t cli_tmp0[]={32, 32, 16, 74, 73, 72, 70, 32, 32, 32, 32};
73 72
 static uint16_t cli_tmp1[]={71};
74 73
 static uint16_t cli_tmp2[]={32, 32};
75
-static uint16_t cli_tmp3[]={73};
76
-static uint16_t cli_tmp4[]={16, 8, 8, 32, 32, 32, 32, 32, 64, 32, 32, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 16, 16, 64, 64, 64, 64, 32, 32, 74};
77
-static uint16_t cli_tmp5[]={71};
78
-static uint16_t cli_tmp6[]={76};
79
-static uint16_t cli_tmp7[]={16, 8, 8, 32, 32, 32, 32, 32, 32, 32, 32, 32, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 16, 16, 32, 32, 32, 32, 32, 32, 74};
80
-static uint16_t cli_tmp8[]={78};
81
-static uint16_t cli_tmp9[]={32, 16, 16, 32, 32, 32, 16, 16};
82
-static uint16_t cli_tmp10[]={81, 32, 32, 16, 80};
83
-static uint16_t cli_tmp11[]={8};
84
-static uint16_t cli_tmp12[]={82};
85
-static uint16_t cli_tmp13[]={32, 32, 32, 32, 32, 32, 32, 32, 32};
86
-static uint16_t cli_tmp14[]={32};
87
-static uint16_t cli_tmp15[]={32};
88
-static uint16_t cli_tmp16[]={32, 32};
89
-static uint16_t cli_tmp17[]={65, 32};
90
-static uint16_t cli_tmp18[]={32, 65, 32};
91
-static uint16_t cli_tmp19[]={32, 89, 32};
92
-static uint16_t cli_tmp20[]={90};
93
-static uint16_t cli_tmp21[]={16, 8, 8, 8, 92, 91};
94
-static uint16_t cli_tmp22[]={8};
95
-static uint16_t cli_tmp23[]={93};
96
-static uint16_t cli_tmp24[]={8};
97
-static uint16_t cli_tmp25[]={32, 32, 32};
98
-static uint16_t cli_tmp26[]={32, 96, 32};
99
-static uint16_t cli_tmp27[]={97};
100
-static uint16_t cli_tmp28[]={96};
74
+static uint16_t cli_tmp3[]={16, 8, 8, 32, 32, 32, 32, 32, 64, 32, 32, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 16, 16, 64, 64, 64, 64, 32, 32, 70};
75
+static uint16_t cli_tmp4[]={16, 8, 8, 32, 32, 32, 32, 32, 32, 32, 32, 32, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 16, 16, 32, 32, 32, 32, 32, 32, 70};
76
+static uint16_t cli_tmp5[]={32, 16, 16, 32, 32, 32, 16, 16};
77
+static uint16_t cli_tmp6[]={32};
78
+static uint16_t cli_tmp7[]={32};
79
+static uint16_t cli_tmp8[]={32, 78, 32};
80
+static uint16_t cli_tmp9[]={79};
81
+static uint16_t cli_tmp10[]={32, 32, 32, 32, 32, 32, 32, 32, 32};
82
+static uint16_t cli_tmp11[]={32, 32};
83
+static uint16_t cli_tmp12[]={65, 32};
84
+static uint16_t cli_tmp13[]={32, 65, 32};
85
+static uint16_t cli_tmp14[]={32, 84, 32};
86
+static uint16_t cli_tmp15[]={85};
87
+static uint16_t cli_tmp16[]={16, 8, 8, 8, 87, 86};
88
+static uint16_t cli_tmp17[]={8};
89
+static uint16_t cli_tmp18[]={88};
90
+static uint16_t cli_tmp19[]={8};
91
+static uint16_t cli_tmp20[]={32, 32, 32};
101 92
 
102 93
 const struct cli_bc_type cli_apicall_types[]={
103 94
 	{DStructType, cli_tmp0, 11, 0, 0},
104
-	{DPointerType, cli_tmp1, 1, 0, 0},
95
+	{DArrayType, cli_tmp1, 16, 0, 0},
105 96
 	{DStructType, cli_tmp2, 2, 0, 0},
106
-	{DPointerType, cli_tmp3, 1, 0, 0},
107
-	{DStructType, cli_tmp4, 30, 0, 0},
108
-	{DArrayType, cli_tmp5, 16, 0, 0},
109
-	{DPointerType, cli_tmp6, 1, 0, 0},
110
-	{DStructType, cli_tmp7, 31, 0, 0},
111
-	{DPointerType, cli_tmp8, 1, 0, 0},
112
-	{DStructType, cli_tmp9, 8, 0, 0},
113
-	{DStructType, cli_tmp10, 5, 0, 0},
114
-	{DPointerType, cli_tmp11, 1, 0, 0},
115
-	{DPointerType, cli_tmp12, 1, 0, 0},
116
-	{DStructType, cli_tmp13, 9, 0, 0},
117
-	{DArrayType, cli_tmp14, 1, 0, 0},
118
-	{DArrayType, cli_tmp15, 64, 0, 0},
119
-	{DFunctionType, cli_tmp16, 2, 0, 0},
120
-	{DFunctionType, cli_tmp17, 2, 0, 0},
121
-	{DFunctionType, cli_tmp18, 3, 0, 0},
122
-	{DFunctionType, cli_tmp19, 3, 0, 0},
123
-	{DPointerType, cli_tmp20, 1, 0, 0},
124
-	{DStructType, cli_tmp21, 6, 0, 0},
125
-	{DArrayType, cli_tmp22, 29, 0, 0},
126
-	{DArrayType, cli_tmp23, 3, 0, 0},
127
-	{DArrayType, cli_tmp24, 10, 0, 0},
128
-	{DFunctionType, cli_tmp25, 3, 0, 0},
129
-	{DFunctionType, cli_tmp26, 3, 0, 0},
130
-	{DPointerType, cli_tmp27, 1, 0, 0},
131
-	{DStructType, cli_tmp28, 1, 0, 0}
97
+	{DStructType, cli_tmp3, 30, 0, 0},
98
+	{DStructType, cli_tmp4, 31, 0, 0},
99
+	{DStructType, cli_tmp5, 8, 0, 0},
100
+	{DArrayType, cli_tmp6, 1, 0, 0},
101
+	{DArrayType, cli_tmp7, 64, 0, 0},
102
+	{DFunctionType, cli_tmp8, 3, 0, 0},
103
+	{DPointerType, cli_tmp9, 1, 0, 0},
104
+	{DStructType, cli_tmp10, 9, 0, 0},
105
+	{DFunctionType, cli_tmp11, 2, 0, 0},
106
+	{DFunctionType, cli_tmp12, 2, 0, 0},
107
+	{DFunctionType, cli_tmp13, 3, 0, 0},
108
+	{DFunctionType, cli_tmp14, 3, 0, 0},
109
+	{DPointerType, cli_tmp15, 1, 0, 0},
110
+	{DStructType, cli_tmp16, 6, 0, 0},
111
+	{DArrayType, cli_tmp17, 29, 0, 0},
112
+	{DArrayType, cli_tmp18, 3, 0, 0},
113
+	{DArrayType, cli_tmp19, 10, 0, 0},
114
+	{DFunctionType, cli_tmp20, 3, 0, 0}
132 115
 };
133 116
 
134 117
 const unsigned cli_apicall_maxtypes=sizeof(cli_apicall_types)/sizeof(cli_apicall_types[0]);
135 118
 const struct cli_apicall cli_apicalls[]={
136 119
 /* Bytecode APIcalls BEGIN */
137
-	{"test0", 26, 0, 1},
138
-	{"test1", 25, 0, 0},
139
-	{"read", 18, 1, 1},
140
-	{"write", 18, 2, 1},
141
-	{"seek", 25, 1, 0},
142
-	{"setvirusname", 18, 3, 1},
143
-	{"debug_print_str", 18, 4, 1},
144
-	{"debug_print_uint", 16, 0, 2},
145
-	{"disasm_x86", 19, 5, 1},
146
-	{"trace_directory", 18, 6, 1},
147
-	{"trace_scope", 18, 7, 1},
148
-	{"trace_source", 18, 8, 1},
149
-	{"trace_op", 18, 9, 1},
150
-	{"trace_value", 18, 10, 1},
151
-	{"trace_ptr", 18, 11, 1},
152
-	{"pe_rawaddr", 16, 1, 2},
153
-	{"file_find", 18, 12, 1},
154
-	{"file_byteat", 16, 2, 2},
155
-	{"malloc", 17, 0, 3},
156
-	{"test2", 16, 3, 2}
120
+	{"test1", 20, 0, 0},
121
+	{"read", 13, 0, 1},
122
+	{"write", 13, 1, 1},
123
+	{"seek", 20, 1, 0},
124
+	{"setvirusname", 13, 2, 1},
125
+	{"debug_print_str", 13, 3, 1},
126
+	{"debug_print_uint", 11, 0, 2},
127
+	{"disasm_x86", 14, 4, 1},
128
+	{"trace_directory", 13, 5, 1},
129
+	{"trace_scope", 13, 6, 1},
130
+	{"trace_source", 13, 7, 1},
131
+	{"trace_op", 13, 8, 1},
132
+	{"trace_value", 13, 9, 1},
133
+	{"trace_ptr", 13, 10, 1},
134
+	{"pe_rawaddr", 11, 1, 2},
135
+	{"file_find", 13, 11, 1},
136
+	{"file_byteat", 11, 2, 2},
137
+	{"malloc", 12, 0, 3},
138
+	{"test2", 11, 3, 2},
139
+	{"get_pe_section", 8, 12, 1}
157 140
 /* Bytecode APIcalls END */
158 141
 };
159 142
 const cli_apicall_int2 cli_apicalls0[] = {
... ...
@@ -161,7 +143,6 @@ const cli_apicall_int2 cli_apicalls0[] = {
161 161
 	(cli_apicall_int2)cli_bcapi_seek
162 162
 };
163 163
 const cli_apicall_pointer cli_apicalls1[] = {
164
-	(cli_apicall_pointer)cli_bcapi_test0,
165 164
 	(cli_apicall_pointer)cli_bcapi_read,
166 165
 	(cli_apicall_pointer)cli_bcapi_write,
167 166
 	(cli_apicall_pointer)cli_bcapi_setvirusname,
... ...
@@ -173,7 +154,8 @@ const cli_apicall_pointer cli_apicalls1[] = {
173 173
 	(cli_apicall_pointer)cli_bcapi_trace_op,
174 174
 	(cli_apicall_pointer)cli_bcapi_trace_value,
175 175
 	(cli_apicall_pointer)cli_bcapi_trace_ptr,
176
-	(cli_apicall_pointer)cli_bcapi_file_find
176
+	(cli_apicall_pointer)cli_bcapi_file_find,
177
+	(cli_apicall_pointer)cli_bcapi_get_pe_section
177 178
 };
178 179
 const cli_apicall_int1 cli_apicalls2[] = {
179 180
 	(cli_apicall_int1)cli_bcapi_debug_print_uint,
... ...
@@ -30,7 +30,6 @@
30 30
 #define BYTECODE_API_IMPL_H
31 31
 
32 32
 struct cli_bc_bctx;
33
-uint32_t cli_bcapi_test0(struct cli_bc_ctx *ctx, struct foo*, uint32_t);
34 33
 uint32_t cli_bcapi_test1(struct cli_bc_ctx *ctx, uint32_t, uint32_t);
35 34
 int32_t cli_bcapi_read(struct cli_bc_ctx *ctx, uint8_t*, int32_t);
36 35
 int32_t cli_bcapi_write(struct cli_bc_ctx *ctx, uint8_t*, int32_t);
... ...
@@ -50,5 +49,6 @@ int32_t cli_bcapi_file_find(struct cli_bc_ctx *ctx, const uint8_t*, uint32_t);
50 50
 int32_t cli_bcapi_file_byteat(struct cli_bc_ctx *ctx, uint32_t);
51 51
 uint8_t* cli_bcapi_malloc(struct cli_bc_ctx *ctx, uint32_t);
52 52
 uint32_t cli_bcapi_test2(struct cli_bc_ctx *ctx, uint32_t);
53
+int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx, struct cli_exe_section*, uint32_t);
53 54
 
54 55
 #endif
... ...
@@ -33,7 +33,6 @@ struct cli_bc_hooks {
33 33
 	 const uint16_t* kind;
34 34
 	 const uint32_t* match_counts;
35 35
 	 const uint32_t* filesize;
36
-	 const struct cli_exe_info* exeinfo;
37 36
 	 const struct cli_pe_hook_data* pedata;
38 37
 };
39 38
 #endif
... ...
@@ -130,6 +130,7 @@ struct cli_bc_ctx {
130 130
     fmap_t *fmap;
131 131
     const char *virname;
132 132
     struct cli_bc_hooks hooks;
133
+    const struct cli_exe_section *sections;
133 134
     int outfd;
134 135
     char *tempfile;
135 136
     void *ctx;
... ...
@@ -453,23 +453,20 @@ private:
453 453
     Constant *buildConstant(const Type *Ty, uint64_t *components, unsigned &c)
454 454
     {
455 455
         if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
456
-          Value *idxs[2] = {
457
-	      ConstantInt::get(Type::getInt32Ty(Context), 0),
458
-	      ConstantInt::get(Type::getInt32Ty(Context), components[c++])
456
+
457
+          Value *idxs[1] = {
458
+	      ConstantInt::get(Type::getInt64Ty(Context), components[c++])
459 459
 	  };
460 460
 	  unsigned idx = components[c++];
461 461
 	  if (!idx)
462 462
 	      return ConstantPointerNull::get(PTy);
463 463
 	  assert(idx < globals.size());
464 464
 	  GlobalVariable *GV = cast<GlobalVariable>(globals[idx]);
465
-	  const Type *GTy = GetElementPtrInst::getIndexedType(GV->getType(), idxs, 2);
466
-	  if (!GTy) {
467
-	      errs() << "Type mismatch for GEP: " << *PTy->getElementType() <<
468
-		  "; base is " << *GV << "\n";
469
-	      llvm_report_error("(libclamav) Type mismatch converting constant");
470
-	  }
465
+	  const Type *IP8Ty = PointerType::getUnqual(Type::getInt8Ty(Ty->getContext()));
466
+	  Constant *C = ConstantExpr::getPointerCast(GV, IP8Ty);
467
+	  //TODO: check constant bounds here
471 468
 	  return ConstantExpr::getPointerCast(
472
-	      ConstantExpr::getInBoundsGetElementPtr(GV, idxs, 2),
469
+	      ConstantExpr::getInBoundsGetElementPtr(C, idxs, 1),
473 470
 	      PTy);
474 471
         }
475 472
 	if (isa<IntegerType>(Ty)) {
... ...
@@ -520,7 +517,9 @@ public:
520 520
 		<< " expected type: " << *ETy;
521 521
 	    if (Ty)
522 522
 		errs() << " actual type: " << *Ty;
523
-	    errs() << " base: " << *Base << " indices: ";
523
+	    errs() << " base: " << *Base << ";";
524
+	    Base->getType()->dump();
525
+	    errs() << "\n indices: ";
524 526
 	    for (InputIterator I=Start; I != End; I++) {
525 527
 		errs() << **I << ", ";
526 528
 	    }
... ...
@@ -649,6 +648,7 @@ public:
649 649
 	    Functions[j]->setCallingConv(CallingConv::Fast);
650 650
 	}
651 651
 	const Type *I32Ty = Type::getInt32Ty(Context);
652
+	const Type *I64Ty = Type::getInt64Ty(Context);
652 653
 	for (unsigned j=0;j<bc->num_func;j++) {
653 654
 	    PrettyStackTraceString CrashInfo("Generate LLVM IR");
654 655
 	    const struct cli_bc_func *func = &bc->funcs[j];
... ...
@@ -696,18 +696,21 @@ public:
696 696
 		    Ty = PointerType::getUnqual(PointerType::getUnqual(Ty));
697 697
 		    Value *Cast = Builder.CreateBitCast(GEP, Ty);
698 698
 		    Value *SpecialGV = Builder.CreateLoad(Cast);
699
+		    const Type *IP8Ty = Type::getInt8Ty(Context);
700
+		    IP8Ty = PointerType::getUnqual(IP8Ty);
701
+		    SpecialGV = Builder.CreateBitCast(SpecialGV, IP8Ty);
699 702
 		    SpecialGV->setName("g"+Twine(g-_FIRST_GLOBAL)+"_");
700 703
 		    Value *C[] = {
701
-			ConstantInt::get(Type::getInt32Ty(Context), 0),
702 704
 			ConstantInt::get(Type::getInt32Ty(Context), bc->globals[i][0])
703 705
 		    };
704
-		    globals[i] = createGEP(SpecialGV, 0, C, C+2);
706
+		    globals[i] = createGEP(SpecialGV, 0, C, C+1);
705 707
 		    if (!globals[i]) {
706 708
 			errs() << i << ":" << g << ":" << bc->globals[i][0] <<"\n";
707 709
 			Ty->dump();
708 710
 			llvm_report_error("(libclamav) unable to create fake global");
709 711
 		    }
710
-		    else if(GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(globals[i])) {
712
+		    globals[i] = Builder.CreateBitCast(globals[i], Ty);
713
+		    if(GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(globals[i])) {
711 714
 			GI->setIsInBounds(true);
712 715
 			GI->setName("geped"+Twine(i)+"_");
713 716
 		    }
... ...
@@ -948,7 +951,8 @@ public:
948 948
 			{
949 949
 			    const Type *SrcTy = mapType(inst->u.three[0]);
950 950
 			    Value *V = convertOperand(func, SrcTy, inst->u.three[1]);
951
-			    Value *Op = convertOperand(func, I32Ty, inst->u.three[2]);
951
+			    Value *Op = convertOperand(func, I64Ty, inst->u.three[2]);
952
+			    Op = Builder.CreateTrunc(Op, I32Ty);
952 953
 			    if (!createGEP(inst->dest, V, &Op, &Op+1))
953 954
 				return false;
954 955
 			    break;
... ...
@@ -959,7 +963,8 @@ public:
959 959
 			    Ops[0] = ConstantInt::get(Type::getInt32Ty(Context), 0);
960 960
 			    const Type *SrcTy = mapType(inst->u.three[0]);
961 961
 			    Value *V = convertOperand(func, SrcTy, inst->u.three[1]);
962
-			    Ops[1] = convertOperand(func, I32Ty, inst->u.three[2]);
962
+			    Ops[1] = convertOperand(func, I64Ty, inst->u.three[2]);
963
+			    Ops[1] = Builder.CreateTrunc(Ops[1], I32Ty);
963 964
 			    if (!createGEP(inst->dest, V, Ops, Ops+2))
964 965
 				return false;
965 966
 			    break;
... ...
@@ -970,8 +975,11 @@ public:
970 970
 			    assert(inst->u.ops.numOps > 2);
971 971
 			    const Type *SrcTy = mapType(inst->u.ops.ops[0]);
972 972
 			    Value *V = convertOperand(func, SrcTy, inst->u.ops.ops[1]);
973
-			    for (unsigned a=2;a<inst->u.ops.numOps;a++)
974
-				Idxs.push_back(convertOperand(func, I32Ty, inst->u.ops.ops[a]));
973
+			    for (unsigned a=2;a<inst->u.ops.numOps;a++) {
974
+				Value *Op = convertOperand(func, I64Ty, inst->u.ops.ops[a]);
975
+				Op = Builder.CreateTrunc(Op, I32Ty);
976
+				Idxs.push_back(Op);
977
+			    }
975 978
 			    if (!createGEP(inst->dest, V, Idxs.begin(), Idxs.end()))
976 979
 				return false;
977 980
 			    break;
... ...
@@ -31,7 +31,7 @@ struct bytecode_metadata {
31 31
     unsigned targetExclude;
32 32
 };
33 33
 
34
-#define BC_FUNC_LEVEL 5
34
+#define BC_FUNC_LEVEL 6
35 35
 #define BC_HEADER "ClamBC"
36 36
 
37 37
 enum bc_opcode {
... ...
@@ -121,7 +121,6 @@ enum bc_global {
121 121
   GLOBAL_MATCH_COUNTS = 0x8000,
122 122
   GLOBAL_KIND,
123 123
   GLOBAL_VIRUSNAMES,
124
-  GLOBAL_EXEINFO,
125 124
   GLOBAL_PEDATA,
126 125
   GLOBAL_FILESIZE,
127 126
   _LAST_GLOBAL
... ...
@@ -2236,19 +2236,18 @@ int cli_scanpe(cli_ctx *ctx, icon_groupset *iconset)
2236 2236
 	cli_errmsg("cli_scanpe: can't allocate memory for bc_ctx\n");
2237 2237
 	return CL_EMEM;
2238 2238
     }
2239
-    pedata.exe_info.section = exe_sections;
2240
-    pedata.exe_info.nsections = nsections;
2241
-    pedata.exe_info.ep = ep;
2242
-    pedata.exe_info.offset = 0;
2243
-    pedata.file_hdr = &file_hdr;
2244
-    pedata.opt32 = &pe_opt.opt32;
2245
-    pedata.opt64 = &pe_opt.opt64;
2246
-    pedata.dirs = dirs;
2239
+    pedata.nsections = nsections;
2240
+    pedata.ep = ep;
2241
+    pedata.offset = 0;
2242
+    memcpy(&pedata.file_hdr, &file_hdr, sizeof(file_hdr));
2243
+    memcpy(&pedata.opt32, &pe_opt.opt32, sizeof(pe_opt.opt32));
2244
+    memcpy(&pedata.opt64, &pe_opt.opt64, sizeof(pe_opt.opt64));
2245
+    memcpy(&pedata.dirs, dirs, sizeof(pedata.dirs));
2247 2246
     pedata.e_lfanew = e_lfanew;
2248 2247
     pedata.overlays = overlays;
2249 2248
     pedata.overlays_sz = fsize - overlays;
2250 2249
     pedata.hdr_size = hdr_size;
2251
-    cli_bytecode_context_setpe(bc_ctx, &pedata);
2250
+    cli_bytecode_context_setpe(bc_ctx, &pedata, exe_sections);
2252 2251
     cli_bytecode_context_setctx(bc_ctx, ctx);
2253 2252
     ret = cli_bytecode_runhook(ctx, ctx->engine, bc_ctx, BC_PE_UNPACKER, map, ctx->virname);
2254 2253
     switch (ret) {
... ...
@@ -137,18 +137,17 @@ struct pe_image_section_hdr {
137 137
 
138 138
 /** Data for the bytecode PE hook */
139 139
 struct cli_pe_hook_data {
140
-    struct cli_exe_info exe_info;
141
-    struct pe_image_file_hdr *file_hdr;
142
-    struct pe_image_optional_hdr32 *opt32;
143
-    struct pe_image_optional_hdr64 *opt64;
144
-    struct pe_image_data_dir *dirs;
145
-    uint32_t e_lfanew;/**< address of new exe header */
146
-    uint32_t overlays;/**< number of overlays */
147
-    int32_t overlays_sz;/**< size of overlays */
148
-    uint32_t hdr_size;/**< internally needed by rawaddr */
149
-    /* FIXME: these should not be necessary (they are for now) */
150
-    uint8_t dummyn;
151
-    uint8_t *dummy EBOUNDS(dummyn);
140
+  uint32_t offset;
141
+  uint32_t ep;
142
+  uint16_t nsections;
143
+  struct pe_image_file_hdr file_hdr;
144
+  struct pe_image_optional_hdr32 opt32;
145
+  struct pe_image_optional_hdr64 opt64;
146
+  struct pe_image_data_dir dirs[16];
147
+  uint32_t e_lfanew;/**< address of new exe header */
148
+  uint32_t overlays;/**< number of overlays */
149
+  int32_t overlays_sz;/**< size of overlays */
150
+  uint32_t hdr_size;/**< internally needed by rawaddr */
152 151
 };
153 152
 
154 153
 int cli_scanpe(cli_ctx *ctx, icon_groupset *set);
... ...
@@ -1,10 +1,10 @@
1
-ClamBCae`|``````|`agafp`clamcoincidencejb:82
1
+ClamBCafh`lifegkd|afefdfggifnf```````|bgacflfafmfbfcfmb`cnb`cacmbicmbgfafeficfcgcecff``agafp`clamcoincidencejb:82
2 2
 
3 3
 Tedaaa`aacb`bb`bb`b
4
-Eabaaabbfd|afdgefcgdgac``
4
+Eaaaaaabfd|afdgefcgdgac``
5 5
 G`aa`@`
6 6
 A`b`bLacb`b`aa`b`b`Fadaa
7
-Bb`b`abbabHonnkm``odHm``oonnkdaaaaeab`b`Hhgfedcbadb`baboaaaDm``odDmjnmdTcab`babE
7
+Bb`b`abbaaHonnkm``odHm``oonnkdaaaaeab`b`Hhgfedcbadb`baboaaaDm``odDmjnmdTcab`babE
8 8
 Aab`bLabah`aa`b`b`Facaa
9 9
 Baaaaeaah`Bgaab`baboaaaDm``odDmjnmdTcab`babE
10 10
 Aab`bLabb`a`aa`b`b`Facaa
... ...
@@ -17,3 +17,8 @@ Abb`bLacah`b`a`aa`aa`b`b`Fafac
17 17
 Baaabeaah`BhbaTaaabaaab
18 18
 Baaaceab`aaaDdcbabb`badoaacDm``odDmjnmdTcab`bad
19 19
 BTcab`bDmjnmdE
20
+Sifnfdg`befnfdgbgig`gofifnfdghbibSkgSbgefdgegbgnf`bdgefcgdgachb`chgff`c`cdfbfefeffflb`b`chgbfefefffff`c`cdfib`bmcmc`b`chgacbcccdcecfcgchc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkc
21
+mgSifnfdg`bffofofachbegifnfdghcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSifnfdg`bffofofbchbegifnfdgacfcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkc
22
+mgSifnfdg`bffofofcchbegifnfdgccbcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchcccic`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSifnfdg`bffofofdchbegifnfdgfcdcoedg`bafib
23
+kgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchcccicdc`cecacfcbcgccc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSifnfdg`bffofofechbegifnfdghcoedg`baflb`begifnfdgacfcoedg`bbfib
24
+kgSbgefdgegbgnf`bhbaf`bmcmc`b`chgbchc`bfbfb`bbf`bmcmc`b`chgacbcccdcib`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSS
20 25
\ No newline at end of file
... ...
@@ -1,14 +1,11 @@
1
-ClamBCae`|``````|`amafp`clamcoincidencejb:92
1
+ClamBCafh`lifegkd|afefdfggifnf```````|bgacflfafmfbfcfmb`cnb`cacmbicmbgfafeficfcgcecff``ahafp`clamcoincidencejb:66
2 2
 
3
-Tedcaabfdebedebfdaaa`aabbadb`baabb`bb`baacb`bbfdb`baacb`bb`bb`b
4
-Ebdaadbcabid|agmfaflflfofcf``bdabjd|afdgefcgdgbc``aabkd|afdgefcgdg`c``abbld|afdgefcgdgac``
3
+Tedaaa`aabb`bb`baacb`bb`bb`b
4
+Ebcaabbcabfd|afdgefcgdgbc``aabgd|afdgefcgdgac``
5 5
 G`aa`@`
6
-A`b`bLalbedabgd```b`b`aa`b`b`aa`b`b`aa`bad`aa`b`b`Fbaaaf
7
-Bbgdaadbbfd`@d``fb`aab`bacabbabHonnkm``odHm``oonnkdaaadeab`bacHhgfedcbadTaaadaaae
8
-Bb`baeabbaa`Honnkmjnmdaaafeab`baeHhgfedcbadTaaafabae
9
-Bb`bagababdaDm``odaaaheab`bagDo``mdTaaahacae
10
-BbadaiababcaAadaaajeabadai@`Taaajaead
11
-Bb`bakabbaaai@dTcab`bDm``od
6
+A`b`bLaeb`b`aa`b`b`aa`b`b`Fahac
7
+Bb`b`abbaaHonnkm``odHm``oonnkdaaaaeab`b`HhgfedcbadTaaaaaaab
8
+Bb`babababcaDm``odaaaceab`babDo``mdb`badoaacDm``odDmjnmdTcab`bad
12 9
 BTcab`bDmjnmdE
13 10
 Aab`bLabah`aa`b`b`Facaa
14 11
 Baaaaeaah`Bgaab`baboaaaDm``odDmjnmdTcab`babE
... ...
@@ -22,3 +19,9 @@ Abb`bLacah`b`a`aa`aa`b`b`Fafac
22 22
 Baaabeaah`BhbaTaaabaaab
23 23
 Baaaceab`aaaDdcbabb`badoaacDm``odDmjnmdTcab`bad
24 24
 BTcab`bDmjnmdE
25
+Sifnfdg`befnfdgbgig`gofifnfdghbibSkgScfhfafbg`bjbhgkcSifff`bhbdgefcgdgachb`chgff`c`cdfbfefeffflb`b`chgbfefefffff`c`cdfib`babmc`b`chgacbcccdcecfcgchcibSbgefdgegbgnf`b`chgdfefafdfkc
26
+ifff`bhbdgefcgdgbchb`chgff`c`cdfib`babmc`b`chgdf`c`cffibSbgefdgegbgnf`b`chgdfefafdfkcShg`bmc`bmfaflflfofcfhbacibkcSifff`bhbabhgibSbgefdgegbgnf`b`chgdfefafdfkcSbgefdgegbgnf`b`chgff`c`cdfkc
27
+mgSifnfdg`bffofofachbegifnfdghcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSifnfdg`bffofofbchbegifnfdgacfcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkc
28
+mgSifnfdg`bffofofcchbegifnfdgccbcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchcccic`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSifnfdg`bffofofdchbegifnfdgfcdcoedg`bafib
29
+kgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchcccicdc`cecacfcbcgccc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSifnfdg`bffofofechbegifnfdghcoedg`baflb`begifnfdgacfcoedg`bbfib
30
+kgSbgefdgegbgnf`bhbaf`bmcmc`b`chgbchc`bfbfb`bbf`bmcmc`b`chgacbcccdcib`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSS
25 31
\ No newline at end of file
... ...
@@ -1,4 +1,4 @@
1
-ClamBCae`|``````|`afbbep`clamcoincidencejb:418
1
+ClamBCaeh`babgfkd|afefdfggifnf```````|bgacflfafmfbfcfmb`cnb`cacmbfcmbgfacccfffc`ccfcc``afbbep`clamcoincidencejb:418
2 2
 
3 3
 Tedaaa`
4 4
 E``
... ...
@@ -1,4 +1,4 @@
1
-ClamBCae`|``````|`afabp`clamcoincidencejb:23
1
+ClamBCafh`lifegkd|afefdfggifnf```````|bgacflfafmfbfcfmb`cnb`cacmbicmbgfafeficfcgcecff``afabp`clamcoincidencejb:23
2 2
 
3 3
 Tedaaa`
4 4
 E``
... ...
@@ -7,3 +7,4 @@ A`b`bLaab`b`Fabaa
7 7
 Bb`b``baab@dTcab`b`E
8 8
 Aab`bLaab`b`b`b`Fabaa
9 9
 Bb`baae`Aad`Tcab`baaE
10
+Sifnfdg`bdfiffg`chbifnfdg`bhgibSkgSbgefdgegbgnf`bacobhgkcSmgSifnfdg`befnfdgbgig`gofifnfdghbfgofifdfibSkgSbgefdgegbgnf`bdfiffg`chb`cibkcSmgSS
10 11
\ No newline at end of file
... ...
@@ -1,11 +1,23 @@
1
-ClamBCae`|``````|`bjaabp`clamcoincidencejb:318
2
-Trojan.Foo.{A,B};Target:1;(((0|1|2)=42,2)|(3=10));EP+0:aabb;ffff;aaccee;f00d;dead
3
-Tedebieebheebgeebfeebeeebdeebbeebaeebadebcdaaa`aacb`bbadb`bdb`db`bcajbadbcebadbcebadbcebadbcebadbcecaab`bdagahdaeahdajahdabbaddabahdakah
4
-Eafaaafb`e|amcgefdgfgifbgegcgnfafmfef``
5
-Gd```hbha`@`bieBdeBbgBofBjfBafBnfBnbBfdBofBof@`bheBad@`bheBbd@`bge@Ab@Ac`b`aAa`bfeBedB`eBkbB`cBjcBafBafBbfBbf@`beeBffBffBffBff@`beeBffB`cB`cBdf@`bdeBafBafBcfBcfBefBef@`beeBdfBefBafBdf@`bbe@Af@@AgAa@AhAc@AiAb@AjAd`bad@Ab`bad@Ac`bad@Af`bad@Ag`bad@Ah`bad@Ai`bad@Aj`bcdAdD```h`bcdAcD```h`bcdAbD```h`bcdAaD```h`bcd@D```h`
1
+ClamBCafh`lifegkd|afefdfggifnf```c``a```|bgacflfafmfbfcfmb`cnb`cacmbicmbgfafeficfcgcecff``bhaabp`clamcoincidencejb:313
2
+Test.{A,B};Target:1;(((0|1|2)=42,2)|(3=10));EP+0:aabb;ffff;aaccee;f00d;dead
3
+Tedebgeebfeebeeebdeebceebbeeb`eebadebcdaaa`aacb`bbadb`bcajahbaeahbaeahbaeahbaeahbaecaab`bdb`db`bdagahdajahdabbaddabahdaeah
4
+Eaeaaaebod|amcgefdgfgifbgegcgnfafmfef``
5
+Gd```hbka`@`bgeBdeBefBcgBdg@`bfeBad@`bfeBbd@`bee@Ab@Ac`b`aAa`bdeBedB`eBkbB`cBjcBafBafBbfBbf@`bgeBffBffBffBff@`bgeBffB`cB`cBdf@`bceBafBafBcfBcfBefBef@`bgeBdfBefBafBdf@`b`aC``a`b`e@@@Aa@Ac@Ab@Ad`bad@Ab`bad@Ab`bad@Ac`bad@Ac`bad@Af`bad@Ag`bad@Ah`bad@Ai`bad@Aj`bcdB`aD```h`bcdAlD```h`bcdAhD```h`bcdAdD```h`bcd@D```h`
6 6
 A`b`bLaeb`b`aa`aa`bad`b`b`Fahac
7
-Bb`b`gbBca`aaaagab`b`AadTaaaaaaab
8
-Baaabeab`b`AbdbadacoaabAl`Am`b`badabbafac@dTcab`b@d
7
+Bb`b`gbBfa`aaaagab`b`AadTaaaaaaab
8
+Baaabeab`b`AbdbadacoaabAn`B`a`b`badabbaeac@dTcab`b@d
9 9
 BTcab`b@dE
10 10
 A`aaLbcab`b`b`b`b`b`b`b`b`b`aa`aa`aa`aa`b`b`b`b`b`b`b`b`b`b`aa`aa`b`b`aa`aa`Fbdaaa
11
-Bb`b`gbBga`b`baagbBfa`b`babgbBea`b`baca`aa`b`bada`acabaaaeeab`badBjbdaaaffab`bab@daaagfab`baa@daaahfab`b`@db`bai`aafb`baj`aagb`bak`aahb`bala`ajakb`bama`alaiaaaneab`bamAbdaaaok`anaeb`bb`agbBda`aabaaeab`bb`aAjdaabbal`aobaaTcaaabbaE
11
+Bb`b`gbBja`b`baagbBia`b`babgbBha`b`baca`aa`b`bada`acabaaaeeab`badBjbdaaaffab`bab@daaagfab`baa@daaahfab`b`@db`bai`aafb`baj`aagb`bak`aahb`bala`ajakb`bama`alaiaaaneab`bamAbdaaaok`anaeb`bb`agbBga`aabaaeab`bb`aAjdaabbal`aobaaTcaaabbaE
12
+Sobjb`bieofeg`bafbgef`bofnflfig`baflflfofggefdf`bdgof`bcgefdg`bdghfefcgef`bfgifbgegcgnfafmfefcg`bafcg`bffofegnfdf`bjbobSfeidbeeecendadmdedoe`ebeedfdidhehbbbdeefcgdgbbib
13
+feidbeeecendadmdedcehbbbadbblb`bbbbdbbibSdeadbegdeddehbacibSceidgdndaddeeebeedceoeddedcdldoebdedgdidndSddedcdldadbeedoeceidgdndaddeeebeedhbmfafgfifcfibSddedcdldadbeedoeceidgdndaddeeebeedhbjgefbgofib
14
+ddedcdldadbeedoeceidgdndaddeeebeedhbcfhfefcfkfibSddedcdldadbeedoeceidgdndaddeeebeedhbffiffgefdgofdgefnfibSddedcdldadbeedoeceidgdndaddeeebeedhbcfhfefcfkfbcibSceidgdndaddeeebeedceoeddedcdldoeednddd
15
+ceidgdndaddeeebeedceoeddedfdoebdedgdidndSddedfdidndedoeceidgdndaddeeebeedhbmfafgfifcflb`bbbed`ekb`cjcafafbfbfbbibSddedfdidndedoeceidgdndaddeeebeedhbjgefbgoflb`bbbffffffffbbib
16
+ddedfdidndedoeceidgdndaddeeebeedhbffiffgefdgofdgefnflb`bbbafafcfcfefefbbibSddedfdidndedoeceidgdndaddeeebeedhbcfhfefcfkflb`bbbff`c`cdfbbibSddedfdidndedoeceidgdndaddeeebeedhbcfhfefcfkfbclb`bbbdfefafdfbbib
17
+ceidgdndaddeeebeedceoeedndddSbfofoflf`blfofgfifcfaflfoedgbgifgfgfefbghbfgofifdfibSkgSegnfcgifgfnfefdf`bcgegmfoemfafdgcfhfefcg`bmc`bcfofegnfdgoemfafdgcfhfhbceifgfnfafdgegbgefcgnbmfafgfifcfibkb
18
+cfofegnfdgoemfafdgcfhfhbceifgfnfafdgegbgefcgnbjgefbgofib`bkb`bcfofegnfdgoemfafdgcfhfhbceifgfnfafdgegbgefcgnbffiffgefdgofdgefnfibkcSegnfcgifgfnfefdf`begnfifagegefoemfafdgcfhfefcg`bmc`bmfafdgcfhfefcghbceifgfnfafdgegbgefcgnbmfafgfifcfibkb
19
+mfafdgcfhfefcghbceifgfnfafdgegbgefcgnbjgefbgofibkb`bmfafdgcfhfefcghbceifgfnfafdgegbgefcgnbffiffgefdgofdgefnfibkcSifff`bhbcgegmfoemfafdgcfhfefcg`bmcmc`bdcbc`bfbfb`begnfifagegefoemfafdgcfhfefcg`bmcmc`bbcib`bkg
20
+obob`bdehfef`bafbfoffgef`bcc`bcgifgfnfafdgegbgefcg`bhfaffgef`bmfafdgcfhfefdf`baf`bdgofdgaflf`bofff`bdcbc`bdgifmfefcglb`bafnfdf`bafdg`blfefafcgdgSobob`bbc`bofff`bdghfefmf`bhfaffgef`bmfafdgcfhfefdf
21
+bgefdgegbgnf`bdgbgegefkcSmgSobob`bidff`bdghfef`bcfhfefcfkf`bcgifgfnfafdgegbgef`bmfafdgcfhfefcg`bac`c`bdgifmfefcg`bggef`bcgdgiflflf`bhfaffgef`baf`bmfafdgcfhfSifff`bhbcfofegnfdgoemfafdgcfhfhbceifgfnfafdgegbgefcgnbcfhfefcfkfib`bmcmc`bac`cib
22
+bgefdgegbgnf`bdgbgegefkcSobob`bndof`bmfafdgcfhfSbgefdgegbgnf`bffaflfcgefkcSmgSifnfdg`befnfdgbgig`gofifnfdghbfgofifdfibSkgSegnfcgifgfnfefdf`bcfofegnfdg`bmc`bcfofegnfdgoemfafdgcfhfhbceifgfnfafdgegbgefcgnbcfhfefcfkfbcibkc
23
+ifff`bhbcfofegnfdg`bncmc`bbcibSffofegnfdffeifbgegcghbcfofegnfdg`bmcmc`bbc`boc`bbbadbb`bjc`bbbbdbbibkcSbgefdgegbgnf`b`ckcSmgSS
12 24
\ No newline at end of file
... ...
@@ -1,7 +1,8 @@
1
-ClamBCae`|``````|`afaap`clamcoincidencejb:20
1
+ClamBCafh`lifegkd|afefdfggifnf```````|bgacflfafmfbfcfmb`cnb`cacmbicmbgfafeficfcgcecff``afaap`clamcoincidencejb:20
2 2
 
3 3
 Tedaaa`
4 4
 E``
5 5
 G`aa`@`
6 6
 A`b`bL`Faaaa
7 7
 BTcab`bHm``odcbadE
8
+Sifnfdg`befnfdgbgig`gofifnfdghbfgofifdfibSkgSbgefdgegbgnf`b`chgacbcccdcff`c`cdfkcSmgSS
8 9
\ No newline at end of file