Limee AKA Lamer
September 8th, 2004, 13:37
I establish a SEH handle to deal with
int 1 exception,why the porgram crashed?
.586
.model flat,stdcall
option casemap:none
include kernel32.inc
include user32.inc
include windows.inc
includelib kernel32.lib
includelib user32.lib
.data
szCaption db "SEH",0
szTextSTEP db "The Program run on Step mode!",0
szText db "the program run normally!",0
SafeEsp dd 0
assume fs:nothing
.code
start:
push SEH
push fs:[0]
mov fs:[0],esp
mov [SafeEsp],esp
int 1
nop
invoke MessageBox,0,offset szText,offset szCaption,MB_OK
jmp Exit
SEH:
invoke MessageBox,0,offset szTextSTEP,offset szCaption,MB_OK
Exit:
mov esp,[SafeEsp]
pop fs:[0]
add esp,4
invoke ExitProcess,0
end start
end
int 1 exception,why the porgram crashed?
.586
.model flat,stdcall
option casemap:none
include kernel32.inc
include user32.inc
include windows.inc
includelib kernel32.lib
includelib user32.lib
.data
szCaption db "SEH",0
szTextSTEP db "The Program run on Step mode!",0
szText db "the program run normally!",0
SafeEsp dd 0
assume fs:nothing
.code
start:
push SEH
push fs:[0]
mov fs:[0],esp
mov [SafeEsp],esp
int 1
nop
invoke MessageBox,0,offset szText,offset szCaption,MB_OK
jmp Exit
SEH:
invoke MessageBox,0,offset szTextSTEP,offset szCaption,MB_OK
Exit:
mov esp,[SafeEsp]
pop fs:[0]
add esp,4
invoke ExitProcess,0
end start
end