You need to talk to the person you report to at your employer. Dragging the contracting agency into this at this point is not reasonable.
And, unfortunately, you may find that this is the situation and you have to live with it. My first job was very similar. I worked as an embedded C developer at a laser printer manufacturer, and I had to fix bugs in a giant codebase with basically no documentation on the software itself. It was a sink or swim situation, discouraging at first but once I got over the learning curve I did fine.