Lands #4429 by fixing windows/messagebox with EXITFUNC=none

bug/bundler_fix
HD Moore 2014-12-19 14:51:57 -06:00
commit 9ede2c2ca5
No known key found for this signature in database
GPG Key ID: 22015B93FA604913
1 changed files with 7 additions and 1 deletions

View File

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