Function at 0x406a20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x6c]
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 4]
call fcn.0044ce50
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
xor eax, eax
push fcn.004069d0
push ebp
push 0x459540
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, 3
xor edx, edx
jmp 0x406acb
mov eax, edx
shl eax, 2
mov esi, 1
mov ecx, eax
mov eax, esi
shl eax, cl
sub eax, 1
mov ecx, eax
mov eax, dword [ebp - 0x60]
shr eax, cl
lea ecx, [eax + ebx]
lea eax, [edx + 1]
and eax, 0xff
movzx eax, byte [eax + 0x4b8090]
xor ecx, eax
mov ebx, ecx
add edx, 1
cmp edx, 9
jae 0x406af7
mov eax, edx
shl eax, 2
mov esi, 1
mov ecx, eax
mov eax, esi
shl eax, cl
sub eax, 1
mov ecx, eax
sar ecx, 0x1f
mov esi, dword [ebp - 0x60]
xor edi, edi
cmp ecx, edi
jl 0x406a98
jg 0x406af7
cmp eax, esi
jb 0x406a98
cmp edx, 7
ja 0x406b44
lea eax, [edx - 1]
nop
add eax, 1
mov ecx, eax
sub ecx, edx
shl ecx, 2
mov esi, 1
shl esi, cl
sub esi, 1
mov ecx, esi
mov esi, dword [ebp - 0x60]
shr esi, cl
add esi, ebx
lea ecx, [eax + 1]
and ecx, 0xff
movzx ecx, byte [ecx + 0x4b8090]
xor esi, ecx
mov ebx, esi
and esi, 0xf
mov ecx, eax
shl ecx, 2
shl esi, cl
add dword [ebp - 0x60], esi
cmp eax, 7
jb 0x406b00
nop
mov eax, 0x10000
call fcn.004534b0
mov ebx, eax
shl ebx, 0x10
mov eax, 0x10000
call fcn.004534b0
or ebx, eax
mov dword [ebp - 0x54], ebx
mov eax, dword [ebp - 0x60]
xor eax, dword [ebp - 0x54]
mov esi, eax
push 0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov ecx, 8
mov edx, 1
call fcn.0044dc60
mov eax, dword [ebp - 8]
call fcn.00405c30
mov ebx, esi
xor ecx, ecx
xor eax, ebx
xor edx, ecx
xor edx, edx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x5c], edx
push 0
push 0
lea eax, [ebp - 8]
call fcn.004481a0
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
mov ecx, 4
mov edx, 0xf
call fcn.0044dc60
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
mov ecx, 4
mov edx, 0xa
call fcn.0044dc60
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 8]
mov ecx, ebx
call fcn.0044cf80
mov eax, dword [ebp - 8]
call fcn.00405c30
mov ecx, esi
xor ebx, ebx
xor eax, ecx
xor edx, ebx
xor eax, dword [ebp - 0x58]
xor edx, dword [ebp - 0x5c]
xor edx, edx
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x68], edx
push 0
push 0
lea eax, [ebp - 0x10]
call fcn.004481a0
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
mov ecx, 4
mov edx, 0x19
call fcn.0044dc60
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov ecx, 4
mov edx, 0x14
call fcn.0044dc60
mov edx, dword [ebp - 8]
lea eax, [ebp - 0x10]
mov ecx, ebx
call fcn.0044cf80
mov eax, dword [ebp - 0x10]
call fcn.00405c30
mov ecx, esi
xor ebx, ebx
xor eax, ecx
xor edx, ebx
xor eax, dword [ebp - 0x64]
xor edx, dword [ebp - 0x68]
xor edx, edx
mov dword [ebp - 0x6c], eax
mov edi, edx
push 0
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
mov ecx, 8
mov edx, 0x1d
call fcn.0044dc60
mov eax, dword [ebp - 0x10]
call fcn.00405c30
mov ebx, esi
xor ecx, ecx
xor eax, ebx
xor edx, ecx
xor eax, dword [ebp - 0x6c]
xor edx, edi
xor edx, edx
mov esi, eax
mov ebx, edx
test dword [ebp - 0x50], 0xffffffff
je 0x406cb4
mov eax, dword [ebp - 0x50]
xor eax, dword [ebp - 0x54]
mov dword [ebp - 0x54], eax
mov esi, esi
push 0
push dword [ebp - 0x5c]
push dword [ebp - 0x58]
lea edx, [ebp - 0x38]
mov eax, 8
call fcn.0046a370
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x34], eax
mov eax, 0x4b80a8
mov dword [ebp - 0x30], eax
push dword [ebp - 0x68]
push dword [ebp - 0x64]
lea edx, [ebp - 0x3c]
mov eax, 8
call fcn.0046a370
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
mov eax, 0x4b80a8
mov dword [ebp - 0x28], eax
push edi
push dword [ebp - 0x6c]
lea edx, [ebp - 0x40]
mov eax, 8
call fcn.0046a370
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x24], eax
mov eax, 0x4b80a8
mov dword [ebp - 0x20], eax
push ebx
push esi
lea edx, [ebp - 0x44]
mov eax, 8
call fcn.0046a370
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x1c], eax
mov eax, 0x4b80a8
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x54]
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x48]
mov eax, 8
call fcn.0046a370
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x4c]
mov ecx, 8
call fcn.0044d210
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.004069d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4