The ECM is probably gone - they are pretty tough - but water on anything electronic is pretty much the end of it. Most of the core computer stuff (ECM, integration relays, sensors, etc) are pretty much dash level and lower. Hopefully everything else is OK - otherwise you'll have to look for a donor car to strip all the wiring off of - to get it through the dealer will cost more than what the car is worth.
Keep in mind that most states will have salvage or flood on the title - if you fix it up, you'll probably be hanging on to it for a while. Most people will not buy a car with a salvage title - little to no resale/trade-in value.
I know of a couple of guys that took salvage/flood vehicles - fixed them up and drove them as they were very cheap. The one guy had a 2001 Celica - ran OK for about of month until he had an accident. Airbag sensors were gone - ECM never picked up on it, they never deployed. Luckily he walked away from that one. The other guy spent more in electrical and rebuild work to the get the car working - that he could have saved a few grand just buying the same used car (non flooded) off a lot.
If it more than the ECM gone - you could try parting it out and getting your money's worth from it.
Good Luck.