Всем привет!
Вот решил написать вот такой урок на основе моего кода на c#.
Как так получилось? Я нашел у себя на компьютере в файлах деассамбилятор и решил проверить его на своём знаменитом лаунчере.
Ну вот что получилось:
Дальше сами.
Вот решил написать вот такой урок на основе моего кода на c#.
Как так получилось? Я нашел у себя на компьютере в файлах деассамбилятор и решил проверить его на своём знаменитом лаунчере.
Ну вот что получилось:
.method private hidebysig instance void button1_Click(object sender,
class [mscorlib]System.EventArgs e) cil managed
{
// Размер кода: 224 (0xe0)
.maxstack 4
.locals init (string V_0,
class [System]System.Diagnostics.ProcessStartInfo V_1,
object[] V_2)
IL_0000: nop
IL_0001: ldc.i4.s 26
IL_0003: call string [mscorlib]System.Environment::GetFolderPath(valuetype [mscorlib]System.Environment/SpecialFolder)
IL_0008: stloc.0
IL_0009: ldstr "javaw"
IL_000e: ldc.i4.s 22
IL_0010: newarr [mscorlib]System.Object
IL_0015: stloc.2
IL_0016: ldloc.2
IL_0017: ldc.i4.0
IL_0018: ldstr "-Xms1G -Xmx1G -cp \""
IL_001d: stelem.ref
IL_001e: ldloc.2
IL_001f: ldc.i4.1
IL_0020: ldloc.0
IL_0021: stelem.ref
IL_0022: ldloc.2
IL_0023: ldc.i4.2
IL_0024: ldstr "\\"
IL_0029: stelem.ref
IL_002a: ldloc.2
IL_002b: ldc.i4.3
IL_002c: ldarg.0
IL_002d: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_0032: stelem.ref
IL_0033: ldloc.2
IL_0034: ldc.i4.4
IL_0035: ldstr "\\bin\\minecraft1.jar;"
IL_003a: stelem.ref
IL_003b: ldloc.2
IL_003c: ldc.i4.5
IL_003d: ldloc.0
IL_003e: stelem.ref
IL_003f: ldloc.2
IL_0040: ldc.i4.6
IL_0041: ldstr "\\"
IL_0046: stelem.ref
IL_0047: ldloc.2
IL_0048: ldc.i4.7
IL_0049: ldarg.0
IL_004a: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_004f: stelem.ref
IL_0050: ldloc.2
IL_0051: ldc.i4.8
IL_0052: ldstr "\\bin\\jinput.jar;"
IL_0057: stelem.ref
IL_0058: ldloc.2
IL_0059: ldc.i4.s 9
IL_005b: ldloc.0
IL_005c: stelem.ref
IL_005d: ldloc.2
IL_005e: ldc.i4.s 10
IL_0060: ldstr "\\"
IL_0065: stelem.ref
IL_0066: ldloc.2
IL_0067: ldc.i4.s 11
IL_0069: ldarg.0
IL_006a: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_006f: stelem.ref
IL_0070: ldloc.2
IL_0071: ldc.i4.s 12
IL_0073: ldstr "\\bin\\lwjgl.jar;"
IL_0078: stelem.ref
IL_0079: ldloc.2
IL_007a: ldc.i4.s 13
IL_007c: ldloc.0
IL_007d: stelem.ref
IL_007e: ldloc.2
IL_007f: ldc.i4.s 14
IL_0081: ldstr "\\"
IL_0086: stelem.ref
IL_0087: ldloc.2
IL_0088: ldc.i4.s 15
IL_008a: ldarg.0
IL_008b: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_0090: stelem.ref
IL_0091: ldloc.2
IL_0092: ldc.i4.s 16
IL_0094: ldstr "\\bin\\lwjgl_util.jar \" -Djava.library.path=\""
IL_0099: stelem.ref
IL_009a: ldloc.2
IL_009b: ldc.i4.s 17
IL_009d: ldloc.0
IL_009e: stelem.ref
IL_009f: ldloc.2
IL_00a0: ldc.i4.s 18
IL_00a2: ldstr "\\"
IL_00a7: stelem.ref
IL_00a8: ldloc.2
IL_00a9: ldc.i4.s 19
IL_00ab: ldarg.0
IL_00ac: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_00b1: stelem.ref
IL_00b2: ldloc.2
IL_00b3: ldc.i4.s 20
IL_00b5: ldstr "\\bin\\natives\" net.minecraft.client.Minecraft "
IL_00ba: stelem.ref
IL_00bb: ldloc.2
IL_00bc: ldc.i4.s 21
IL_00be: ldarg.0
IL_00bf: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::nick
IL_00c4: stelem.ref
IL_00c5: ldloc.2
IL_00c6: call string [mscorlib]System.String::Concat(object[])
IL_00cb: newobj instance void [System]System.Diagnostics.ProcessStartInfo::.ctor(string,
string)
IL_00d0: stloc.1
IL_00d1: ldloc.1
IL_00d2: call class [System]System.Diagnostics.Process [System]System.Diagnostics.Process::Start(class [System]System.Diagnostics.ProcessStartInfo)
IL_00d7: pop
IL_00d8: ldarg.0
IL_00d9: call instance void [System.Windows.Forms]System.Windows.Forms.Form::Close()
IL_00de: nop
IL_00df: ret
} // end of method Form1::button1_Click
class [mscorlib]System.EventArgs e) cil managed
{
// Размер кода: 224 (0xe0)
.maxstack 4
.locals init (string V_0,
class [System]System.Diagnostics.ProcessStartInfo V_1,
object[] V_2)
IL_0000: nop
IL_0001: ldc.i4.s 26
IL_0003: call string [mscorlib]System.Environment::GetFolderPath(valuetype [mscorlib]System.Environment/SpecialFolder)
IL_0008: stloc.0
IL_0009: ldstr "javaw"
IL_000e: ldc.i4.s 22
IL_0010: newarr [mscorlib]System.Object
IL_0015: stloc.2
IL_0016: ldloc.2
IL_0017: ldc.i4.0
IL_0018: ldstr "-Xms1G -Xmx1G -cp \""
IL_001d: stelem.ref
IL_001e: ldloc.2
IL_001f: ldc.i4.1
IL_0020: ldloc.0
IL_0021: stelem.ref
IL_0022: ldloc.2
IL_0023: ldc.i4.2
IL_0024: ldstr "\\"
IL_0029: stelem.ref
IL_002a: ldloc.2
IL_002b: ldc.i4.3
IL_002c: ldarg.0
IL_002d: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_0032: stelem.ref
IL_0033: ldloc.2
IL_0034: ldc.i4.4
IL_0035: ldstr "\\bin\\minecraft1.jar;"
IL_003a: stelem.ref
IL_003b: ldloc.2
IL_003c: ldc.i4.5
IL_003d: ldloc.0
IL_003e: stelem.ref
IL_003f: ldloc.2
IL_0040: ldc.i4.6
IL_0041: ldstr "\\"
IL_0046: stelem.ref
IL_0047: ldloc.2
IL_0048: ldc.i4.7
IL_0049: ldarg.0
IL_004a: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_004f: stelem.ref
IL_0050: ldloc.2
IL_0051: ldc.i4.8
IL_0052: ldstr "\\bin\\jinput.jar;"
IL_0057: stelem.ref
IL_0058: ldloc.2
IL_0059: ldc.i4.s 9
IL_005b: ldloc.0
IL_005c: stelem.ref
IL_005d: ldloc.2
IL_005e: ldc.i4.s 10
IL_0060: ldstr "\\"
IL_0065: stelem.ref
IL_0066: ldloc.2
IL_0067: ldc.i4.s 11
IL_0069: ldarg.0
IL_006a: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_006f: stelem.ref
IL_0070: ldloc.2
IL_0071: ldc.i4.s 12
IL_0073: ldstr "\\bin\\lwjgl.jar;"
IL_0078: stelem.ref
IL_0079: ldloc.2
IL_007a: ldc.i4.s 13
IL_007c: ldloc.0
IL_007d: stelem.ref
IL_007e: ldloc.2
IL_007f: ldc.i4.s 14
IL_0081: ldstr "\\"
IL_0086: stelem.ref
IL_0087: ldloc.2
IL_0088: ldc.i4.s 15
IL_008a: ldarg.0
IL_008b: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_0090: stelem.ref
IL_0091: ldloc.2
IL_0092: ldc.i4.s 16
IL_0094: ldstr "\\bin\\lwjgl_util.jar \" -Djava.library.path=\""
IL_0099: stelem.ref
IL_009a: ldloc.2
IL_009b: ldc.i4.s 17
IL_009d: ldloc.0
IL_009e: stelem.ref
IL_009f: ldloc.2
IL_00a0: ldc.i4.s 18
IL_00a2: ldstr "\\"
IL_00a7: stelem.ref
IL_00a8: ldloc.2
IL_00a9: ldc.i4.s 19
IL_00ab: ldarg.0
IL_00ac: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::lol
IL_00b1: stelem.ref
IL_00b2: ldloc.2
IL_00b3: ldc.i4.s 20
IL_00b5: ldstr "\\bin\\natives\" net.minecraft.client.Minecraft "
IL_00ba: stelem.ref
IL_00bb: ldloc.2
IL_00bc: ldc.i4.s 21
IL_00be: ldarg.0
IL_00bf: ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApplication5.Form1::nick
IL_00c4: stelem.ref
IL_00c5: ldloc.2
IL_00c6: call string [mscorlib]System.String::Concat(object[])
IL_00cb: newobj instance void [System]System.Diagnostics.ProcessStartInfo::.ctor(string,
string)
IL_00d0: stloc.1
IL_00d1: ldloc.1
IL_00d2: call class [System]System.Diagnostics.Process [System]System.Diagnostics.Process::Start(class [System]System.Diagnostics.ProcessStartInfo)
IL_00d7: pop
IL_00d8: ldarg.0
IL_00d9: call instance void [System.Windows.Forms]System.Windows.Forms.Form::Close()
IL_00de: nop
IL_00df: ret
} // end of method Form1::button1_Click
Последнее редактирование: