President Donald Trump speaks while meeting with NATO Secretary General Jens Stoltenberg in the Oval Office at the White House in Washington, U.S., April 2, 2019.

A Chinese woman has been charged with making a false statement to the U.S. Secret Service after entering President Donald Trump's Mar-a-Lago resort in Florida on bogus pretenses, while carrying a thumb drive that contained "malicious software," court documents revealed Tuesday.

A criminal complaint says the woman, Chinese national Yujing Zhang, claimed that she had been sent there by a Chinese man whom she had only spoken with via an instant messaging platform to attend an event at Mar-a-Lago and try "to speak with a member of the President's family about Chinese and American foreign economic relations."

Zhang, 32, was on the luxury Palm Beach property on Saturday, at around 12:15 p.m., while Trump was playing golf at his Trump International course nearby.

She had passed by at least five Secret Service agents and arriving in the main reception area of Mar-a-Lago, later claimed to the Secret Service that she was there to attend a "United Nations Friendship Event" between China and the United States, the complaint said.

That event did not exist, according to the complaint written by a Secret Service agent, which was signed by a judge in U.S. District Court in Southern Florida.

However, the Miami Herald reported that Zhang may have meant say she planned on attending one of two events scheduled there by Li "Cindy" Yang, a Florida massage parlor entrepreneur who has been identified as running a business that offered to sell access to Trump and his family. Yang's "International Leaders Elite Forum" planned for Saturday at Mar-a-Lago did not take place after the Herald reported that Yang had taken photos with Trump and other leading Republicans that she used to advertise her access. The other event, "Safari Night," also was cancelled.

Yang years ago owned a massage parlor where New England Patriots owner Robert Kraft allegedly received sexual services for money in January. Kraft has been charged with soliciting prostitution in that case, and has pleaded not guilty.

The complaint against Zhang noted she had traveled past several signs clearly stating that the areas she was visiting were under the jurisdiction of the Secret Service and that "persons entering without lawful authority are subject to arrest and prosecution."

Zhang was found to be carrying four mobile phones, a laptop computer, an external hard drive, and a thumb drive.

"A preliminary forensic examination of the thumb drive determined it contained malicious software," the complaint said.

The Secret Service said it does not decide who's invited or welcome at Mar-a-Lago, and the investigation was "ongoing." A spokesman for Mar-a-Lago did not immediately respond to CNBC when asked for comment.

Zhang, who is being held in federal custody pending a hearing, was charged with making false statements to a federal officer, and entering or remaining in a restricted building or grounds. She faces up to five years in prison and a fine topping $250,000 if convicted.

A lawyer for Zhang did not immediately return a request for comment.

Trump was at Trump International golfing from 9:37 a.m. to 3:45 p.m. on Saturday, while Zhang arrived at Mar-a-Lago, gained entrance to it, and was detained by the Secret Service. He returned to Mar-a-Lago at around 4 p.m. Saturday.

According to the criminal complaint, Zhang was admitted to Mar-a-Lago after passing through a Secret Service checkpoint, where she presented an agent with two People's Republic of China passports bearing her name and photograph, the complaint said.

After a Secret Service agent confirmed the identification, Mar-a-Lago security was unable to verify that Zhang was on the access list for the resort. Zhang said she was going to the pool, and a resort manager then told security that "Zhang is the last name of a member at the Mar-a-Lago club," the complaint said.

When Zhang was asked if the actual member of the club was her father, "she did not give a definitive answer," according to the complaint.

Zhang was allowed by Mar-a-Lago security to enter the property "due to a potential language barrier issue," the complaint said.

She was then picked up in a golf cart shuttle by a Mar-a-Lago valet driver, who asked her where she intended to go.

"Zhang responded that she didn't know where she wanted to go," the complaint said. "The valet driver then proceeded to drive her to the main reception area."

The complaint said that after passing by three other Secret Service agents, Zhang exited the golf cart at a Secret Service magnetometer checkpoint, where she spent about 20 seconds "reading the restricted access signage" before passing through the magnetometer.

She then went into the main reception area of the club, according to the complaint.

A receptionist asked her "several times" when she was there, and Zhang "finally responded that she was there for a United Nations Chinese American Association event later in the evening," the complaint said.

"The Receptionist knew this event did not exist on property as she has a complete list of events," the complaint said.

A Secret Service agent then was notified after the receptionist checked all of the access lists for Mar-a-Lago to confirm whether Zhang was approved to be on the property, and found that she was not authorized, according to the complaint.

Zhang reiterated to the agent that she was there for the alleged United Nations event, and showed a document, written in Chinese, that supposedly was her invitation to that non-existent function, the complaint said.

The agent who wrote the complaint noted that Zhang's claim conflicted with her original claim to the first Secret Service agent, whom she told she was going to the pool. No swimming apparel was later found to be in Zhang's possession.

Zhang was then taken off the property for further interviews.

According to the complaint, Zhang "freely and without difficulty" talked to the agent in English.

The agent told her that she was not allowed on the resort grounds, and that she had "unlawfully gained access onto the protected grounds," the complaint said.

"During this interview, Zhang then became verbally aggressive with agents and she was detained and transported back to the" Secret Service's resident office in West Palm Beach, according to the complaint.

At that office, Zhang was advised of her Miranda rights, and she told agents that a Chinese friend named "Charles" had "told her to travel from Shanghai, China, to Palm Beach, Florida, to attend this event and to speak with a member of the President's family about Chinese and American foreign economic relations," the complaint said.

Zhang claimed that "she has only spoken" with Charles via WeChat, the most popular instant messaging platform in China, according to the complaint.

The Miami Herald noted that Yang, the massage parlor operator, has worked with a Chinese event promoter named Charles Lee to promote Safari Night and "other galas and political fundraisers featuring the Trump family at Mar-a-Lago over the past year."

The complaint said that Zhang stated during her interview with the Secret Service that she had not told "agents at the main checkpoint that she was going to the pool," the complaint said.

Here's the statement from the Secret Service on security at Mar-a-Lago: