Function at 0x406620
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 - 0x5c], edx
mov dword [ebp - 0x60], 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 - 0x34], 0
mov dword [ebp - 8], 0
xor eax, eax
push fcn.004065d0
push ebp
push 0x459540
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, 3
xor edx, edx
jmp 0x4066c3
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 - 0x5c]
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 0x4066ed
mov eax, edx
shl eax, 2
mov esi, 1
mov ecx, eax
shl esi, cl
sub esi, 1
mov edi, esi
sar edi, 0x1f
mov eax, dword [ebp - 0x5c]
xor ecx, ecx
cmp edi, ecx
jl 0x406690
jg 0x4066ed
cmp esi, eax
jb 0x406690
cmp edx, 7
ja 0x40673c
lea eax, [edx - 1]
lea esi, [esi]
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 - 0x5c]
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 - 0x5c], esi
cmp eax, 7
jb 0x4066f8
nop
push 0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov ecx, 8
mov edx, 0x25
call fcn.0044dc60
mov eax, dword [ebp - 8]
call fcn.00405c30
test dword [ebp - 0x60], 0xffffffff
je 0x406770
mov edx, dword [ebp - 0x60]
xor edx, eax
mov eax, edx
mov esi, esi
mov edx, dword [ebp - 0x5c]
xor edx, eax
mov dword [ebp - 0x58], edx
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 ecx, dword [ebp - 0x58]
xor ebx, ebx
xor eax, ecx
xor edx, ebx
xor edx, edx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], edx
push 0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov ecx, 8
mov edx, 0xa
call fcn.0044dc60
mov eax, dword [ebp - 8]
call fcn.00405c30
mov esi, eax
mov ebx, edx
mov edx, dword [ebp - 0x58]
xor eax, eax
xor esi, edx
xor ebx, 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
xor esi, eax
xor ebx, edx
xor ebx, ebx
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x68], ebx
push 0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov ecx, 8
mov edx, 0x13
call fcn.0044dc60
mov eax, dword [ebp - 8]
call fcn.00405c30
mov esi, eax
mov ebx, edx
mov edx, dword [ebp - 0x58]
xor eax, eax
xor esi, edx
xor ebx, eax
push 0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov ecx, 8
mov edx, 0xa
call fcn.0044dc60
mov eax, dword [ebp - 8]
call fcn.00405c30
xor esi, eax
xor ebx, edx
xor ebx, ebx
mov dword [ebp - 0x6c], esi
mov edi, ebx
push 0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov ecx, 8
mov edx, 0x1c
call fcn.0044dc60
mov eax, dword [ebp - 8]
call fcn.00405c30
mov esi, eax
mov ebx, edx
mov edx, dword [ebp - 0x58]
xor eax, eax
xor esi, edx
xor ebx, eax
push 0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov ecx, 8
mov edx, 0x13
call fcn.0044dc60
mov eax, dword [ebp - 8]
call fcn.00405c30
xor esi, eax
xor ebx, edx
xor ebx, ebx
lea eax, [ebp - 8]
call fcn.004481a0
push 0
push dword [ebp - 0x54]
push dword [ebp - 0x50]
lea edx, [ebp - 0x34]
mov eax, 8
call fcn.0046a370
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
mov eax, 0x4b80a8
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x68]
shrd eax, edx, 0x10
shr edx, 0x10
push edx
push eax
lea edx, [ebp - 0x38]
mov eax, 4
call fcn.0046a370
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x28], eax
mov eax, 0x4b80a8
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x68]
and eax, 0xffff
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x3c]
mov eax, 4
call fcn.0046a370
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x20], eax
mov eax, 0x4b80a8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x6c]
mov edx, edi
shrd eax, edx, 0x10
shr edx, 0x10
push edx
push eax
lea edx, [ebp - 0x40]
mov eax, 4
call fcn.0046a370
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
mov eax, 0x4b80a8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x6c]
mov edx, edi
and eax, 0xffff
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x44]
mov eax, 4
call fcn.0046a370
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x10], eax
push ebx
push esi
lea edx, [ebp - 0x48]
mov eax, 8
call fcn.0046a370
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x30]
mov ecx, 9
lea eax, [ebp - 8]
call fcn.0044d210
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x4c]
call fcn.00469ff0
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.004065d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4