A participle, a gerund, or an infinitive May be used as a noun substitute. The infinitive functions either as an adjective or as a noun.
The phrase that indicated a lost in thought feel is the "Midnight shakes the memory". It means that his train of thought is going double time in the dark or at night.
I think it is present perfect.
Answer: 2 and 5
Explanation: Part 1 is only a description of the action, and parts 3 and 4 introduce details from the character's past that enrich the narrative, but don't build anticipation. Part 2 introduces some anticipation in the last words "...he lay perfectly quiet and listened," which evokes in the reader a feeling of expectation for a relevant piece of auditory information. Part 5 has an even more intense effect, concentrated in the words "...he might never know again," which project an ominous feeling that events are about to unfold in the character's life.
To explain Or go further into detail to your understanding.