Skip to content

Commit

Permalink
Merge pull request #152 from DownWithUp/patch-1
Browse files Browse the repository at this point in the history
Fix CreateFile emulation
  • Loading branch information
drewvis authored Jun 9, 2021
2 parents 07041ed + 0798547 commit 0256140
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions speakeasy/winenv/api/usermode/kernel32.py
Original file line number Diff line number Diff line change
Expand Up @@ -3286,6 +3286,8 @@ def CreateFile(self, emu, argv, ctx={}):
if ad:
argv[1] = ' | '.join(ad)

disp_bytes = disp.to_bytes(8, 'little')
disp = int(int.from_bytes(disp_bytes[0:4], 'little'))
cd = windefs.get_create_disposition(disp)
if cd:
argv[4] = cd
Expand Down

0 comments on commit 0256140

Please sign in to comment.