-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: unpacking script for LzExe 0.91
* New unpacking script for LzExe 0.91 (addresses part of #1287) * New `reko.dasm` OllyScript command. * Change CMakeLists.txt to use correct version number.
- Loading branch information
Showing
15 changed files
with
921 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ | |
*/ | ||
#endregion | ||
|
||
using Reko.Core; | ||
using Reko.Core.Services; | ||
using Reko.Gui; | ||
using Reko.Gui.Services; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
; Reko OllyDbg script for unpacking files packed with LzExe 0.91 | ||
|
||
var selector | ||
|
||
; Run until the retf that calls the unpacker and step into the retf | ||
bp cs:002A | ||
run | ||
sti | ||
|
||
; msg $"At {cs}:{ip}" | ||
|
||
;; Now inside the unpacker code. Execute the unpacking and intercept | ||
;; the relocations. | ||
|
||
; Break at the instruction after a relocation is done. | ||
bp cs:0122 | ||
|
||
; Break at the point where the CS:IP have been stored at address | ||
; [CS:BX] | ||
bp cs:0155 | ||
|
||
relocation_loop: | ||
run | ||
|
||
cmp ip,0155 | ||
je relocation_done | ||
|
||
; Read the relocation | ||
mov selector,[es:di],2 | ||
; msg $"Relocation at {es}:{di} = {selector}" | ||
reko.addseg es:di,selector | ||
jmp relocation_loop | ||
|
||
relocation_done: | ||
; Single step into the original code. | ||
sti | ||
msg $"Entry point at {cs}:{ip}" | ||
dpe "dontcare",cs:ip | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.