Deciding on what form of who/whom to use is easy. Again, we replace proper nouns with pronouns and see how well a sentence reads:
"Who" connects to "he," "she" and "they."
"WhoM" connects to "hiM," "her" and "theM."
WHO knows what evil lurks in the hearts of men?
The Shadow [HE] knows.
Margo Lane is the only person who knows to WHOM the secret voice of The Shadow belongs.
It belongs to Lamont Cranston [HIM], a wealthy young man-about-town.