The option itself expires midnight on Friday, but practically it is no longer useful after the close of the exercise notification window at your brokerage or clearing firm, because you are not able to do anything with it after that time.
In the United States, in the absence of an instruction (regular or contrary), the OCC will exercise the option for your if the option is at least $0.01 in the money, but this is based on the closing price, not the price in the after hours market at the time. The closing price is not necessarily the price at 4PM, but the official closing print on the tape from the exchange where the underlying stock is listed. Sometimes this might be a few seconds after the close depending on the specialist or market maker and the complexity of the closing auction.
In theory if you held a call option that was in-the money at the close of the market, and then the price dropped in the after-hours market, you might end up with a position you didn't want, but you could see that and instead issue a contrary exercise instruction, provided your broker received it prior to their deadline.
Alternatively you could put a limit order as a hedge in the closing auction, in which case your order would help set the closing price.
It is hard to come up with scenarios where people could be "screwed with". These types of things are usually thoroughly reviewed by the broker dealer's regulators as part of their routine audits, looking for any such impropriety.