Dear @Hassoni,
Thank you for reaching out to the community and for sharing your situation with us!
I found this thread on our platform with a similar question that has already been answered:
https://***.wefugees.de/800819/apply-asylum-while-booked-ticket-transit-visa-schengen-visa?show=800819#q800819
The answer is - Yes, you can apply for asylum. It looks like the country who issues you the visa would also be responsible for your asylum case (Malta).
Please let me know if you have any more questions.
All the best,
Isa