Lost funds using smart contact?

Hi.
I used the following smart contrat code in Remix: Copy Page | BdDXnB (copycode-paste.com).
I sent 0.5 ETH to the following contract: 0x51Dc6b071564FB058cbdC1F369fCc6ed58A7235c
However, the funds were sent from my Metamask wallet, but the balance always shows 0 on etherscan. I can see that that the funds were sent to another address through an internal transaction.
Now, I'm unable to get my funds back from this address.
Any idea how to do it and recover my funds back to my Metamask wallet?

There are currently only 6 transactions sent to that contract:

Only 3 of these 6 transactions include ETH in them (approximately 0.491 ETH in each one of them).

Only 1 of these 3 transactions has completed successfully:

And as you can see, that same amount of ETH was immediately transferred to wallet 0xa1b6b...b1F6B.

Thanks for the answer. But is there any way to get the funds back from wallet [b1F6B] to the contact A7235c?

Of course, if you have the private key of this wallet, then you can do that.