Shellcode: added restoretty function