Хостинг серверов Minecraft playvds.com
  1. Вы находитесь в русском сообществе Bukkit. Мы - администраторы серверов Minecraft, разрабатываем собственные плагины и переводим на русский язык плагины наших собратьев из других стран.
    Dismiss Notice

Туториал Создаём лаунчер minecraft на ассамблере.

Discussion in 'Руководства, инструкции, утилиты' started by jwplaster, Apr 16, 2014.

  1. Автор темы
    jwplaster

    jwplaster Старожил Пользователь

    Trophy Points:
    173
    Skype:
    jwplaster.smartworld
    Имя в Minecraft:
    QviNSteN
    Всем привет!

    Вот решил написать вот такой урок на основе моего кода на 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
    Дальше сами.
     
    Last edited: Apr 16, 2014
  2. Хостинг MineCraft
    <
  3. alexandrage

    alexandrage Администратор

    Trophy Points:
    173
    Skype:
    alexandr0116
    Накатай лучше на Xcode mac os. Яп сам выберешь :D.
     
  4. oleg57zls

    oleg57zls Старожил Пользователь

    Trophy Points:
    173
    Skype:
    BlayzerQ
    Имя в Minecraft:
    Blayzer
    Извращенец что-ли?
     
  5. alexandrage

    alexandrage Администратор

    Trophy Points:
    173
    Skype:
    alexandr0116
    Такой же как и тс темы.
     
  6. Masterchan

    Masterchan Активный участник

    Trophy Points:
    61
    Это не ассемблер а байт-код C#
     
  7. J1Mmy

    J1Mmy Старожил Пользователь

    Trophy Points:
    103
    Code:
    00412478  55                    push    ebp
    00412479  8BEC                  mov    ebp, esp
    0041247B  83C4F0                add    esp, -$10
    
    * Reference to pointer to GlobalVar_00414044
    |
    0041247E  A104354100            mov    eax, dword ptr [$00413504]
    00412483  C60001                mov    byte ptr [eax], $01
    00412486  B8F8234100            mov    eax, $004123F8
    
    * Reference to: SysInit.Proc_00405A38
    |
    0041248B  E8A835FFFF            call    00405A38
    00412490  33C0                  xor    eax, eax
    00412492  55                    push    ebp
    00412493  684D254100            push    $0041254D
    
    ***** TRY
    |
    00412498  64FF30                push    dword ptr fs:[eax]
    0041249B  648920                mov    fs:[eax], esp
    0041249E  B87C484100            mov    eax, $0041487C
    
    * Possible String Reference to: 'D:\Games\Minecraft_old\bin\'
    |
    004124A3  BA64254100            mov    edx, $00412564
    
    * Reference to: System.Proc_00403E94
    |
    004124A8  E8E719FFFF            call    00403E94
    
    * Possible String Reference to: '-Xmx128m -Xms100m -Djava.library.pa
    |                                th="D:\Games\Minecraft_old\bin\nati
    |                                ves" -cp "'
    |
    004124AD  6888254100            push    $00412588
    004124B2  FF357C484100          push    dword ptr [$0041487C]
    
    * Possible String Reference to: 'jinput.jar;'
    |
    004124B8  68E4254100            push    $004125E4
    004124BD  FF357C484100          push    dword ptr [$0041487C]
    
    * Possible String Reference to: 'lwjgl.jar;'
    |
    004124C3  68F8254100            push    $004125F8
    004124C8  FF357C484100          push    dword ptr [$0041487C]
    
    * Possible String Reference to: 'lwjgl_util.jar;'
    |
    004124CE  680C264100            push    $0041260C
    004124D3  FF357C484100          push    dword ptr [$0041487C]
    
    * Possible String Reference to: 'minecraft.jar" net.minecraft.client
    |                                .Minecraft'
    |
    004124D9  6824264100            push    $00412624
    004124DE  B880484100            mov    eax, $00414880
    004124E3  BA09000000            mov    edx, $00000009
    
    * Reference to: System.Proc_0040419C
    |
    004124E8  E8AF1CFFFF            call    0040419C
    004124ED  6A05                  push    $05
    004124EF  A17C484100            mov    eax, dword ptr [$0041487C]
    
    * Reference to: System.Proc_004042CC
    |
    004124F4  E8D31DFFFF            call    004042CC
    004124F9  50                    push    eax
    004124FA  A180484100            mov    eax, dword ptr [$00414880]
    
    * Reference to: System.Proc_004042CC
    |
    004124FF  E8C81DFFFF            call    004042CC
    00412504  50                    push    eax
    
    * Possible String Reference to: 'java'
    |
    00412505  6854264100            push    $00412654
    
    * Possible String Reference to: 'open'
    |
    0041250A  685C264100            push    $0041265C
    0041250F  6A00                  push    $00
    
    * Reference to: shell32.ShellExecuteA()
    |
    00412511  E87A98FFFF            call    0040BD90
    
    * Reference to pointer to GlobalVar_00414214
    |
    00412516  A120344100            mov    eax, dword ptr [$00413420]
    0041251B  8B1580484100          mov    edx, [$00414880]
    
    * Reference to: System.Proc_00404410
    |
    00412521  E8EA1EFFFF            call    00404410
    
    * Reference to: System.Proc_00402EAC
    |
    00412526  E88109FFFF            call    00402EAC
    
    * Reference to: System.Proc_0040275C
    |
    0041252B  E82C02FFFF            call    0040275C
    
    * Reference to pointer to GlobalVar_00414048
    |
    00412530  A1AC344100            mov    eax, dword ptr [$004134AC]
    
    * Reference to: System.Proc_00402C94
    |
    00412535  E85A07FFFF            call    00402C94
    
    * Reference to: System.Proc_0040275C
    |
    0041253A  E81D02FFFF            call    0040275C
    0041253F  33C0                  xor    eax, eax
    00412541  5A                    pop    edx
    00412542  59                    pop    ecx
    00412543  59                    pop    ecx
    00412544  648910                mov    fs:[eax], edx
    
    ****** FINALLY
    |
    00412547  6854254100            push    $00412554
    0041254C  C3                    ret
    
    
    * Reference to: System.Proc_00403868
    |
    0041254D  E91613FFFF            jmp    00403868
    00412552  EBF8                  jmp    0041254C
    
    * Reference to: System.Proc_00403D50
    |
    00412554  E8F717FFFF            call    00403D50
    00412559  0000                  add    [eax], al
     
  8. Igor_22

    Igor_22 Старожил Пользователь

    Trophy Points:
    123
    Skype:
    igor_04041991
    Имя в Minecraft:
    Oddshot
    каждый в праве писать на чем угодно. Главное результат...
     
  9. Johnson

    Johnson Активный участник

    Trophy Points:
    61
    Имя в Minecraft:
    Johnson1893
    Месье ТС знает толк в извращениях, правописании и понимании происходящего...
     
  10. Shevchik

    Shevchik Старожил Пользователь

    Trophy Points:
    173
    Имя в Minecraft:
    _Shevchik_
    Это не ассемблер.
     

Share This Page