@scathach was really confused about the xor, had to look it up.

TIL it's more space efficient than mov 0 (among other really arcane reasons): https://stackoverflow.com/questions/1396527/what-is-the-purpose-of-xoring-a-register-with-itself#1396552

What is the purpose of XORing a register with itself?

xor eax, eax will always set eax to zero, right? So, why does MSVC++ sometimes put it in my executable's code? Is it more efficient that mov eax, 0? 012B1002 in al,dx 012B1003 push ...

Stack Overflow