Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BITS 32
- extern MessageBoxA
- extern ExitProcess
- section .data readable writeable
- title db "Everything works",0
- message db "THE GAME FAGGOT",0
- trololo2 db "Second SEH handler", 0
- normal db "Normal execution taken", 0
- section .idata readable writeable
- section .text readable writeable executable
- global _start
- MsgBox:
- push ebp
- mov ebp, esp
- push 16
- push title
- push dword[ebp+8]
- push 0
- call MessageBoxA
- leave
- ret 4
- _start:
- push _seh
- push dword[fs:0]
- mov [fs:0], esp
- int 3
- _normal:
- push normal
- call MsgBox
- _exit:
- call ExitProcess
- ret
- _seh:
- push message
- call MsgBox
- mov eax, [fs:0]
- lea eax, [eax+4]
- mov dword[eax], _seh2
- int3
- jmp _exit
- _seh2:
- mov eax, [esp+0ch]
- lea eax, [eax+0B8h]
- mov dword[eax], _normal
- mov eax, 0
- ret
- ; SAFEEIP = CONTEXT + B8h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement