The first sentence is with some different syntax, but though the same meaning. I'll try to explain it... Grammatically, the "square of" comes after the "even number", in the sense that you have in a first time "an even number" and then, you get its "square". This is why you consider the square part as a consequence...
The contraposive is , that is to say :
In other words : "If the square of a number is not even, then this number is not even".
Is it clear ? Does it look correct to you ?