Function at 0x59dc90
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, ecx
cmp edi, 8
jb 0x59df65
push ebp
mov ebp, edi
shr ebp, 3
xor edx, edx
mov dh, byte [esi]
xor ecx, ecx
mov ch, byte [esi]
add esi, 4
add eax, 2
add esi, 4
add eax, 2
xor dx, word [eax - 4]
add esi, 4
and dx, 0x7ff
xor dx, cx
mov word [eax - 4], dx
mov cl, byte [esi - 0xb]
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 - 0xa]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
mov word [eax - 4], dx
xor edx, edx
mov dh, byte [esi - 8]
xor ecx, ecx
mov ch, byte [esi - 8]
add eax, 2
xor dx, word [eax - 4]
and dx, 0x7ff
xor dx, cx
mov word [eax - 4], dx
mov cl, byte [esi - 7]
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 - 4]
xor ecx, ecx
mov ch, byte [esi - 4]
xor dx, word [eax - 2]
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 3]
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 - 2]
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 + 4]
xor ecx, ecx
mov ch, byte [esi + 4]
add esi, 4
add eax, 2
add esi, 4
add eax, 2
xor dx, word [eax - 2]
add esi, 4
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 7]
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 - 4]
xor ecx, ecx
mov ch, byte [esi - 4]
add eax, 2
xor dx, word [eax - 2]
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 3]
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 - 2]
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 + 4]
add esi, 4
xor ecx, ecx
mov ch, byte [esi]
add eax, 2
add eax, 2
add esi, 4
xor dx, word [eax - 2]
sub edi, 8
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 3]
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 - 2]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
sub ebp, 1
mov word [eax - 2], dx
jne 0x59dca7
pop ebp
test edi, edi
jbe 0x59dfca
lea esp, [esp]
xor edx, edx
mov dh, byte [esi]
xor ecx, ecx
mov ch, byte [esi]
add eax, 2
add esi, 4
xor dx, word [eax - 2]
and dx, 0x7ff
xor dx, cx
mov word [eax - 2], dx
mov cl, byte [esi - 3]
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 - 2]
shr dl, 3
movzx dx, dl
and ecx, 0xffe0
or dx, cx
sub edi, 1
mov word [eax - 2], dx
jne 0x59df70
pop edi
pop esi
ret 4