To my understanding, this is not much different than legal ramifications of appropriating once one's property that is now adrift defunct and abandoned in international waters. So, since my answer can not in any way be considered legally binding to any jurisdiction, I feel confident enough to give you my fair opinion on the matter. Do note though, I am not a lawyer.
In case of some equipment having been abandoned and serves no further use to its operator or owner, and it's not on anyone's territory, you will likely not meet any resistance and appropriation of it is left to one's own devices. You will most likely suffer costs far greater than having left such defunct equipment where it is and replacing its functionality with your own replacements anyway. But the far more interesting question, in my opinion, is whether you could charge its previous owner for any costs incurred for cleaning their mess up.
This will likely become a hot topic in the near future, with so many defunct space debris in orbits around the Earth, and threatening future missions of any nations. For the time being, no tax is being collected to fill coffers of any projects to clean the mess we make on an international level in these no man's lands. Not directly at least, but there are several project funded by various national and international bodies that try and establish how much of this space junk really is out there and tracking them.
On an international level, we do have some mechanisms in place by the United Nations (UN) resolutions calling for registration of space faring objects, the 1975 Convention on Registration of Objects Launched into Outer Space and the followed UN register collating this information as part of the Space Law, and some other conventions and agreements, but no real governing body short of the nations that signed these documents and agreed to respect them. For the time being, we have these treaties in place, that somewhat regulate our activities in outer space:
- The Outer Space Treaty - The 1967 Treaty on Principles Governing the Activities of States in the Exploration and Use of Outer Space, including the Moon and Other Celestial Bodies.
- The Rescue Agreement - The 1968 Agreement on the Rescue of Astronauts, the Return of Astronauts and the Return of Objects Launched into Outer Space.
- The Liability Convention - The 1972 Convention on International Liability for Damage Caused by Space Objects).
- The Registration Convention - The 1975 Convention on Registration of Objects Launched into Outer Space.
- The Moon Treaty - The 1979 Agreement Governing the Activities of States on the Moon and Other Celestial Bodies.
So we're only scratching the surface in terms of internationally agreeing on Space Law, and much of this is left to one's own devices. A lot of our space exploration missions are international endeavours though, and might have their own set of conventions in place. To return back to the questions though:
Short of having to respect a handful of international treaties and resolutions that draw rather broad strokes in painting the whole picture on legal ramifications of your actions in outer space, you're left free to do anything you want with defunct pieces of equipment left adrift or otherwise abandoned in international territories. You also report to the governing body of the nation your spaceship was registered to belong to, so even those treaties mentioned might apply differently to activities in outer space of different nations. Not all countries have signed all conventions.
So, pirates in space? Yes, we're certainly allowing that to happen as far as international laws go. It is however not even close to being as easy as arming a few men with guns, sticking them on a boat and telling them to go loot something. Lucky us.