It is descended from Old Englishwé, which was pronounced something like way in modern English. It is related to Germanwir, Dutchwij, Frisianwy, and Danishvi.
... refers to the fourth case--that is, the dative). Incidentally, "tatpurusha" is a tatpurusha ("this man"--meaning someone's agent), while "caturtitatpurusha" is ...