Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format PE GUI 4.0
- entry start
- include 'win32a.inc'
- ; readable = можно читать
- ; writeable = писать
- ; executable = исполнять как код
- section '.text' code readable writeable executable
- start:
- ; Копируем из неисполняемого в исполняемый
- mov esi, buff_with_code
- mov ebx, buff
- mov ecx, buff_with_code.length
- @@:
- mov al, [esi]
- mov [ebx], al
- inc esi
- inc ebx
- dec ecx
- cmp ecx, 0
- jne @b
- ; Выполняем
- jmp buff
- start.contine:
- invoke ExitProcess, 0
- buff: db 512 dup(0)
- jmp start.contine
- section '.data' data readable writeable
- msg_title db "Title", 0
- msg_text db "Hello!", 0
- buff_with_code:
- invoke MessageBox, NULL, msg_title, msg_text, MB_OK
- buff_with_code.length = $ - buff_with_code
- section '.idata' import data readable writeable
- library kernel,'KERNEL32.DLL',\
- user, 'USER32.DLL'
- import kernel,\
- ExitProcess,'ExitProcess'
- import user,\
- MessageBox, 'MessageBoxA'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement