Function at 0x1013dc90
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x30]
xor ebx, ebx
xor eax, eax
xor ecx, ecx
mov bl, byte [ebp]
mov ah, byte [ebp + 1]
inc ebp
or ebx, eax
inc ebp
xor edx, edx
xor eax, eax
push esi
mov cl, byte [ebp]
mov dl, byte [ebp + 1]
shl ecx, 0x10
or ebx, ecx
inc ebp
shl edx, 0x18
mov al, byte [ebp + 1]
or ebx, edx
inc ebp
xor ecx, ecx
inc ebp
xor edx, edx
push edi
mov dword [esp + 0x14], ebx
mov ch, byte [ebp]
mov dl, byte [ebp + 1]
or eax, ecx
inc ebp
shl edx, 0x10
or eax, edx
mov edx, dword [esp + 0x34]
inc ebp
xor ecx, ecx
mov cl, byte [ebp]
shl ecx, 0x18
or eax, ecx
lea ecx, [edx - 8]
inc ebp
mov dword [esp + 0x10], eax
test ecx, ecx
mov dword [esp + 0x38], ebp
mov dword [esp + 0x34], ecx
jl 0x1013deec
lea eax, [ecx + 8]
mov esi, dword [esp + 0x30]
shr eax, 3
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
neg eax
lea eax, [ecx + eax*8]
mov dword [esp + 0x34], eax
xor ecx, ecx
xor edx, edx
mov cl, byte [esi]
mov dh, byte [esi + 1]
inc esi
mov ebp, ecx
or ebp, edx
inc esi
xor eax, eax
xor ecx, ecx
mov al, byte [esi]
mov cl, byte [esi + 1]
shl eax, 0x10
or ebp, eax
inc esi
shl ecx, 0x18
or ebp, ecx
inc esi
xor ebx, ebx
xor edx, edx
mov bl, byte [esi]
mov dh, byte [esi + 1]
inc esi
or ebx, edx
inc esi
xor eax, eax
xor ecx, ecx
lea edx, [esp + 0x1c]
mov al, byte [esi]
mov cl, byte [esi + 1]
shl eax, 0x10
or ebx, eax
mov eax, dword [esp + 0x28]
inc esi
push edx
shl ecx, 0x18
or ebx, ecx
push eax
mov dword [esp + 0x24], ebp
inc esi
mov dword [esp + 0x28], ebx
call fcn.1013d800
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
xor eax, ecx
mov ecx, dword [esp + 0x28]
add esp, 8
xor ecx, edx
mov byte [edi], al
mov edx, eax
inc edi
shr edx, 8
mov byte [edi], dl
mov edx, eax
inc edi
mov dword [esp + 0x14], ebp
shr edx, 0x10
mov byte [edi], dl
inc edi
shr eax, 0x18
mov byte [edi], al
inc edi
mov eax, ecx
mov edx, ecx
mov byte [edi], cl
inc edi
shr eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x18]
inc edi
mov dword [esp + 0x10], ebx
shr edx, 0x10
mov byte [edi], dl
inc edi
shr ecx, 0x18
mov byte [edi], cl
inc edi
dec eax
mov dword [esp + 0x18], eax
jne 0x1013dd1d
mov ebp, dword [esp + 0x38]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
cmp ecx, 0xfffffff8
je 0x1013dea9
xor eax, eax
xor ecx, ecx
mov al, byte [esi]
mov ch, byte [esi + 1]
inc esi
or eax, ecx
inc esi
xor edx, edx
xor ecx, ecx
mov dl, byte [esi]
mov cl, byte [esi + 1]
shl edx, 0x10
or eax, edx
inc esi
shl ecx, 0x18
or eax, ecx
inc esi
mov dword [esp + 0x1c], eax
xor eax, eax
mov al, byte [esi]
inc esi
xor edx, edx
xor ecx, ecx
mov dh, byte [esi]
mov ch, byte [esi + 2]
mov cl, byte [esi + 1]
or eax, edx
inc esi
lea edx, [esp + 0x1c]
shl ecx, 0x10
or ecx, eax
mov eax, dword [esp + 0x28]
push edx
push eax
mov dword [esp + 0x28], ecx
call fcn.1013d800
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
xor eax, edx
mov edx, dword [esp + 0x3c]
add esp, 8
xor ecx, ebx
lea edi, [edi + edx + 8]
add edx, 7
cmp edx, 7
ja case.default.0x1013de68
jmp dword [edx*4 + 0x1013defc]
mov edx, eax
dec edi
shr edx, 0x18
mov byte [edi], dl
mov edx, eax
dec edi
shr edx, 0x10
mov byte [edi], dl
mov edx, eax
dec edi
shr edx, 8
mov byte [edi], dl
dec edi
mov byte [edi], al
mov eax, ecx
dec edi
shr eax, 0x18
mov byte [edi], al
mov edx, ecx
dec edi
shr edx, 0x10
mov byte [edi], dl
mov eax, ecx
dec edi
shr eax, 8
mov byte [edi], al
mov byte [edi - 1], cl
mov eax, dword [esp + 0x10]
sub ebp, 8
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
jmp 0x1013ddea