A (boxed) copy of a game and a Steam account are two different things; one is a physical object, the other a contract between you and Valve. While this isn't and shouldn't be constructed as a proper legal advice, the following facts generally held true:
- You can sell or gift the goods (the copy of the game) to someone else. By doing so, they become the lawful owner of the goods, while you stop being one. Consequently, they gain all the associated usage rights of the goods (including the right to use it and the right to resell it), while you lose those same rights.
- You can't force Valve to transfer the contract between you and them. You can cancel the contract, as can they, for any reason at all and at any time, but they can't be forced to enter into contract concerning the same goods with someone else.
- In most jurisdiction around the world, having the right to use some goods includes the right to analyse, disassemble, manipulate and re-arrange parts of it. In case of software some of those rights are often restricted to the cases where such manipulation is needed to fix bugs or ensue the software is usable in the first place, and for intercompability reasons (analysing and decoding the protocols used, for example). One such case is when you need to "unlock" or "jailbreak" software to be able to use it or the device powered by it after it was re-sold to you.
The consequence of it is that generally, you have the right to re-sell games with Steamworks, and the buyer has the right to break the DRM if that's needed to use the game, but he won't have the right to use any of the Steam-provided services like automatic patches, achievements, IM, in-game browser, or (often) multiplayer capabilities.