News: 11 March 2016 - Forum Rules

### Author Topic: Source files of an EXE  (Read 2510 times)

#### TBartoli

• Jr. Member
• Posts: 8
##### Source files of an EXE
« on: December 12, 2013, 07:09:00 am »
Hello,

When i opened the exe file of a game with IDA Pro or Hex Workshop, in the text area (right sidebar) i can see the "C Language" source files.
For exemple:

C:\game\source\LibDG\dgd.c
C:\game\source\Thing\door.c
C:\game\source\Bullet\rmissile.c
C:\game\source\Bullet\blast.c
C:\game\source\Thing\sight.c

Etc...

My question is, can i extract these C files by anyway ?

And i have a problem with IDA Pro, when i want repack an EXE file like that : File/Produce File/Create EXE File, i have this error:

How can i repack it ?

Thanks for your help

#### henke37

• Hero Member
• Posts: 643
##### Re: Source files of an EXE
« Reply #1 on: December 12, 2013, 10:10:01 am »
You need to actually get the source files and compile them, just like the original developer did.

#### Zoinkity

• Hero Member
• Posts: 565
##### Re: Source files of an EXE
« Reply #2 on: December 12, 2013, 12:20:23 pm »
The reason you can see the filenames at all is because they were compiled into the executable.  If the programmers had opted to strip the executable you would probably see a numerical placeholder or something along those lines.

It's fairly rare to be able to decompile a compiled program into its source.  Even then, you'd have to know the compiler and have a set of the exact libraries used, but it wouldn't exactly be automatic.  The best analogy would be comparing output from tools like that to machine translators.  It's almost, but not quite, completely unusable ;*)

#### TBartoli

• Jr. Member
• Posts: 8
##### Re: Source files of an EXE
« Reply #3 on: December 12, 2013, 01:26:45 pm »
Ok,

Thanks for these informations.