Mazda6 Not cranking...Any ideas?

My brother picked up a cheap Mazda 6, seller stated needed a new battery and main fuse because they hooked jumper cables on backwards.. Anyways I have ben trying to help him get this car running. We replaced the battery and the main fuse but the car won't start. No crank no start. All the lights and other stuff are working. I pulled the starter and bench tested it and it is working fine. I noticed on the dash the red car with the key is blinking.
When you try and start the car the light does not go away and just blinks very fast. When you turn the key to the run position the light blinks 5X with a few second pause and then blinks 1X. It repeats this in like a pattern. Does this main anything to anyone? Is the immobilizer the issue? Is the ignition switch the issue? Or is it something with the anit-theft? Thanks to anyone who can shed any light on this issue for us.
 
Back