PDA

View Full Version : Basics of compiling, decompiling, resource modification.


Dark_Omen
26th August 2002, 19:49
This is a very rough overview of how things should be done. In order to prevent further questions about how to do certain things above.

Here are some general rules:

- Read documentation, books, ebooks on the compiler you are using.

- Read on how programming works for the type of language that you chose.

It is mandatory that you read those above to prevent questions about how to compile programs and to ask repeatedly same questions over and over again. This I'm sure will save the mods from having to referring them to a discussion that has made ages ago.

Compiling:

As mentioned before in the pinned post of how to compile ogc hook, thanks to ]MpC[hebe. That is the basics of how to compile the files required. To compile using makefile you need to use nmake, which is usually bundled with every Microsoft Visual C++ regardless of the version. The tool has to be run in DOS mode or DOS emulation mode.


Decompiling:

Decompilinig things to make it readable is not easy, basically once you decompile a program, it turns into asm coding which is very complex to understand. There are programs however that will assist you in able to make most of the asm coding but it is recommended that you read books on how to understand the coding of asm.

Unpacking, packing, scrambling, patches and other misc utilities:

This is where some coders trys to make their program smaller or they don't want to have easily guessed ways to unpack the executable. As always, most programmers tend to protect their work by either packing it or scrambling it. There are 1000 different methods of how a programmer can come across doing so.

There are generic tools that will attempt to unpack/unscramble these sorts of data so that you get the pure 'uncompressed' asm code. Those however, does not necessarily come as in 'user friendly' form. They do serve great purposes for reverse engineering uses to the user needs. Do note however, there are legal battles about unpacking and unscrambling of data, so use it at your own needs.

Patches are simply like a script of what the program has to do, like a batch file but it is mainly focused on programs by ripping them apart and replace the code. This is done automatic but is not easy to code.

A good site that I would recommend is Programmers Tools:
http://linux20368.dn.net/protools/

For those who sees me posting misc codes on some files that I unpacked, the tools I got were from there.

Resource modifiers:

These are probably one of the 'fun' things you can do. They unpack the file and they sort it into category format, eg, where the picture goes, where the dialogue goes, etc. These can be modified at users ends, however not all programs can be modified and not all programs tend to function normally after modifying.

As a few people include wooolF[RM] said, there are resource hackers and resource finder.

BlaMonkey
26th August 2002, 22:54
you mean disassemble? decompiling is sth else. an assembler is an assembler and a compiler is a compiler. just to mention for the newbies... ;)

o({})o
26th August 2002, 23:10
yes, decompiling is more like you have a useable file such as .bas file, and you decompile it using a special program, however, in c++ since code is not stored the same way, one must dissassemble it to the native asm code that is the closest to machine language most people can read.

Dark_Omen
28th August 2002, 10:06
Compiling:

Further Explanations has been made by ]MpC[hebe about how to compile it with Microsoft Visual C++ 6.0. It would be very simple, so you can try and relate.

Basically, in order to compile it, if there is a file called dsp, open that and then you can compile it from there.

The URL for Resource Hacker is:
http://www.users.on.net/johnson/resourcehacker/

The URL for Resource Hunter is:
http://www.boilsoft.com

Dark_Omen
28th August 2002, 10:09
sorry, my bad on that info there, yes it is dissassemble. Likewize, asm is still very complex, though if the program is compile in vc++ you can read some of the base coding =) such as OpenRegA, CloseRegA.

BlaMonkey
28th August 2002, 16:47
that's just the calls of the imported modules what you can read or some strings =)

Dark_Omen
31st August 2002, 18:49
well you get my point, and yes that is a few basic strings, but hey its enough to give off some clues of what its going to do in some cases.

CHEETAH0E
13th September 2002, 00:33
yes, if you have access to send input and recieve input of a dll, such as double sided hooking of opengl32.dll, you can see exactly what it is doing, so much as to be able to write your own code to do it...

if ur good enough, u don't need examples, u could just code the stuff urself

Dark_Omen
14th January 2003, 11:14
Well, I wished that my coding would be not requiring to look at examples. But heh, look at the thread, its basics. So someone can explain a little bit more if they wish.

I'm not that good of a coder myself, And there is too much for me to learn to go in depth about how to get this and that working out of some languages.

Jessen
20th March 2003, 06:34
No no, I think its good that your looking out for the newer ones and heloing them understand well, coding. Its all part of their quest to "1337-ness". Which all coders strive for..

Shiva
1st April 2003, 08:23
And there are those who don't care about this "1337ness" and just want to learn the process for themselves... 1337 talk is just annoying.. It's script kiddies and black hats..