some helloworld crap

newbranch
Aaron 6 months ago
parent 459b790012
commit b3ae622bd0

@ -0,0 +1,18 @@
// https://www.geeksforgeeks.org/how-to-compile-decompile-and-run-c-code-in-linux/
//
// Use mcs compiler to create a windows executable csharphelloworld.exe from csharphelloworld.cs
//
// mcs -out:csharphelloworld.exe csharphelloworld.cs
// mono csharphelloworld.exe
using System;
public class GFG {
static public void Main()
{
Console.WriteLine("Hello World!");
Console.ReadKey();
}
}

@ -0,0 +1,50 @@
.assembly extern mscorlib
{
.ver 4:0:0:0
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
}
.assembly 'csharphelloworld'
{
.custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'() = (
01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module csharphelloworld.exe // GUID = {D5E6E53D-50CA-452F-AED9-6A961E988718}
.class public auto ansi beforefieldinit GFG
extends [mscorlib]System.Object
{
// method line 1
.method public hidebysig specialname rtspecialname
instance default void '.ctor' () cil managed
{
// Method begins at RVA 0x2050
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void object::'.ctor'()
IL_0006: ret
} // end of method GFG::.ctor
// method line 2
.method public static hidebysig
default void Main () cil managed
{
// Method begins at RVA 0x2058
.entrypoint
// Code size 17 (0x11)
.maxstack 8
IL_0000: ldstr "Hello World!"
IL_0005: call void class [mscorlib]System.Console::WriteLine(string)
IL_000a: call valuetype [mscorlib]System.ConsoleKeyInfo class [mscorlib]System.Console::ReadKey()
IL_000f: pop
IL_0010: ret
} // end of method GFG::Main
} // end of class GFG

@ -0,0 +1,10 @@
https://www.geeksforgeeks.org/how-to-compile-decompile-and-run-c-code-in-linux/
Use mcs compiler to create a windows executable csharphelloworld.exe from csharphelloworld.cs
mcs -out:csharphelloworld.exe csharphelloworld.cs
mono csharphelloworld.exe
To decompile this executable file run the following command:
monodis --output=csharphelloworld.decomp.cs csharphelloworld.exe
Loading…
Cancel
Save