Does anyone happen to know the algorithm for history retrieval in #Windows cmd.e...

@buherator@infosec.place

Does anyone happen to know the algorithm for history retrieval in #Windows cmd.exe?

After *nix it feels like it was designed by a madman, although I'm sure there's some logic to it that I fail to appreciate.