Function at 0x591a50
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, ecx
cmp edi, 8
jb 0x591d2a
push ebp
mov ebp, edi
shr ebp, 3
xor edx, edx
mov dh, byte [esi + 2]
xor ecx, ecx
mov ch, byte [esi + 2]
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 - 9]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 4], dx
xor edx, edx
mov dh, byte [esi - 4]
xor ecx, ecx
mov ch, byte [esi - 4]
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 - 6]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 4], dx
xor edx, edx
mov dh, byte [esi - 1]
xor ecx, ecx
mov ch, byte [esi - 1]
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 - 3]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 2], dx
xor edx, edx
mov dh, byte [esi + 2]
xor dx, word [eax]
and dx, 0x7ff
xor ecx, ecx
mov ch, byte [esi + 2]
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]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax], dx
xor edx, edx
mov dh, byte [esi + 5]
xor ecx, ecx
mov ch, byte [esi + 5]
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 - 6]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 2], dx
xor edx, edx
mov dh, byte [esi - 1]
xor ecx, ecx
mov ch, byte [esi - 1]
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 - 3]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 2], dx
xor edx, edx
mov dh, byte [esi + 2]
xor ecx, ecx
mov ch, byte [esi + 2]
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]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax], dx
xor edx, edx
mov dh, byte [esi + 5]
add esi, 3
xor ecx, ecx
mov ch, byte [esi + 2]
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 - 3]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
sub ebp, 1
mov word [eax - 2], dx
jne 0x591a67
pop ebp
test edi, edi
jbe 0x591d8c
mov edi, edi
xor edx, edx
mov dh, byte [esi + 2]
xor ecx, ecx
mov ch, byte [esi + 2]
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 - 3]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
sub edi, 1
mov word [eax - 2], dx
jne 0x591d30
pop edi
pop esi
ret 4