Lands #4429 by fixing windows/messagebox with EXITFUNC=none
commit
9ede2c2ca5
|
@ -86,12 +86,17 @@ EOS
|
||||||
call [ebp+8] ;ExitProcess/Thread(0)
|
call [ebp+8] ;ExitProcess/Thread(0)
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
# if exit is set to seh, overrule
|
# if exit is set to seh or none, overrule
|
||||||
if datastore['EXITFUNC'].upcase.strip == "SEH"
|
if datastore['EXITFUNC'].upcase.strip == "SEH"
|
||||||
# routine to exit via exception
|
# routine to exit via exception
|
||||||
doexit = <<EOS
|
doexit = <<EOS
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
call eax
|
call eax
|
||||||
|
EOS
|
||||||
|
getexitfunc = ''
|
||||||
|
elsif datastore['EXITFUNC'].upcase.strip == "NONE"
|
||||||
|
doexit = <<-EOS
|
||||||
|
nop
|
||||||
EOS
|
EOS
|
||||||
getexitfunc = ''
|
getexitfunc = ''
|
||||||
end
|
end
|
||||||
|
@ -232,6 +237,7 @@ start_main:
|
||||||
push 0x41206c6c
|
push 0x41206c6c
|
||||||
push 0x642e3233
|
push 0x642e3233
|
||||||
push 0x72657375 ;user32.dll
|
push 0x72657375 ;user32.dll
|
||||||
|
xor bl,bl ;make sure we have a null byte
|
||||||
mov [esp+0xA],bl ;null byte
|
mov [esp+0xA],bl ;null byte
|
||||||
mov esi,esp ;put pointer to string on top of stack
|
mov esi,esp ;put pointer to string on top of stack
|
||||||
push esi
|
push esi
|
||||||
|
|
Loading…
Reference in New Issue