If it's in Delphi, compile with the debug DCUs and step through it using the debugger? Thats what I'd do.
The problem is not reproducable, so I guess I'll be stepping for ages before it finally happens. I need a way to check the state of my program when my firewall complains.

Maybe I should use "pause" or something.