building source code

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
newbie8787
Posts: 105
Joined: Thu Jan 10, 2008 6:26 pm

building source code

Post by newbie8787 »

is there any way to build the source code directly from an exe game file designed in irrlicht??

sorry if this question does not pertain to irrlicht , but i have nowhere else to ask right now :?
Frosty Topaz
Posts: 107
Joined: Sat Nov 04, 2006 9:42 pm

Post by Frosty Topaz »

You mean decompile it? Why yes there is. But it's long, involved, quite difficult, and usually not worth the effort.
Frosty Topaz
=========
It isn't easy being ice-encrusted aluminum silicate fluoride hydroxide...
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

[From personal but limited experience]

I couldn't find a decompiler that produces anything even remotely usable for an exe compiled from C++ source. Even compiled->decompiled C will at best only give you the basic and anonymised structure of the program, requiring a lot of work to understand it and turn it into something usable again, and that's if the decompiler's brains don't explode in the attempt.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Why do you want to decompile a program..? Sounds like you want to steal someone else's work.. If it's from the forum then you could ask for the source if it's not already available and they may well give you it.
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Tsk tsk, let's not jump to conclusions. It's equally likely that Mr *87 is concerned about protecting his own valuable intellectual property from 1337 h4xx0rz.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Frosty Topaz
Posts: 107
Joined: Sat Nov 04, 2006 9:42 pm

Post by Frosty Topaz »

The simplest answer is yes you can decompile a program but if it was written in C++ what you will get is the compiler generated assembly which basically no one in the world has any chance of understanding.

There may be a tool/method to get something resembling the original code back, but even then I doubt it would be very usable. It would most likely have very messed up variable/function names, no comments, no formatting. It would be like looking at a tangled ball of yarn and trying to follow a strand the whole way through.
Frosty Topaz
=========
It isn't easy being ice-encrusted aluminum silicate fluoride hydroxide...
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Frosty Topaz wrote:There may be a tool/method to get something resembling the original code back
There are many - IDAPro, WinDASM32, Rec, Boomerang - but at best what they give you is a mess-o-code that's systematically named (e.g _function0001(_a) calls _function0314(_a, _aa, _d)) and which is vanishingly unlikely to be directly compilable back into anything like the original exe.

None of the decompilers that I've tried were able to make anything sensible of compiled C++, and most of them fell over while trying.

What decompilers are useful for is to analyse and debug executables, or at least small parts of them. Using one to recreate buildable, maintainable source is a huge project.

I mean, that's assuming that the original question was about decompiling an exe. I'm not even sure that it was.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
newbie8787
Posts: 105
Joined: Thu Jan 10, 2008 6:26 pm

Jp ...

Post by newbie8787 »

Man, i'm not trying to steal neones code , actually i had entered this competition for which i had to design a game , that what i was doing for so many days and bugging you guys with my questions, when i was about to submit i saw something in submission criteria that i thought amounts to "giving instructions to get source from exe" i asked the ques here and looked it up , but didnt find nething relevant , so i thought maybe i had misinterpreted the statement (Which i had :D) , well i submitted my game the day before yesterday, will be posting it on the forum for u guys to play (as soon as i make a few corrections and add collision), its not very good , but its what i made.

Also i'd like to thank everyone who has helped me out on Irrlicht forums , i really could'nt have made it without u guys!!! :lol:

http://irrlicht.sourceforge.net/phpBB2/ ... 029#143029
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Post by Ico »

Ah ... in that context ... ;) Guess you should provide a link for the jury (or everyone? don't ask me ...) to download your source code that's compiled into the exe or maybe just a download link to the exe ... don't know the original text. :)
Post Reply