about summary refs log tree commit diff stats
path: root/miasm2/analysis/binary.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/analysis/binary.py')
-rw-r--r--miasm2/analysis/binary.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/miasm2/analysis/binary.py b/miasm2/analysis/binary.py
index 98dd7b6a..c71c5e9b 100644
--- a/miasm2/analysis/binary.py
+++ b/miasm2/analysis/binary.py
@@ -122,9 +122,8 @@ class Container(object):
 class ContainerPE(Container):
     "Container abstraction for PE"
 
-
     def parse(self, data, vm=None):
-        from miasm2.jitter.loader.pe import vm_load_pe, preload_pe
+        from miasm2.jitter.loader.pe import vm_load_pe, preload_pe, guess_arch
         from elfesteem import pe_init
 
         # Parse signature
@@ -145,6 +144,9 @@ class ContainerPE(Container):
                 self._executable.NTsig.signature_value != 0x4550:
             raise ContainerSignatureException()
 
+        # Guess the architecture
+        self._arch = guess_arch(self._executable)
+
         # Build the bin_stream instance and set the entry point
         try:
             self._bin_stream = bin_stream_pe(self._executable.virt)