RC4 is an easy to implement bidirectional stream cipher algorithm. Similar to XOR, its ease of use and implementation make it a popular choice for malware authors.
Several open source implementations of RC4 are available:
https://github.com/droberson/ELFcrypt/blob/master/ELFcrypt.h#L216
The undocumented Windows NTAPI SystemFunction032 and SystemFunction033 provide implementations of the RC4 algorithm. https://source.winehq.org/WineAPI/SystemFunction032.html