Software patents are magic, you just start your process with 'on a computer do X' and because computers are a piece of hardware you can patent anything you like
I'm still upset that my "you can't patent software because of the Curry-Howard isomorphism" legal argument never took off. (Basically, software is equivalent to math, and you can't patent math. Therefore, you can't patent software. QED.)