The sentence is written from the viewpoint of Harry, and と is for quotation, so it's reasonable to presume that the conditional clause is the contents of Harry's thoughts. From this presumption, I think it's not so hard to supplement "thinking" to the clause and get the result "thinking 'if/when Malfoy shows a sign that he has found it, then...'".
Thinking "if/when Malfoy shows a sign that he has found it, then...", Harry kept his eyes also on Malfoy.
How about this interpretation?