Is this a Pre-Foreclosure, Short Sale or has it already been foreclosed upon and is now owned by the bank?
If it's bank owned: What type of mortgage are you getting? If it is FHA the house must pass and "inspection". If the house clearly needs work (i.e. roof must have a minimum of 2 years of life on it, no mold, peeling paint even) that will prohibit an FHA mortgage then you probably will not be able to buy this house unless you get an FHA 203K fixer upper mortgage. Ask your lender about getting an FHA 203k mortgage and all of the details. A 203K will require 60 days to close so that may also prevent you from getting a contract on a bank-owned becuase they normally want it closed no later than 30 days. 30 days is not possible with a 203k
If it's a Short Sale then there could be a lot of things going on.... .