The Application Layer Gateway service executable, or alg.exe, is a generic Windows background process. It manages Internet Connection Sharing protocol connections that third party applications use for online communication, and it is also used by Windows Firewall.
The alg.exe process manages connections that third party applications, such as a FTP or instant messaging client, use to communicate over the Internet. It does this by supporting third-party plugins that allow network protocols, such as FTP, to work with the Windows Firewall. The way the alg.exe process functions can be compared to a proxy server in the way it sits between the third party software and an online resource, facilitating the exchange of data.