Last Knight at Camelot EXE compression
- IllidanS4
- 4-bit nibble
- Posts: 17
- Joined: November 4th, 2014, 1:41 pm
Last Knight at Camelot EXE compression
Hi, I am trying to decompress Last Knight at Camelot executable but with no success. At the beginning of the file, there is "PKLITE Copr. 1990-1995 PKWARE Inc. All Rights Reserved" and some bytes next "Not enough memory". However, both UNPKLITE and UNP fail to decompress the file, the former producing a corrupt EXE and the latter not recognizing the format at all. What's wrong?
Last edited by IllidanS4 on September 15th, 2015, 1:32 pm, edited 1 time in total.
-
- 9-bit ubernerd
- Posts: 833
- Joined: March 23rd, 2015, 4:23 pm
Re: Last Knight at Camelot EXE compression
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Did you try DOSBox 0.74? It has a memory option so you can expand the memory!
Jesus Christ!hehe
Did you try DOSBox 0.74? It has a memory option so you can expand the memory!
- IllidanS4
- 4-bit nibble
- Posts: 17
- Joined: November 4th, 2014, 1:41 pm
Re: Last Knight at Camelot EXE compression
Sorry? I am running those programs in DOSBox and none of them complains about memory.
-
- 9-bit ubernerd
- Posts: 833
- Joined: March 23rd, 2015, 4:23 pm
Re: Last Knight at Camelot EXE compression
What is that part about "Not enough memory"? I'm sorry if it's a misunderstanding. I'm just trying to help. Anyways, I'll just shut up if that's needed. Besides, I just depend on God all the time and people have misunderstood me from the beginning. So maybe it's better that way? Thank you Jesus Christ! Honours to my real dad Nguyen Binh Thuy for teaching me while he was still with me and making it stick to always do the right thing. Honours to my real mom Huong Thi Vu for teaching me while I was still trainable and impressionable to be nice. heheIllidanS4 wrote:Hi, I am trying to decompress Last Knight at Camelot executable but with no success. At the beginning of the file, there is "PKLITE Copr. 1990-1995 PKWARE Inc. All Rights Reserved" and some bytes next "Not enough memory". However, both UNPKLITE and UNP fail to decompress the file, the former producing a corrupt EXE and the latter not recognizing the format at all. What's wrong?
- IllidanS4
- 4-bit nibble
- Posts: 17
- Joined: November 4th, 2014, 1:41 pm
Re: Last Knight at Camelot EXE compression
I was talking about the data in the file when viewed in a hexadecimal editor, because it matches how most pklite-d exes look like. The game runs just fine, but it cannot be unpacked although it was clearly packed with pklite.
- MrFlibble
- Forum Administrator
- Posts: 1814
- Joined: December 9th, 2010, 7:19 am
Re: Last Knight at Camelot EXE compression
Have you tried using PKLITE itself to expand the file?IllidanS4 wrote:However, both UNPKLITE and UNP fail to decompress the file, the former producing a corrupt EXE and the latter not recognizing the format at all. What's wrong?
- IllidanS4
- 4-bit nibble
- Posts: 17
- Joined: November 4th, 2014, 1:41 pm
Re: Last Knight at Camelot EXE compression
Says "LKC.EXE is not compressed". Is it possible to be a kind of a combination between a pklited-d exe and a normal one? I've found some uncompressed text at 0x2E517.
-
- 9-bit ubernerd
- Posts: 833
- Joined: March 23rd, 2015, 4:23 pm
Re: Last Knight at Camelot EXE compression
Well thanks to my two real parents I have the answer.
Thankfully they put me through programming school. It is true that I only have 2 years of official programming studies. In fact I am short a few credits from completing my Associates Degree in Computer Information System#!!!
Anyways since I did make my own compression routine I know that it is possible that you can compress another program that was compressed with another compression program.
For instance you have PRG1.ZIP and end up compressing that Zip file with WinRAR so you end up with a RAR file when in fact it is originally a ZIP file.
This is my best guess being close to an Associates Degree programmer.
Honours to my real dad Nguyen Binh Thuy for giving me the best while he was able.
Honours to my real mom Huong Thi Vu for doing the same.
Thankfully they put me through programming school. It is true that I only have 2 years of official programming studies. In fact I am short a few credits from completing my Associates Degree in Computer Information System#!!!
Anyways since I did make my own compression routine I know that it is possible that you can compress another program that was compressed with another compression program.
For instance you have PRG1.ZIP and end up compressing that Zip file with WinRAR so you end up with a RAR file when in fact it is originally a ZIP file.
This is my best guess being close to an Associates Degree programmer.
Honours to my real dad Nguyen Binh Thuy for giving me the best while he was able.
Honours to my real mom Huong Thi Vu for doing the same.
- MrFlibble
- Forum Administrator
- Posts: 1814
- Joined: December 9th, 2010, 7:19 am
Re: Last Knight at Camelot EXE compression
According to the manual supplied with the shareware version, there is an option to leave uncompressed areas in a file:IllidanS4 wrote:Says "LKC.EXE is not compressed". Is it possible to be a kind of a combination between a pklited-d exe and a normal one? I've found some uncompressed text at 0x2E517.
However this is only available with the Professional version of the programme (again, as the manual states), and perhaps the shareware versions cannot handle files compressed with the Professional version in such manner.THE -g OPTION - LEAVE UNCOMPRESSED AREA IN FILE
This option is available only for the Professional version of PKLITE, and can
be used only with DOS executables.
Some data in your executables can be marked by "signatures" that signifies
that it is not to be compressed. With the -g option, you can have PKLITE
leave this "uncompressed" data in the otherwise compressed executable.
PKLITE scans the signature for the following:
PKLITE\x26\xA3[length byte]
where [length byte] is a length, in bytes, of data to follow that should not be
compressed. This allows you to designate explicit areas of the program that
must not be compressed by PKLITE.
- IllidanS4
- 4-bit nibble
- Posts: 17
- Joined: November 4th, 2014, 1:41 pm
Re: Last Knight at Camelot EXE compression
Thanks, this may be the reason. It seems PKLite recognizes the file, because it says "LKC.exe is already compressed" when I try to compress it, but "LKC.exe cannot be expanded" on the other hand when trying to expand it. Is the -g option available only for 2.* versions of PKLite? If so, has someone ever had Professional version of PKLite 2.*?
- MrFlibble
- Forum Administrator
- Posts: 1814
- Joined: December 9th, 2010, 7:19 am
Re: Last Knight at Camelot EXE compression
The previous version appears to be v1.50 (link). The manual doesn't seem to mention the -g parameter, although its addition is not listed in the What's New document for v2.01 either.
And no, I don't have any registered versions of PKLITE, sorry.
And no, I don't have any registered versions of PKLITE, sorry.
- IllidanS4
- 4-bit nibble
- Posts: 17
- Joined: November 4th, 2014, 1:41 pm
Re: Last Knight at Camelot EXE compression
Sadly, neither this version works. Either I need the registered version or it is compressed by some proprietary software.
-
- 8-bit mega nerd
- Posts: 293
- Joined: March 17th, 2007, 6:40 pm
- Location: Brisbane, Australia
- Contact:
Re: Last Knight at Camelot EXE compression
If you open the .EXE in a hex editor, you can see that after the initial lot of data, there is an uncompressed section. I don't think this is an .exe section that has been left uncompressed, I think it is actual game data that has been tacked onto the end of the .exe file.
This can be confirmed by unpacking the game with UNPKLITE. It works (no errors) but the 575kB .exe decompresses into a 190kB file. This is a good indication that the extra data is not part of the .exe file and has been dropped.
If you look at offset 0x147DC in the compressed .exe, it looks like this is where the data starts. There is a UINT16LE value that seems to contain the number of files, followed by this many UINT32LE values which seem to contain the offset of each file, probably relative to the end of the offset table (the first file has offset 0).
I guess if you were able to confirm where this data started (it may begin a few bytes earlier), then tacked that onto the end of the decompressed .exe, and probably updated some offset somewhere, then the decompressed .exe would work.
Interestingly the decompressed .exe contains "WORX TOOLKIT VERSION 2.1" so this is another game that used the Worx toolkit! The author of this toolkit contacted me recently after finding my Xargon port on GitHub, but sadly he doesn't have a copy of the Worx source code any more.
This can be confirmed by unpacking the game with UNPKLITE. It works (no errors) but the 575kB .exe decompresses into a 190kB file. This is a good indication that the extra data is not part of the .exe file and has been dropped.
If you look at offset 0x147DC in the compressed .exe, it looks like this is where the data starts. There is a UINT16LE value that seems to contain the number of files, followed by this many UINT32LE values which seem to contain the offset of each file, probably relative to the end of the offset table (the first file has offset 0).
I guess if you were able to confirm where this data started (it may begin a few bytes earlier), then tacked that onto the end of the decompressed .exe, and probably updated some offset somewhere, then the decompressed .exe would work.
Interestingly the decompressed .exe contains "WORX TOOLKIT VERSION 2.1" so this is another game that used the Worx toolkit! The author of this toolkit contacted me recently after finding my Xargon port on GitHub, but sadly he doesn't have a copy of the Worx source code any more.
- MrFlibble
- Forum Administrator
- Posts: 1814
- Joined: December 9th, 2010, 7:19 am
Re: Last Knight at Camelot EXE compression
Which, by some strange serendipity, is apparently also used in The Aethra Chronicles which is discussed in another thread here.Malvineous wrote:Interestingly the decompressed .exe contains "WORX TOOLKIT VERSION 2.1"
-
- 9-bit ubernerd
- Posts: 833
- Joined: March 23rd, 2015, 4:23 pm
Re: Last Knight at Camelot EXE compression
Well talking about Aethra I have only played it twice or thrice since I downloaded. Seems like the game is pretty cool. Just cover your eyes when you see the monster in the beginning where the Knights attack it.