source code

Started by
55 comments, last by sewar711 17 years ago
My question is What tools do I need to view source code of a game writen in C++ the exe file for the game is about 1.4 miga any nice person can help
Advertisement
Notepad? Actually any text editor would.

Or are you refering to the exe itself and not the source?
Hi.
If all you have is an executable, the best you can do is view the disassembly. You cannot transform an executable back into C++. Searching for a "disassembler" will yield some tools; one also comes with Visual Studio.

What exactly are you trying to do?
If you only have the .exe, there is no way to view the original C++ source. You can view the machine code with a hex editor (I use gvim), or you could search for a disassembler or decompiler.

A disassembler translates machine code into assembly, and a decompiler translates it into a higher level language (usually C). The code you get with these program will *not* look like the original code though. I have never used a decompiler, so I have no suggestions here.

But if you have the source code, then yeah Wordpad or Notepad will work just fine.
This reply is for all the nice people how answere my question
some of u asked what is it am trying to do.
well it is an idea but I don't know if it is possible without the source code of the game.
What it is I have this EXE file it is for a game. When you run the game and when you hit [ENTER] a dialog box pops up (in the middle of screen) to enter some chat. I would like to know where I can find this dialog box so I can edit its shape or it's location on the screen. I appreciate your respond. Note I used PE explorer but did not extarct dialog boxes only icon stupid and some scripts. I used Winspector and told me information about this dialog box.
such as it's class name, size, coordinates..etc.
It's possible, although it is very likely that it is going to be so difficult its not worth the trouble. You might be able to locate, if you spend a lot of time, the dialog's resource definition in memory someplace and edit it, but that won't actually "stick" unless the code doesn't ever modify the dialog, and you have to get sizes and offsets correct, and you have to be able to find the dialog in the first place (it may be totally generated on the fly, et cetera).

It's really not a viable operation.
If you want to do it with a quick hack, it's not too troublesome to order the window around with another program and some window messages. Use spy++ to figure out the class of the dialog box, then write a program that looks for that dialog box and tells it to set its location. It's an ugly hack, but it's 1000x easier than changing the exe.
This reply is for all the nice people how answere my question
Ok let us take it a step by step.
1- When I hit the enter key on the keyboard then the message box appears
who calls this message box ..is it windows or some dll file or the game it self
Modifying the exe is illegal as far as I know.
It is not modifying what we trying to do. It is tweaking of the game
I do not like the message box in the center of the screen. Why can it be on top or at the bottom of screen. The integrity of the exe will remain unchanged.
thankx for your input anyway .

This topic is closed to new replies.

Advertisement