Does passing wind from the anus affect ritual purity?
Ablution is nullified by the passing of wind from the anus, but washing the anus is not required as wind leaves no impurity.
What is the ruling on one who sees moisture on his clothes and doubts whether it is semen or pre-seminal fluid (madhy)?
Whoever finds moisture upon waking from sleep and doubts whether it is semen or madhy, and cannot distinguish between them, he may choose between them and act according to his choice. If he wishes, he can consider it semen and perform the ritual bath, or consider it madhy, perform ablution, and wash what it has soiled. This is because if he fulfills the requirement of one of them, he is definitively free from it, and the default is his innocence from the other. And Allah the Almighty knows best.
Is the marriage, which lacks a valid legal contract, a guardian, and a court registration, valid?
It is incumbent that a valid marriage contract be concluded in the presence of a guardian and two trustful witnesses, and it should be registered in the court to protect the rights of the wife. Actually, a valid marriage contract is what differentiates between sound marriage and fornication.
What is the semi-circular structure attached to the Holy Kabah?
The semi-circular structure attached to the Holy Kabah is Hijr Al-Kabah (is a low wall originally part of the Kabah) and passing behind it is an obligation while making Tawaf because it is a part of the Holy Kabah. And Allah Knows Best.