Click here to Skip to main content
12,505,591 members (52,225 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: .NET3.5 .NET
i decompiled an exe using different decompilers but i am unable to find main method in the decompiled code. What can be the reason??
Posted 30-Jun-12 1:05am
sp1786668
Comments
Wes Aday 30-Jun-12 9:11am
   
Personally I don't see how you would expect anyone to be able to answer this since you did not post any relevant information that would enable anyone to provide an answer. The possible reasons are many. You actually decompiled a DLL not an exe. The code is obfuscated. The main method was not name "main". You did not look hard enough. You did not know what it is that you are looking for. The decompiler was set not to look for a main method. And on and on.
Sergey Alexandrovich Kryukov 30-Jun-12 14:11pm
   
Good points.
--SA
sp1786 1-Jul-12 23:53pm
   
Thanks for the points.
The answers:
1. You actually decompiled a DLL not an exe
Ans. It is an EXE

2. The code is obfuscated
Ans/Query. How to identify obfuscated code?

3.The main method was not name "main". You did not look hard enough.
And. I have used a number of decompilers including reflector, dotpeek etc. The decompiled output contained only classes. These classes are named as
$ArrayType$$$iu00$$aqw.cs
quit.cs
struct1.cs
$UnnamedClass$0xf0p9y646$88$.cs
etc

And all these classes contains is internal structures


internal struct Atquit
{
}

and interfaces

Help me find main method and let me know the information u require to guide me further
sp1786 1-Jul-12 23:53pm
   
Thanks for the points.
The answers:
1. You actually decompiled a DLL not an exe
Ans. It is an EXE

2. The code is obfuscated
Ans/Query. How to identify obfuscated code?

3.The main method was not name "main". You did not look hard enough.
And. I have used a number of decompilers including reflector, dotpeek etc. The decompiled output contained only classes. These classes are named as
$ArrayType$$$iu00$$aqw.cs
quit.cs
struct1.cs
$UnnamedClass$0xf0p9y646$88$.cs
etc

And all these classes contains is internal structures


internal struct Atquit
{
}

and interfaces

Help me find main method and let me know the information u require to guide me further
   
What are you talking about? Classes cannot have the named *.cs, it would not compile. It could be *.cs files, not classes.
--SA
sp1786 3-Jul-12 1:17am
   
sorry for putting it incorrectly. Yes, the decompiled output is class files
Amarnath S 1-Jul-12 11:25am
   
Work the other way round. Look at how the user uses the executable, and try to figure out how the code would have been written. Why knows, you may come up with a better, faster way of achieving the same result. Of course, it is quite a struggle; nothing ever happens without a struggle, isn't it?
   
Nothing without a struggle? Looks like a bit of exaggeration. Did you know this:

"If you sit by the river long enough, you will see the body of your enemy floating by..."?
Should work as a method of software development, too... :-)
--SA
sp1786 3-Jul-12 1:21am
   
Dear Sergey,
please guide me with suitable approach. This exe is used by a web application to load data. At present i donot have access to the web application. All i have is the exe....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 30 Jun 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100