Skip to content

Instantly share code, notes, and snippets.

Created June 21, 2012 18:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save anonymous/2967637 to your computer and use it in GitHub Desktop.
Save anonymous/2967637 to your computer and use it in GitHub Desktop.
.NET 4.5 Disassembly
Program:
class Program
{
string myString;
private Program()
{
myString = "foo";
}
static void Main(string[] args)
{
Program p = new Program();
}
}
Disassembler:
00340050 56 push esi
00340051 b93c372900 mov ecx,29373Ch (MT: TestAsm.Program)
00340056 e8a520e4ff call 00182100 (JitHelp: CORINFO_HELP_NEWSFAST)
0034005b 8bf0 mov esi,eax
0034005d 8b0530214503 mov eax,dword ptr ds:[3452130h] ("foo")
00340063 8d5604 lea edx,[esi+4]
00340066 e855221458 call clr+0x22c0 (584822c0) (JitHelp: CORINFO_HELP_ASSIGN_REF_EAX)
d:\Development\Projects\TestAsm\Program.cs @ 21:
0034006b 5e pop esi
0034006c c3 ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment