It is not only used with "wanted". Just about any verb, I think.
I would have read the book yesterday, had I known it was due today / , but I decided to go to the zoo instead.

I would have...