First, while Imazu came in, the voice of the tengu hears out. Second, Shimomura came in after Imazu, before that someone came in, he should see Ran because she uses the rear entrance, the culprit says that it was missed so he didn't see her. Also, the culprit was the one who swinged the body, so that they would think that he committed suicide. The open cave was Shimomura, Kogoro, Ran and Conan met. The culprit used this advantage. After he committed the crime, he used the open cave to get out. And entered the cave after Ran goes back into the guest house. He broke the wood so that they would think that it breaks because of Mayama's weight. The weapon was found in someone's bag. He strangled him before doing this trick, and used those rock to climb. Before, it was not open, so he could kill Mayama before Hirai, Kogoro, Ran and Conan come in. The pants was sliced off because of the broken wood. Before, Conan thinks that the body would fall carelessly, the body would have many wounds, but the fall was straight to the ground.
Before Mayama was killed, he had talked to someone. Imazu says that he was blackmailed by someone. Imazu was investigating who was the caller at that time. After several minutes, he didn't come out. So Imazu decided to give up in investigating. He was supposed to blame Imazu and the mask that was missing.
The suspects were Hirai, Imazu and Shimomura, Hirai was out of the suspect, it is because they go with Conan, Ran and Kogoro together in the cave.
The culprit is Shouzo Shimomura. After the crime was committed, he realize that Hirai was opening the cave in 10 a.m, he thought that Hirai would call the police, but here's no service, so he has the time to commit it. His motive is he can't forgive the mayor, because the mayor was turning the mountain into a landfill. He says that he broke his own city.
After the case, they had go back to Tokyo.