Jump to content

Finding the compiler for an .exe

Majestic

I'm looking into something performance related in gaming, and I'm currently looking at the compiler used for the executeable.

However, this is a bit above my field of knowledge and i've been googline for quite some time, but came up with a bunch of tools I don't understand.

 

I'm not looking to reverse engineer an executeable, or do anything malicious. I just need to know what compiler was used when compiling the executeable. Anyone who can help me on my way?

Link to comment
Share on other sites

Link to post
Share on other sites

You’d probably have to read the machine code & know the different ways different compilers write machine code. 

 

Or just try de-compilers till you get one that tells you what was used. 

 

If the game engine was unreal, it WAS visual studio. I’m telling you it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Majestic said:

Yes, Windows 10 Pro x64

Then I cannot help, Windows is even farther outside of me than macOS

Link to comment
Share on other sites

Link to post
Share on other sites

Link to comment
Share on other sites

Link to post
Share on other sites

34 minutes ago, Majestic said:

I can run Linux on a VM if that means you can help me.

Sorry no it cannot

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Majestic said:

I'm currently looking at the compiler used for the executeable.

Assuming that the executable consists of a few layers of linked libraries, each written in a different language/dialect, you're out of luck.

 

There are small differences between compilers, so it is not impossible to see a difference between a C executable compiled with Clang and a C executable compiled with GCC, but there are very hard to find - and you'd still need to know the original language. So unless there are obvious libraries like MinGW DLLs that come with it, you should give up.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

If you're looking at a .NET executable, you might be able to decompile into C# or VB, from what I remember those often are readable when decompiled, since they decompile from CLR's intermediate language, not pure machine code. Otherwise if it was MinGW, or similar, unless the developers accidentally left debugging symbols in there, you're out of luck... You're going to be stuck reading assembly, you won't reproduce C or C++ (again, unless it's compiled to CLR IR).

 

You can use  Dependency Walker to verify what library dependencies are there (I'm guessing you will see clear .NET Framework dependencies if it's a .NET executable). Then the only tool I know of for .NET is Jetbrains DotPeek, not sure if there's a free version, but I used it a lot in my C# coding days. If you're out of luck you can try AIDA64, but that still won't reproduce code.

Link to comment
Share on other sites

Link to post
Share on other sites

99.9% of the time it will be the Microsoft compiler included in Visual Studio for any windows based games. 

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

That's not true. Also, which of the Microsoft compilers?

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

quote if you want a reply.

On 7/30/2019 at 3:21 AM, Dat Guy said:

That's not true. Also, which of the Microsoft compilers?

^

On 7/29/2019 at 11:18 PM, trag1c said:

99.9% of the time it will be the Microsoft compiler included in Visual Studio for any windows based games. 

 

I live in misery USA. my timezone is central daylight time which is either UTC -5 or -4 because the government hates everyone.

into trains? here's the model railroad thread!

Link to comment
Share on other sites

Link to post
Share on other sites

The only way to determine the compiler is to understand all 3 major compilers for you platform which are Clang, MSVC, and mingw.  Then you would need to understand the patterns at which these compilers create machine code for the machine.  The only way you even have a hope of doing that is by de-compilling the executable (https://www.hex-rays.com/products/decompiler/).  If you're more specific on what performance related aspect you're looking into then maybe we can be of more help, but to generally ascertain the compiler is no trivial task.

Link to comment
Share on other sites

Link to post
Share on other sites

Since you are on Windows, I think a very easy way could be to throw the executable into Dependency Walker (an application, google it),and looking at what runtimes or other libraries it links to. I think MinGW links to its own libstdc++ libraries etc. Clang probably does something like it as well. MSVC will most probably only link to direct dependencies to the application as well as system libraries and official runtimes, you'd want to look for anything that isn't "Microsoft"-branded in the link libraries.

 

Been a long while since I used anything other than MSVC on Windows though, so take my comment with a pinch of salt.

Link to comment
Share on other sites

Link to post
Share on other sites

35 minutes ago, Fredrik Svantesson said:

I think a very easy way could be to throw the executable into Dependency Walker (an application, google it),and looking at what runtimes or other libraries it links to.

Yup that's the best thing to do. I often use it to know what i am dealing with.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×