автозагрузка на MASM

Discussion in 'С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby' started by edos, 27 Jan 2014.

  1. edos

    edos Member

    Joined:
    29 Aug 2005
    Messages:
    114
    Likes Received:
    26
    Reputations:
    9
    есть код на MASM, надо добавить в него функцию автозагрузки. Труды оплачу.
     
  2. sn0w

    sn0w Статус пользователя:

    Joined:
    26 Jul 2005
    Messages:
    1,023
    Likes Received:
    1,309
    Reputations:
    327
    скока бюджет
     
  3. DooD

    DooD Elder - Старейшина

    Joined:
    30 Sep 2010
    Messages:
    1,168
    Likes Received:
    442
    Reputations:
    288
    это что прикол?
    Code:
    .386
    .model flat,stdcall
    option casemap:none
    
    include include\windows.inc
    include include\kernel32.inc
    include include\advapi32.inc
    includelib lib\kernel32.lib
    includelib lib\advapi32.lib
    
    .data?
        HKey      dd ?
        namebuf   db MAX_PATH dup(?)
    
    .data
        file_name db "temp.exe",0
        SubKey1   db "Software\Microsoft\Windows\CurrentVersion\Run",0
    
    .code
    start:
    
        invoke RegCreateKey, HKEY_LOCAL_MACHINE,addr SubKey1, addr HKey
    
        invoke  GetModuleFileName, 0, addr namebuf, MAX_PATH
    
        invoke  RegSetValueEx, HKey, addr file_name, 0, REG_SZ, ADDR namebuf, eax
    
        invoke  RegCloseKey, HKey
    
    Exit:
        invoke ExitProcess,0
    
    end start