Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format PE GUI
- entry start
- include 'win32a.inc'
- section '.text' code readable executable
- start:
- ; get PEB
- mov eax, [fs:0x30]
- ; compare BeingDebugged flag of PEB
- cmp byte [eax + 2], 0
- je goodboy
- ; show bad boy
- push 0 ; type MB_OK
- push _badcaption ; dialog title
- push _badmessage ; message
- push 0 ; no owner window
- call [MessageBoxA]
- jmp exit
- goodboy:
- ; show good boy
- push 0 ; type MB_OK
- push _goodcaption ; dialog title
- push _goodmessage ; message
- push 0 ; no owner window
- call [MessageBoxA]
- exit:
- push 0 ; success
- call [ExitProcess]
- section '.data' data readable writeable
- _badcaption db 'I got you!',0
- _badmessage db 'Stop debugging me!',0
- _goodcaption db 'Everything is fine!',0
- _goodmessage db 'Have a good day!',0
- section '.idata' import data readable writeable
- library kernel,'KERNEL32.DLL',\
- user,'USER32.DLL'
- import kernel,\
- ExitProcess,'ExitProcess'
- import user,\
- MessageBoxA, 'MessageBoxA'
- section '.reloc' fixups data readable discardable
Add Comment
Please, Sign In to add comment