The ECU is specific to the model, engine and transmission, so a petrol ECU won't suit a diesel, one from a manual gearbox car won't suit an auto etc. I am not sure if a Thai build will suit a Spanish car, I can't see why that wouldn't work.
Antitheft is in the BCM not the ECU, so if your ECU is fried and replaced everything else should remain the same (keys are registered with the BCM).
Before changing the ECU, have a look over the old one and try to determine what killed it. Was the vehicle jump-started improperly? Do you know what the vehicle was doing when the ECU stopped? You don't want to get a new ECU in there and the same thing happens!