I want to reread this novel but forgot the title It's a about a male protagonist that transmigated with her love crush but betrayed after the lady become the empress. Then he reincarnated to seek revenge using the knowledge he has about the emperor to make her failed to climb the royal harem. Turned out the emperor likes him and keeps him close as an king's eunuch. Later the emperor made him a male consort and discovered that he is not an eunuch.
The novel you're looking for is this one - https://www.novelupdates.com/series/the-path-of-the-cannon-fodders-counterattack/
I think it's this one: https://www.novelupdates.com/series/the-path-of-the-cannon-fodders-counterattack/