Closed stsp closed 1 year ago
https://github.com/dosemu2/dosemu2/files/12823084/CASINO.ZIP
Test-case.
Needs to introduce the r200fix
command to comcom32 by hooking
the RM exception 0.
The problem is that due to unknown packer, the direct patching is not possible. So we need a comcom32-based solution.
The problem is that due to unknown packer, the direct patching is not possible.
I'm casually following along here. I don't really know much about packers, so I'm presuming that the packer's decompression routine must expand the payload into memory somehow, then jump to it. At that point do we have enough information for say a new dosdebug feature to write a new uncompressed .exe to disk?
You need 2 passes, loading the program at different addresses. Then you compare these 2 dumps, find relocations and write them to an exe header. The challenge here is to find a proper entry point. Unpackers usually look for the long jumps, and use Nth long jump (with N=3) as an indication of an entry. That said, if you want to write the dosdebug-based unpacker - you are more than welcome. But its not an easy task.
r200fix
is now implemented.
You also need dosemu2 from git
as there were bugs with RM exceptions
handling. Good that we finally have
a test-case for that (probably the last
one) untested dpmi bit.
Discussed in https://github.com/dosemu2/comcom32/discussions/78