summaryrefslogtreecommitdiff
path: root/drivers/pe_bliss/pe_rebuilder.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pe_bliss/pe_rebuilder.h')
-rw-r--r--drivers/pe_bliss/pe_rebuilder.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/pe_bliss/pe_rebuilder.h b/drivers/pe_bliss/pe_rebuilder.h
new file mode 100644
index 0000000000..1cd10299d1
--- /dev/null
+++ b/drivers/pe_bliss/pe_rebuilder.h
@@ -0,0 +1,19 @@
+#pragma once
+#include <ostream>
+#include <fstream>
+
+namespace pe_bliss
+{
+class pe_base;
+//Rebuilds PE image, writes resulting image to ostream "out". If strip_dos_header == true, DOS header will be stripped a little
+//If change_size_of_headers == true, SizeOfHeaders will be recalculated automatically
+//If save_bound_import == true, existing bound import directory will be saved correctly (because some compilers and bind.exe put it to PE headers)
+void rebuild_pe(pe_base& pe, std::ostream& out, bool strip_dos_header = false, bool change_size_of_headers = true, bool save_bound_import = true);
+
+//Rebuild PE image and write it to "out" file
+//If strip_dos_header is true, DOS headers partially will be used for PE headers
+//If change_size_of_headers == true, SizeOfHeaders will be recalculated automatically
+//If save_bound_import == true, existing bound import directory will be saved correctly (because some compilers and bind.exe put it to PE headers)
+void rebuild_pe(pe_base& pe, const char* out, bool strip_dos_header = false, bool change_size_of_headers = true, bool save_bound_import = true);
+
+}