Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global main
- section .data
- message db "Hello World!", 0x00
- section .text
- main:
- call hello
- ret
- hello:
- lea rdi, [rel message]
- call puts
- ret
- .end:
- global main
- section .data
- message db "Hello World!", 0x00
- section .text
- main:
- call decrypt <---------------Addition
- call hello
- ret
- decrypt: <---------------Addition
- DECRYPTOR_SECTION hello, hello.end-hello <---------------Addition
- ret <---------------Addition
- hello:
- lea rdi, [rel message]
- call puts
- ret
- .end:
- .386
- .model flat, stdcall
- option casemap:none
- include masm32includewindows.inc
- include masm32includekernel32.inc
- includelib kernel32.lib
- include masm32includeuser32.inc
- includelib user32.lib
- .data
- Encrypted db 217,243,234,245,252,249,255,254,183,227,176,228,229
- db 228,255,226,249,241,252,176,254,255,190,162,144
- .code
- start:
- ;call decrypt
- call hello
- invoke ExitProcess,NULL
- ; decrypt proc
- ; xor ecx,ecx
- ; complete:
- ; lea esi , Encrypted
- ; add esi,ecx
- ; movzx eax , byte ptr ds:[esi]
- ; xor eax ,090h
- ; mov byte ptr ds:[Encrypted + ecx], al
- ; add ecx,1
- ; cmp byte ptr ds:[Encrypted + ecx - 1 ],0
- ; jne complete
- ; ret
- ; decrypt endp
- hello proc
- invoke MessageBox, NULL,addr Encrypted, addr Encrypted, MB_OK
- ret
- hello endp
- end start
Add Comment
Please, Sign In to add comment