in the old days, it is mainly not common for boys to mix with girls – asian culture. So gesture between different sex were of course rude back then.
Nowadays, it’s mainly due to religion. But of course there are people who are open minded, so they will usually extend their hand first. Normally if the Malay are still holding on to their religion strongly a woman may not shake the hands of another man. So before you extend a hand for greetings or handshake to a lady look out for a sign first that could indicate that you better not shake the hand of this person. The best hint would be a woman wearing a hijab.