Function at 0x4013c3
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [ebp + 0x24], 0
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
jne 0x4015e7
mov eax, dword [ebp + 0x20]
push ebx
xor ecx, ecx
xor edx, edx
movzx ebx, byte [eax]
mov ch, byte [eax + 1]
inc eax
mov dword [ebp - 8], eax
or ebx, ecx
movzx ecx, byte [eax + 1]
inc eax
shl ecx, 0x10
or ebx, ecx
inc eax
movzx ecx, byte [eax]
shl ecx, 0x18
or ebx, ecx
inc eax
movzx ecx, byte [eax]
mov dh, byte [eax + 1]
inc eax
or ecx, edx
inc eax
xor edx, edx
mov dh, byte [eax + 1]
mov dl, byte [eax]
mov eax, dword [ebp + 0x10]
shl edx, 0x10
add eax, 0xfffffff8
or ecx, edx
test eax, eax
mov dword [ebp + 8], ecx
mov dword [ebp + 0xc], eax
jl 0x4014ef
lea ecx, [eax + 8]
shr ecx, 3
mov dword [ebp - 4], ecx
neg ecx
lea eax, [eax + ecx*8]
mov dword [ebp + 0xc], eax
movzx eax, byte [esi]
inc esi
xor ecx, ecx
xor edx, edx
push dword [ebp + 0x1c]
mov ch, byte [esi]
or eax, ecx
inc esi
push dword [ebp + 0x18]
movzx ecx, byte [esi]
shl ecx, 0x10
or eax, ecx
inc esi
push dword [ebp + 0x14]
movzx ecx, byte [esi]
shl ecx, 0x18
or eax, ecx
inc esi
mov dword [ebp + 0x24], eax
mov dword [ebp - 0x10], eax
movzx ecx, byte [esi]
mov dh, byte [esi + 1]
inc esi
or ecx, edx
inc esi
lea eax, [ebp - 0x10]
movzx edx, byte [esi]
shl edx, 0x10
or ecx, edx
inc esi
push eax
movzx edx, byte [esi]
shl edx, 0x18
or ecx, edx
inc esi
mov dword [ebp + 0x10], ecx
mov dword [ebp - 0xc], ecx
call fcn.00401291
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
xor ecx, dword [ebp + 8]
xor eax, ebx
add esp, 0x10
mov byte [edi], al
mov edx, eax
inc edi
shr edx, 8
mov byte [edi], dl
mov edx, eax
inc edi
mov ebx, dword [ebp + 0x24]
shr edx, 0x10
mov byte [edi], dl
inc edi
shr eax, 0x18
mov byte [edi], al
inc edi
mov eax, ecx
mov byte [edi], cl
inc edi
shr eax, 8
mov byte [edi], al
mov eax, ecx
inc edi
shr eax, 0x10
mov byte [edi], al
mov eax, dword [ebp + 0x10]
inc edi
mov dword [ebp + 8], eax
shr ecx, 0x18
mov byte [edi], cl
inc edi
dec dword [ebp - 4]
jne 0x40143e
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp eax, 0xfffffff8
je 0x4015b0
movzx eax, byte [esi]
inc esi
xor ecx, ecx
push dword [ebp + 0x1c]
xor edx, edx
mov ch, byte [esi]
or eax, ecx
inc esi
push dword [ebp + 0x18]
movzx ecx, byte [esi]
shl ecx, 0x10
or eax, ecx
inc esi
push dword [ebp + 0x14]
movzx ecx, byte [esi]
shl ecx, 0x18
or eax, ecx
inc esi
mov dword [ebp + 0x24], eax
mov dword [ebp - 0x10], eax
movzx ecx, byte [esi]
mov dh, byte [esi + 1]
inc esi
or ecx, edx
inc esi
xor edx, edx
lea eax, [ebp - 0x10]
mov dh, byte [esi + 1]
push eax
mov dl, byte [esi]
shl edx, 0x10
or ecx, edx
mov dword [ebp + 0x10], ecx
mov dword [ebp - 0xc], ecx
call fcn.00401291
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add esp, 0x10
xor eax, dword [ebp + 8]
lea edi, [edi + edx + 8]
add edx, 7
xor ecx, ebx
cmp edx, 7
ja case.default.0x401568
jmp dword [edx*4 + 0x4015eb]
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 eax, ecx
dec edi
shr eax, 0x10
mov byte [edi], al
mov eax, ecx
dec edi
shr eax, 8
mov byte [edi], al
mov byte [edi - 1], cl
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x24]
mov dword [ebp + 8], eax
mov ecx, eax
mov eax, dword [ebp + 0x20]
mov edx, ebx
shr edx, 8
mov byte [eax], bl
mov eax, dword [ebp - 8]
mov byte [eax], dl
mov edx, ebx
inc eax
shr edx, 0x10
mov byte [eax], dl
inc eax
shr ebx, 0x18
mov byte [eax], bl
inc eax
mov edx, ecx
pop ebx
mov byte [eax], cl
inc eax
shr edx, 8
mov byte [eax], dl
mov edx, ecx
inc eax
shr edx, 0x10
shr ecx, 0x18
mov byte [eax], dl
mov byte [eax + 1], cl
pop edi
pop esi
leave
ret