Start by observing the system from outside: what goes in, what comes out, and how it behaves in different situations. Then move inward, tracing data and logic step by step. Write down what you learn as you go, because the documentation you create may be the only documentation that exists. Most importantly, test your assumptions before making changes.