Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 30th, 2006, 4:47 PM   #1
Cornelius
Newbie
 
Join Date: May 2006
Posts: 7
Rep Power: 0 Cornelius is on a distinguished road
Decompiling Exes

Is there any way I can decompile exes to give me its parts? I'd like to change the some values in the exe and I can do it with a hex editor but thats fairly limited. The exe is not encrypted, obviously.
Cornelius is offline   Reply With Quote
Old May 30th, 2006, 5:23 PM   #2
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 3 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
Did you Google it?
__________________
The world's first athletic computer geek!
The home of PrProgramsStudios
How not to post a question: <-- Please don't reply
Prm753 is offline   Reply With Quote
Old May 30th, 2006, 5:38 PM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You're going to have about as much luck as you will if you run your car through a wringer and expect the original blueprints to pop out.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 30th, 2006, 5:41 PM   #4
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,206
Rep Power: 5 grumpy is on a distinguished road
If you google for "decompiler" or "disassembler" you will find all sorts of entries.

Generally, decompilers will often be disassemblers: they allow you to get back to assembler code. The catch (apart from the fact you need to know the form of assembler emitted by the decompiler and have an assembler that will accept it) is that the output of the decompiler, like the format of executable files, is machine dependent and also very low level. Depending on the machine, the disassembly may not be complete.

I've heard some mention of programs that can decompile back to a higher level language (C, C++, etc) but nothing in common usage. As executable file formats (often) do not contain information such as variable names, type names, function names, etc (such info is often stripped by optimising compilers and linkers), the code that could be produced would be pretty basic (eg no higher level constructs, no use of the standard library) and arguably just as difficult to read as assembler code.

It would be easier all round to contact the author of the program and ask them to make the change. Even if they want to charge you a lot of money for the privilege.
grumpy is offline   Reply With Quote
Old May 30th, 2006, 6:34 PM   #5
-=PARADOX=-
Programmer
 
-=PARADOX=-'s Avatar
 
Join Date: Oct 2005
Location: Portugal
Posts: 53
Rep Power: 3 -=PARADOX=- is on a distinguished road
Quote:
Originally Posted by Cornelius
Is there any way I can decompile exes to give me its parts? I'd like to change the some values in the exe and I can do it with a hex editor but thats fairly limited. The exe is not encrypted, obviously.
If you want to disassemble to see the asm code of it, you can use w32dasm:
http://www.softpedia.com/get/Programming/Debuggers-Decompilers-Dissasemblers/WDASM.shtml

If you want to see and change the resourses of an executable you can use Resource Hacker:
http://www.angusj.com/resourcehacker/

Hope it's not for a bad thing!
-=PARADOX=- is offline   Reply With Quote
Old May 30th, 2006, 8:40 PM   #6
Cornelius
Newbie
 
Join Date: May 2006
Posts: 7
Rep Power: 0 Cornelius is on a distinguished road
I just want to change some of the values that are hardcoded. Most of the games files are in an archive, but some are in the exe. I've tried a disassembler before, but I couldn't understand the output very well. It was IDA pro. I'm making a mod for the game and want to improve it.
Cornelius is offline   Reply With Quote
Old May 30th, 2006, 8:55 PM   #7
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,206
Rep Power: 5 grumpy is on a distinguished road
Quote:
Originally Posted by Cornelius
I just want to change some of the values that are hardcoded. Most of the games files are in an archive, but some are in the exe. I've tried a disassembler before, but I couldn't understand the output very well. It was IDA pro.
That's the cost. If you want to disassemble a program, you need to be able to understand the output to make use of it.
Quote:
Originally Posted by Cornelius
I'm making a mod for the game and want to improve it.
In that case, contact the author and either suggest an improvement or ask for source code.

Unfortunately, I don't really believe you: the most common reason I've observed for people trying to tweak an executable is to get around something the author has put in deliberately (eg checks of registration codes to enable features).
grumpy is offline   Reply With Quote
Old May 30th, 2006, 10:33 PM   #8
Cornelius
Newbie
 
Join Date: May 2006
Posts: 7
Rep Power: 0 Cornelius is on a distinguished road
Unfortunately, the authors don't exist anymore - www.clevers.com is down. I want to be able to change the default damage a weapon has on someone, but it is just this one which is hardcoded, and change some other parameters. With a hex editor I could change the default port the game uses, I simply replaced 68 65 ea 00 00 with 68 67 ea 00 00.

Is it possible then to pay someone to do the work for me? Any suggestions?
Cornelius is offline   Reply With Quote
Old May 31st, 2006, 3:20 AM   #9
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Instead of changing the executable which may be checked to see if the executable is corrupt, you could also modify the values which gets sent to the network. So a packet sniffer with a filter, that would change certain values could help. I've read that somewhere. I don't know how or how it would work.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Jan 30th, 2007, 10:11 PM   #10
BinarySurfer
Programmer
 
BinarySurfer's Avatar
 
Join Date: Dec 2006
Posts: 50
Rep Power: 2 BinarySurfer is on a distinguished road
Although this has to do with Java, it's on the same train of thought. Can Java classes be decompiled to Java source files? I see decompilers (not that I will ever trust underhand programs) and wonder how a program's security can be maintained. As DaWei and grumpy said, the code will not be there in its entirety or "understandable" unless certain conditions are met. Is that the same for Java though? Private classes and methods are used to protect and hide code, but if it's reverse compiled, and it's done to a understandable/readable point, couldn't the security be traced and "gutted" or bypassed? If that's the case, how can security of a program be maintained?
BinarySurfer is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:50 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC