Function at 0x5a0800
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, ecx
cmp edi, 8
jb 0x5a0ad5
push ebp
mov ebp, edi
shr ebp, 3
xor edx, edx
mov dh, byte [esi]
xor ecx, ecx
mov ch, byte [esi]
add esi, 3
add eax, 2
add esi, 3
add eax, 2
xor dx, word [eax - 4]
add esi, 3
and dx, 0x7ff
xor dx, cx
mov word [eax - 4], dx
mov cl, byte [esi - 8]
and cl, 0xfc
movzx cx, cl
add cx, cx
and edx, 0xf81f
add cx, cx
add cx, cx
or cx, dx
mov word [eax - 4], cx
movzx edx, byte [esi - 7]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 4], dx
xor edx, edx
mov dh, byte [esi - 6]
xor ecx, ecx
mov ch, byte [esi - 6]
add eax, 2
xor dx, word [eax - 4]
and dx, 0x7ff
xor dx, cx
mov word [eax - 4], dx
mov cl, byte [esi - 5]
and cl, 0xfc
movzx cx, cl
add cx, cx
and edx, 0xf81f
add cx, cx
add cx, cx
or cx, dx
mov word [eax - 4], cx
movzx edx, byte [esi - 4]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 4], dx
xor edx, edx
mov dh, byte [esi - 3]
xor ecx, ecx
mov ch, byte [esi - 3]
xor dx, word [eax - 2]
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 2]
and cl, 0xfc
movzx cx, cl
add cx, cx
and edx, 0xf81f
add cx, cx
add cx, cx
or cx, dx
mov word [eax - 2], cx
movzx edx, byte [esi - 1]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 2], dx
xor edx, edx
mov dh, byte [esi]
xor dx, word [eax]
and dx, 0x7ff
xor ecx, ecx
mov ch, byte [esi]
xor dx, cx
mov word [eax], dx
mov cl, byte [esi + 1]
and cl, 0xfc
movzx cx, cl
add cx, cx
add cx, cx
and edx, 0xf81f
add cx, cx
or cx, dx
mov word [eax], cx
movzx edx, byte [esi + 2]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax], dx
xor edx, edx
mov dh, byte [esi + 3]
xor ecx, ecx
mov ch, byte [esi + 3]
add esi, 3
add eax, 2
add esi, 3
add eax, 2
xor dx, word [eax - 2]
add esi, 3
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 5]
and cl, 0xfc
movzx cx, cl
add cx, cx
add cx, cx
and edx, 0xf81f
add cx, cx
or cx, dx
mov word [eax - 2], cx
movzx edx, byte [esi - 4]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 2], dx
xor edx, edx
mov dh, byte [esi - 3]
xor ecx, ecx
mov ch, byte [esi - 3]
add eax, 2
xor dx, word [eax - 2]
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 2]
and cl, 0xfc
movzx cx, cl
add cx, cx
add cx, cx
and edx, 0xf81f
add cx, cx
or cx, dx
mov word [eax - 2], cx
movzx edx, byte [esi - 1]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 2], dx
xor edx, edx
mov dh, byte [esi]
xor ecx, ecx
mov ch, byte [esi]
xor dx, word [eax]
and dx, 0x7ff
xor dx, cx
mov word [eax], dx
mov cl, byte [esi + 1]
and cl, 0xfc
movzx cx, cl
add cx, cx
add cx, cx
and edx, 0xf81f
add cx, cx
or cx, dx
mov word [eax], cx
movzx edx, byte [esi + 2]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax], dx
xor edx, edx
mov dh, byte [esi + 3]
add esi, 3
xor ecx, ecx
mov ch, byte [esi]
add eax, 2
add eax, 2
add esi, 3
xor dx, word [eax - 2]
sub edi, 8
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 2]
and cl, 0xfc
movzx cx, cl
add cx, cx
add cx, cx
and edx, 0xf81f
add cx, cx
or cx, dx
mov word [eax - 2], cx
movzx edx, byte [esi - 1]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
sub ebp, 1
mov word [eax - 2], dx
jne 0x5a0817
pop ebp
test edi, edi
jbe 0x5a0b3a
lea esp, [esp]
xor edx, edx
mov dh, byte [esi]
xor ecx, ecx
mov ch, byte [esi]
add eax, 2
add esi, 3
xor dx, word [eax - 2]
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 2]
and cl, 0xfc
movzx cx, cl
add cx, cx
add cx, cx
and edx, 0xf81f
add cx, cx
or cx, dx
mov word [eax - 2], cx
mov dl, byte [esi - 1]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
sub edi, 1
mov word [eax - 2], dx
jne 0x5a0ae0
pop edi
pop esi
ret 4