Start at the main function. See how things get setup and walk through the code from there. Keep notes on the structure and flow of things (if any). There isn't really an easy way to do this unless it had been documented properly before. AstroGrep is a good Windows based tool that allows you to search within file so you could use it to find which files spit out a particular output to screen. Not sure what you mean by…
With 100M lines your process will take many years.