Function at 0x406ad0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x4b9b20]
xor eax, esp
mov dword [esp + 0x130], eax
cmp dword [ebp + 0xc], 0
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0x18], esi
jbe 0x406ce2
add eax, 8
mov dword [esp + 0x14], eax
jmp 0x406b10
mov al, byte [esi]
cmp al, 2
jne 0x406c34
mov eax, dword [esp + 0x14]
add esi, 4
mov ecx, 0x42
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
add eax, 0xfffffffa
mov edi, 0x80
jmp 0x406b44
mov dl, byte [esp + 0x10]
inc bl
movzx ecx, bl
mov bl, byte [esp + ecx + 0x38]
add dl, bl
movzx edx, dl
mov dword [esp + 0x10], edx
lea edx, [esp + edx + 0x38]
mov dword [esp + 0x2c], edx
mov dl, byte [edx]
mov byte [esp + ecx + 0x38], dl
mov esi, dword [esp + 0x2c]
add dl, bl
mov byte [esi], bl
movzx edx, dl
movzx edx, byte [esp + edx + 0x38]
xor byte [eax - 2], dl
inc cl
movzx ecx, cl
movzx edx, byte [esp + ecx + 0x38]
mov byte [esp + 0xf], bl
mov byte [esp + 0xf], dl
mov dl, byte [esp + 0x10]
add dl, byte [esp + 0xf]
movzx ebx, byte [esp + 0xf]
movzx edx, dl
lea esi, [esp + edx + 0x38]
mov dword [esp + 0x10], edx
mov dl, byte [esi]
mov byte [esp + ecx + 0x38], dl
add dl, byte [esp + 0xf]
mov byte [esi], bl
movzx edx, dl
movzx edx, byte [esp + edx + 0x38]
xor byte [eax - 1], dl
inc cl
movzx ecx, cl
movzx edx, byte [esp + ecx + 0x38]
mov byte [esp + 0xf], dl
mov dl, byte [esp + 0x10]
add dl, byte [esp + 0xf]
movzx ebx, byte [esp + 0xf]
movzx edx, dl
lea esi, [esp + edx + 0x38]
mov dword [esp + 0x10], edx
mov dl, byte [esi]
mov byte [esp + ecx + 0x38], dl
add dl, byte [esp + 0xf]
mov byte [esi], bl
inc cl
movzx edx, dl
movzx edx, byte [esp + edx + 0x38]
xor byte [eax], dl
movzx ebx, cl
mov dl, byte [esp + ebx + 0x38]
mov cl, byte [esp + 0x10]
add cl, dl
movzx ecx, cl
lea esi, [esp + ecx + 0x38]
mov dword [esp + 0x10], ecx
mov cl, byte [esi]
mov byte [esp + ebx + 0x38], cl
add cl, dl
movzx ecx, cl
mov byte [esi], dl
movzx edx, byte [esp + ecx + 0x38]
xor byte [eax + 1], dl
add eax, 4
sub edi, 1
jne 0x406b40
jmp 0x406ccc
cmp al, 3
je 0x406cd0
cmp al, 4
je 0x406cd0
cmp al, 5
je 0x406cd0
cmp al, 1
jne 0x406cd0
mov eax, dword [esi + 0x1e4]
mov ecx, dword [esi + 0x1e8]
mov edx, dword [esi + 0x1ec]
mov edi, dword [esi + 0x1f0]
mov esi, dword [esp + 0x14]
mov ebx, 0x20
xor eax, dword [esi - 8]
xor ecx, dword [esi - 4]
xor edx, dword [esi]
xor edi, dword [esi + 4]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
add eax, 4
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edi
call fcn.00408af0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov dword [esi - 8], eax
mov dword [esi - 4], ecx
mov dword [esi], edx
mov dword [esi + 4], edi
add esp, 8
add esi, 0x10
sub ebx, 1
jne 0x406c75
mov esi, dword [esp + 0x18]
add dword [esp + 0x14], 0x200
sub dword [ebp + 0xc], 1
jne 0x406b10
mov ecx, dword [esp + 0x13c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00466e70
mov esp, ebp
pop ebp
ret