N. Katz introduced the notion of the middle convolution on local systems. This can be seen as a generalization of the Euler transform of Fuchsian differential equations. In this paper, we consider the generalization of the Euler transform, the twisted Euler transform, and apply this to differential equations with irregular singular points. In particular, for differential equations with an irregular singular point of irregular rank 2 at $x=\infty$, we describe explicitly changes of local datum caused by twisted Euler transforms. Also we attach these differential equations to Kac-Moody Lie algebras and show that twisted Euler transforms correspond to the action of Weyl groups of these Lie algebras.