In the U.S., you could run into problems right away when they try to set up your payroll withholding and the name you gave does not match the SSN you gave. It's not necessarily illegal (from the govt point of view) as long as the SSN is really your own and you are not trying to evade your legal and financial responsibilities (i.e. you are not trying to duck taxes or to pass yourself as another person, which would be fraud or identity theft), but the HR department and the IRS will insist that your tax paperwork reflect the name associated with your SSN. Lying about it could be grounds for rejection of application or termination of employment. Best to use your legal name on all official paperwork and use your preferred name anywhere a preferred name or nickname is discussed.
Additionally, with all the political controversy surrounding immigration, many employers now use the e-Verify check before hiring. If that throws up a mismatch between name and SSN, it's a pretty good bet that you will not get the job.
If the apparent gender of your name and the sex listed on your application do not match, it may be difficult to prove that is the reason you were not hired, which sux. However, making inappropriate comments about you or openly mocking your gender presentation could be regarded as harassment whether you get hired or not... if you have a witness or it gets caught on camera. They may not approve of your gender situation, but they are required to treat you with certain basic dignity just the same as if they didn't approve of your religion, handicap, or whatever else might be apparent from your appearance or mannerisms. If you are harassed in such a way, it's up to you to decide if it is worth talking to a lawyer or if you are better off just moving on to the next potential employer.
(Yeah, I just went through my employer's annual ethics and workplace harassment refresher training today.)