.386.model flat, stdcalloption casemap:noneincludelib lib/kernel32.libincludelib lib/user32.libinclude include/kernel32.incinclude include/user32.incinclude include/windows.inc.datawname db 'f.asm - Notepad',0.data?procid dd ?handle dd ?.codestart:push offset wnamepush 0call FindWindowmov handle, eaxpush offset procidpush eaxcall GetWindowThreadProcessIdcall GetCurrentThreadIdpush 1push eaxpush procidcall AttachThreadInputpush handlecall SetFocuspush 0call ExitProcessend start
.386.model flat, stdcalloption casemap:noneincludelib lib/kernel32.libincludelib lib/user32.libinclude include/kernel32.incinclude include/user32.incinclude include/windows.inc.datawname db 'f.asm - Notepad',0.data?procid dd ?handle dd ?.codestart:push offset wnamepush 0call FindWindowmov handle, eaxpush eaxcall SetForegroundWindowpush 0call ExitProcessend start