Function at 0x402d20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
lea edi, [eax + 1]
mov dword [ebp - 4], edx
movzx edx, byte [eax]
mov esi, edi
mov ebx, ecx
mov dword [ebp - 0x14], edi
movzx eax, byte [esi]
movzx ecx, byte [esi + 3]
shl eax, 8
or edx, eax
movzx eax, byte [esi + 1]
shl eax, 0x10
or edx, eax
movzx eax, byte [esi + 2]
shl eax, 0x18
or edx, eax
movzx eax, byte [esi + 4]
shl eax, 8
or ecx, eax
mov dword [ebp - 0xc], edx
movzx eax, byte [esi + 5]
mov dword [ebp - 8], ecx
movzx ecx, byte [esi + 6]
mov esi, dword [ebp + 8]
shl ecx, 8
or ecx, eax
shl ecx, 0x10
or dword [ebp - 8], ecx
add esi, 0xfffffff8
js 0x402e72
lea eax, [esi + 8]
shr eax, 3
mov dword [ebp + 8], eax
neg eax
lea esi, [esi + eax*8]
mov dword [ebp - 0x18], esi
nop dword [eax]
movzx eax, byte [ebx + 1]
lea ecx, [ebp - 0x20]
movzx edi, byte [ebx]
movzx esi, byte [ebx + 4]
shl eax, 8
or edi, eax
mov edx, dword [ebp + 0xc]
movzx eax, byte [ebx + 2]
push dword [ebp + 0x14]
shl eax, 0x10
push dword [ebp + 0x10]
or edi, eax
movzx eax, byte [ebx + 3]
shl eax, 0x18
or edi, eax
movzx eax, byte [ebx + 5]
shl eax, 8
or esi, eax
mov dword [ebp - 0x10], edi
movzx eax, byte [ebx + 6]
shl eax, 0x10
or esi, eax
mov dword [ebp - 0x20], edi
movzx eax, byte [ebx + 7]
add ebx, 8
shl eax, 0x18
or esi, eax
mov dword [ebp - 0x1c], esi
call fcn.00402c10
mov eax, dword [ebp - 4]
add esp, 8
mov ecx, dword [ebp - 0x20]
xor ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x1c]
mov byte [eax], cl
inc eax
xor edx, dword [ebp - 8]
mov dword [ebp - 4], eax
mov eax, ecx
mov edi, dword [ebp - 4]
inc dword [ebp - 4]
shr eax, 8
mov byte [edi], al
mov eax, ecx
mov edi, dword [ebp - 4]
shr eax, 0x10
shr ecx, 0x18
mov byte [edi], al
mov eax, edi
inc eax
mov dword [ebp - 4], eax
mov byte [eax], cl
mov ecx, eax
mov eax, edx
shr eax, 8
mov byte [ecx + 1], dl
mov byte [ecx + 2], al
mov eax, edx
shr eax, 0x10
shr edx, 0x18
mov byte [ecx + 3], al
mov byte [ecx + 4], dl
add ecx, 5
sub dword [ebp + 8], 1
mov edx, dword [ebp - 0x10]
mov dword [ebp - 4], ecx
mov ecx, esi
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ecx
jne 0x402da0
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
jmp 0x402e75
mov ecx, dword [ebp - 8]
cmp esi, 0xfffffff8
je 0x402f40
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx]
movzx ecx, byte [ebx + 4]
shl eax, 8
or edx, eax
movzx eax, byte [ebx + 2]
push dword [ebp + 0x14]
shl eax, 0x10
push dword [ebp + 0x10]
or edx, eax
movzx eax, byte [ebx + 3]
shl eax, 0x18
or edx, eax
movzx eax, byte [ebx + 5]
shl eax, 8
or ecx, eax
mov dword [ebp - 0x18], edx
movzx eax, byte [ebx + 6]
mov dword [ebp + 8], ecx
movzx ecx, byte [ebx + 7]
shl ecx, 8
or ecx, eax
mov dword [ebp - 0x20], edx
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
shl ecx, 0x10
or eax, ecx
lea ecx, [ebp - 0x20]
mov dword [ebp + 8], eax
mov dword [ebp - 0x1c], eax
call fcn.00402c10
mov eax, dword [ebp - 4]
add esp, 8
mov edx, dword [ebp - 0x20]
add eax, 8
mov ebx, dword [ebp - 0x1c]
add eax, esi
xor edx, dword [ebp - 0xc]
add esi, 7
xor ebx, dword [ebp - 8]
cmp esi, 7
ja case.default.0x402efd
jmp dword [esi*4 + 0x402f7c]
dec eax
mov ecx, ebx
shr ecx, 0x18
mov byte [eax], cl
dec eax
mov ecx, ebx
shr ecx, 0x10
mov byte [eax], cl
dec eax
mov ecx, ebx
shr ecx, 8
mov byte [eax], cl
dec eax
mov byte [eax], bl
dec eax
mov ecx, edx
shr ecx, 0x18
mov byte [eax], cl
dec eax
mov ecx, edx
shr ecx, 0x10
mov byte [eax], cl
dec eax
mov ecx, edx
shr ecx, 8
mov byte [eax], cl
mov byte [eax - 1], dl
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x18]
mov byte [eax], dl
mov eax, edx
shr eax, 8
mov byte [edi], al
mov eax, edx
shr eax, 0x10
mov byte [edi + 1], al
mov eax, ecx
shr edx, 0x18
mov byte [edi + 2], dl
mov byte [edi + 3], cl
shr eax, 8
mov byte [edi + 4], al
mov eax, ecx
shr eax, 0x10
mov byte [edi + 5], al
shr ecx, 0x18
mov byte [edi + 6], cl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret