Thanks for your query.Based on the facts that you have posted it appears that you have
developed Ring worm infection
over thigh ,legs and genitals.
Please clean the entire area with warm water twice daily and apply anti fungal jelly like Meconozole twice daily along with anti fungal medication
like Fluconozole orally.
Get prescription of medications from your family Physician.
Ensure to wash your inner wares in boiling hot water mixed with antiseptic lotion Dettol
It should get cured within a week,
It is unlikly to be STD.