...
|
...
|
@@ -223,6 +223,7 @@ int yc_decrypt(cli_ctx *ctx, char *fbuf, unsigned int filesize, struct cli_exe_s
|
223
|
223
|
struct pe_image_file_hdr *pe = (struct pe_image_file_hdr*) (fbuf + peoffset);
|
224
|
224
|
char *sname = (char *)pe + EC16(pe->SizeOfOptionalHeader) + 0x18;
|
225
|
225
|
uint32_t max_emu;
|
|
226
|
+ unsigned int ofilesize = filesize;
|
226
|
227
|
/*
|
227
|
228
|
|
228
|
229
|
First layer (decryptor of the section decryptor) in last section
|
...
|
...
|
@@ -274,7 +275,7 @@ int yc_decrypt(cli_ctx *ctx, char *fbuf, unsigned int filesize, struct cli_exe_s
|
274
|
274
|
cli_dbgmsg("yC: bad emulation length limit %u\n", max_emu);
|
275
|
275
|
return 1;
|
276
|
276
|
}
|
277
|
|
- switch (yc_poly_emulator(ctx, fbuf, filesize, fbuf + ycsect + (offset == -0x18 ? 0x3ea : 0x457),
|
|
277
|
+ switch (yc_poly_emulator(ctx, fbuf, ofilesize, fbuf + ycsect + (offset == -0x18 ? 0x3ea : 0x457),
|
278
|
278
|
fbuf + sections[i].raw,
|
279
|
279
|
sections[i].ursz,
|
280
|
280
|
max_emu)) {
|