The Las Vegas gunman who opened fire on concertgoers in October carefully prepared both for the attack and the investigation that would follow, according to hundreds of pages of court documents made public late Friday.

In the court documents, which detail some of the early days of the investigation, 64-year-old gunman Stephen Paddock is described as spending significant time amassing his weapons and stockpiling ammunition while also seeking “to thwart the eventual law enforcement investigation” into the deadliest mass shooting in modern American history.

Paddock, firing from his high-rise hotel suite at the Mandalay Bay resort, killed 58 people and injured hundreds at a country music festival on the Las Vegas Strip below before killing himself, police said.

The newly released documents do not answer the main question that has lingered since the Oct. 1 attack: What motivated Paddock to carry it out?

Though many details in 300-plus pages of documents — which were unsealed in response to requests from media organizations — were previously known, the filings capture both Paddock’s actions before the massacre and what law enforcement officials would do in the aftermath.

An FBI special agent wrote in one affidavit seeking a search warrant that “the methodical nature of the planning employed by Paddock, coupled with his efforts to undermine the preceding investigation, are factors indicative of a level of sophistication which is commonly found in mass casualty events such as this.”

Paddock bought the items used in his attack during the year leading up to it, the FBI said, and a large share of the ammunition and accessories he amassed appear to have been bought online. Federal authorities said Paddock used “anonymously attributed communications devices,” destroyed or concealed digital storage and had at least three cellphones in the hotel suite where he opened fire.

Two of the cellphones were unlocked and authorities were able to examine them, producing no significant information about Paddock’s plans or preparations, the FBI wrote. But the third phone, which has a Google operating system, was locked, and authorities said they could access the device only with help. The FBI special agent who signed the affidavit argued that because only that phone was locked, any information related to a criminal conspiracy would be found on it.

Authorities also said investigators searching Paddock’s hotel rooms at the Mandalay Bay Resort and Casino, along with his vehicle and homes, found more than 20 guns, hundreds of rounds of unused ammunition, suitcases partially filled with “pre-loaded high capacity magazines,” body armor, a homemade gas mask and explosive materials.

Paddock’s girlfriend, Marilou Danley, plays a central role in the court documents. Danley has denied knowing anything about Paddock’s plans. She was out of the country when the attack happened, and she said after the shooting that she was in the Philippines at the time because Paddock had bought her a ticket to visit family.

Danley spoke with FBI agents after returning to the U.S. She “corroborated much of what had been previously deduced by investigators,” an agent wrote in one filing, and remained “adamant” she was unaware of Paddock’s intentions. The FBI affidavit states that when investigators took a DNA sample from Danley, “she spontaneously stated that her fingerprints would likely be found on Paddock’s ammunition because she occasionally participated in loading magazines.”

The FBI document, filed six days after the shooting, says authorities had no evidence suggesting Danley had any criminal involvement in the massacre. But it notes that she remained “the subject of intensive review.”