@@ -36,14 +36,6 @@ def get_remote_func_addr(target, dll_name, func_name):
36
36
return mod .pe .exports [func_name ]
37
37
38
38
39
- def is_wow_64 (handle ):
40
- if not windows .winproxy .is_implemented (windows .winproxy .IsWow64Process ):
41
- return False
42
- Wow64Process = gdef .BOOL ()
43
- windows .winproxy .IsWow64Process (handle , Wow64Process )
44
- return bool (Wow64Process )
45
-
46
-
47
39
def create_file_from_handle (handle , mode = "r" ):
48
40
"""Return a Python :class:`file` around a ``Windows`` HANDLE"""
49
41
flags = os .O_BINARY if "b" in mode else os .O_TEXT
@@ -295,6 +287,16 @@ def datetime_from_systemtime(systime):
295
287
microsecond = systime .wMilliseconds * 1000 ,
296
288
)
297
289
290
+ IMAGE_FILE_MACHINE_TO_PROC_ARCH = {
291
+ gdef .IMAGE_FILE_MACHINE_I386 : gdef .PROCESSOR_ARCHITECTURE_INTEL ,
292
+ gdef .IMAGE_FILE_MACHINE_AMD64 : gdef .PROCESSOR_ARCHITECTURE_AMD64 ,
293
+ gdef .IMAGE_FILE_MACHINE_ARM64 : gdef .PROCESSOR_ARCHITECTURE_ARM64 ,
294
+ gdef :IMAGE_FILE_MACHINE_UNKNOWN : gdef .PROCESSOR_ARCHITECTURE_UNKNOWN
295
+ }
296
+
297
+ def image_file_machine_to_processor_architecture (image_file_machine ):
298
+ return IMAGE_FILE_MACHINE_TO_PROC_ARCH [image_file_machine ]
299
+
298
300
class FixedInteractiveConsole (code .InteractiveConsole ):
299
301
def raw_input (self , prompt = ">>>" ):
300
302
sys .stdout .write (prompt )
0 commit comments