Function at 0x405850
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1664
call fcn.00410870
push ebx
xor ebx, ebx
push 0x63
lea eax, [esp + 0x109]
push ebx
push eax
mov byte [esp + 0x110], bl
call fcn.0040e7a0
push 0xff
lea ecx, [esp + 0x15]
push ebx
push ecx
call fcn.0040e7a0
push 0x3ff
lea edx, [esp + 0x285]
push ebx
push edx
mov byte [esp + 0x28c], bl
call fcn.0040e7a0
push 0xff
lea eax, [esp + 0x191]
push ebx
push eax
mov byte [esp + 0x198], bl
call fcn.0040e7a0
push 0xfff
lea ecx, [esp + 0x69d]
push ebx
push ecx
mov byte [esp + 0x6a4], bl
call fcn.0040e7a0
mov eax, dword [0x419f38]
add eax, 7
lea edx, [esp + 0x140]
add esp, 0x3c
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x4058e6
push esi
lea edx, [esp + 0x108]
push 0x2f
push edx
call fcn.00406820
add esp, 8
cmp eax, ebx
je 0x40591e
lea esi, [esp + 0x16c]
mov ecx, eax
sub esi, eax
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
cmp dl, bl
jne 0x405912
mov byte [eax], bl
mov eax, dword [0x416638]
mov ecx, dword [0x41663c]
mov edx, dword [0x416640]
mov dword [esp + 8], eax
mov eax, dword [0x416644]
mov dword [esp + 0xc], ecx
mov cl, byte [0x416648]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov byte [esp + 0x18], cl
lea eax, [esp + 8]
cmp byte [esp + 8], bl
je 0x40596a
mov ecx, eax
lea ebx, [ebx]
xor byte [eax], 0xf
inc ecx
mov eax, ecx
cmp byte [ecx], bl
jne 0x405960
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 8]
mov byte [esp + eax + 0x26c], cl
inc eax
cmp cl, bl
jne 0x405970
lea eax, [esp + 0x26c]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405988
mov dl, byte [0x415c8a]
push ebp
mov bp, word [0x415c88]
push edi
mov ecx, 0x15
mov esi, 0x416650
lea edi, [esp + 0x10]
mov word [eax], bp
rep movsd dword es:[edi], dword [esi]
mov byte [eax + 2], dl
lea eax, [esp + 0x10]
cmp byte [esp + 0x10], bl
je 0x4059cb
mov ecx, eax
xor byte [eax], 0xf
inc ecx
mov eax, ecx
cmp byte [ecx], bl
jne 0x4059c1
lea eax, [esp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4059d1
lea edi, [esp + 0x274]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4059e2
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x274]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405a02
movzx ecx, byte [0x415c8a]
mov edx, dword [0x4166a4]
mov word [eax], bp
mov byte [eax + 2], cl
mov eax, dword [0x4166a8]
movzx ecx, byte [0x4166ac]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov byte [esp + 0x18], cl
lea eax, [esp + 0x10]
cmp dl, bl
je 0x405a4a
mov ecx, eax
nop
xor byte [eax], 0xf
inc ecx
mov eax, ecx
cmp byte [ecx], bl
jne 0x405a40
lea eax, [esp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405a50
lea edi, [esp + 0x274]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405a61
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x274]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405a81
mov dl, byte [0x415c8a]
mov ecx, dword [0x4166b4]
mov word [eax], bp
mov byte [eax + 2], dl
mov eax, dword [0x4166b0]
mov edx, dword [0x4166b8]
mov dword [esp + 0x10], eax
mov eax, dword [0x4166bc]
mov dword [esp + 0x14], ecx
mov cl, byte [0x4166c0]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
mov byte [esp + 0x20], cl
lea eax, [esp + 0x10]
cmp byte [esp + 0x10], bl
je 0x405adb
mov ecx, eax
xor byte [eax], 0xf
inc ecx
mov eax, ecx
cmp byte [ecx], bl
jne 0x405ad1
lea eax, [esp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405ae1
lea edi, [esp + 0x274]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405af2
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x274]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405b12
mov dl, byte [0x415c8a]
mov ecx, 0xc
mov esi, 0x4166c4
lea edi, [esp + 0x10]
mov word [eax], bp
rep movsd dword es:[edi], dword [esi]
mov byte [eax + 2], dl
lea eax, [esp + 0x10]
cmp byte [esp + 0x10], bl
je 0x405b4c
mov ecx, eax
xor byte [eax], 0xf
inc ecx
mov eax, ecx
cmp byte [ecx], bl
jne 0x405b42
lea eax, [esp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405b52
lea edi, [esp + 0x274]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405b63
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x274]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405b83
movzx ecx, byte [0x415c8a]
mov edx, dword [0x4166f4]
mov word [eax], bp
mov byte [eax + 2], cl
mov eax, dword [0x4166f8]
mov ecx, dword [0x4166fc]
mov dword [esp + 0x14], eax
mov ax, word [0x416704]
mov dword [esp + 0x18], ecx
movzx ecx, byte [0x416706]
mov dword [esp + 0x10], edx
mov edx, dword [0x416700]
mov word [esp + 0x20], ax
mov dword [esp + 0x1c], edx
mov byte [esp + 0x22], cl
lea eax, [esp + 0x10]
cmp byte [esp + 0x10], bl
je 0x405beb
mov ecx, eax
xor byte [eax], 0xf
inc ecx
mov eax, ecx
cmp byte [ecx], bl
jne 0x405be1
lea eax, [esp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405bf1
lea edi, [esp + 0x274]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405c02
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x274]
pop edi
dec eax
pop ebp
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405c24
mov edx, dword [0x415c7c]
mov cl, byte [0x415c80]
mov dword [eax], edx
mov byte [eax + 4], cl
lea eax, [esp + 0x26c]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x405c45
mov dx, word [0x416008]
mov cl, byte [0x41600a]
mov esi, dword [esp + 0x1670]
mov word [eax], dx
mov byte [eax + 2], cl
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405c70
sub eax, edx
push esi
push eax
lea edx, [esp + 0x110]
push edx
lea eax, [esp + 0x178]
push eax
lea ecx, [esp + 0x27c]
push ecx
lea edx, [esp + 0x680]
push edx
call fcn.004061fd
add esp, 0x18
lea eax, [esp + 0x66c]
lea edx, [eax + 1]
pop esi
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405cb0
sub eax, edx
push eax
lea eax, [esp + 0x66c]
push eax
lea ecx, [esp + 0x10c]
push ecx
call fcn.004053e0
add esp, 0xc
pop ebx
add esp, 0x1664
ret