I usually use autohotkey for such things.
ESC::
process, close, sfxt.exe (or whatever the exe is named)
That will kill the process, same as killing it from task manager.
That's the one I usually use, but sometimes the resolution won't revert to the original desktop resolution.
ESC::
Winclose, sfxt (or whatever the active window of the game is titled)
Sometimes you can figure it out by running the game windowed.
If not, there are autohotkey scripts out there that will record the active window names and help you figure it out.
This one is more of a PITA because you have to figure out the window name, but it doesn't screw up the resolution as often.
Once the script is made, you can right click on it and compile it to an .exe on a computer that has autohotkey installed.
That .exe will run on any computer, even if ahk isn't installed.
That's probably all the .exe you downloaded before was.
Personally, I don't use an exit button for the PC games since settings and save files can get corrupted.
I close them out properly through the game menu.