Function at 0x4021e9
Capabilities:
Encode data using xor

Disassembly:
push ecx
and dword [esp], 0
cmp dword [0x4324e8], 3
push edi
push 2
pop edi
jg 0x402206
call fcn.0040246b
jmp 0x402468
cmp dword [0x4324f8], 0
je 0x402440
mov ecx, dword [str._ShortSystemDir_]
push ebx
push ebp
push esi
mov esi, 0x7fff
mov ebp, 0x3ff
movzx eax, byte [ecx + 0x45eeb2]
mov edx, dword [0x4324d8]
and eax, esi
and edx, ebp
mov ebx, ecx
shl edx, 5
xor eax, edx
and ebx, esi
movzx edx, word [eax*2 + 0x44eeb0]
mov dword [0x4324d8], eax
lea eax, [eax*2 + 0x44eeb0]
mov word [ebx*2 + 0x43eeb0], dx
mov ebx, dword [str._ShortWindowsDir_]
mov word [eax], cx
mov eax, edi
push 2
mov dword [0x4324cc], eax
test edx, edx
pop edi
je 0x4022b7
cmp eax, dword [0x4324d4]
jae 0x4022b7
mov eax, ecx
sub eax, edx
cmp eax, 0x7efa
ja 0x4022b7
push edx
call fcn.00401fce
mov edi, eax
mov eax, dword [0x4324f8]
cmp edi, eax
pop ecx
jbe 0x40229a
mov edi, eax
mov ecx, dword [str._ShortSystemDir_]
cmp edi, 3
jne 0x4022b7
mov eax, ecx
sub eax, dword [str._ShortWindowsDir_]
cmp eax, 0x1000
jbe 0x4022b7
push 2
pop edi
mov eax, dword [0x4324cc]
cmp eax, 3
jb 0x402381
cmp edi, eax
ja 0x402381
sub ecx, ebx
add eax, 0xfffffffd
dec ecx
push eax
push ecx
call fcn.004046f8
pop ecx
pop ecx
push 1
pop ecx
sub ecx, dword [0x4324cc]
add dword [0x4324f8], ecx
sub dword [0x4324cc], 2
mov ecx, dword [str._ShortSystemDir_]
movzx edx, byte [ecx + 0x45eeb3]
mov edi, dword [0x4324d8]
inc ecx
and edi, ebp
and edx, esi
shl edi, 5
xor edx, edi
mov edi, ecx
mov dword [0x4324d8], edx
and edi, esi
mov bx, word [edx*2 + 0x44eeb0]
dec dword [0x4324cc]
lea edx, [edx*2 + 0x44eeb0]
mov word [edi*2 + 0x43eeb0], bx
mov word [edx], cx
jne 0x4022f8
and dword [esp + 0x10], 0
push 2
inc ecx
pop edi
test eax, eax
mov dword [str._ShortSystemDir_], ecx
je 0x4023ef
mov eax, dword [0x4324f4]
test eax, eax
jl 0x402363
lea edx, [eax + 0x45eeb0]
jmp 0x402365
xor edx, edx
sub ecx, eax
push 0
push ecx
push edx
call fcn.00403eff
mov ecx, dword [str._ShortSystemDir_]
add esp, 0xc
mov dword [0x4324f4], ecx
jmp 0x4023ef
cmp dword [esp + 0x10], 0
je 0x4023da
movzx eax, byte [ecx + 0x45eeaf]
push eax
push 0
call fcn.004046f8
pop ecx
test eax, eax
pop ecx
je 0x4023d2
mov eax, dword [0x4324f4]
test eax, eax
jl 0x4023ae
lea ecx, [eax + 0x45eeb0]
jmp 0x4023b0
xor ecx, ecx
mov edx, dword [str._ShortSystemDir_]
push 0
sub edx, eax
push edx
push ecx
call fcn.00403eff
mov ecx, dword [str._ShortSystemDir_]
add esp, 0xc
mov dword [0x4324f4], ecx
jmp 0x4023e2
mov ecx, dword [str._ShortSystemDir_]
jmp 0x4023e2
mov dword [esp + 0x10], 1
inc ecx
dec dword [0x4324f8]
mov dword [str._ShortSystemDir_], ecx
mov ebx, 0x106
cmp dword [0x4324f8], ebx
jae 0x402418
cmp dword [0x4324dc], 0
jne 0x402418
call fcn.0040210b
cmp dword [0x4324f8], ebx
mov ecx, dword [str._ShortSystemDir_]
jb 0x4023fc
cmp dword [0x4324f8], 0
jne 0x402226
cmp dword [esp + 0x10], 0
pop esi
pop ebp
pop ebx
je 0x402446
movzx eax, byte [ecx + 0x45eeaf]
push eax
push 0
call fcn.004046f8
pop ecx
pop ecx
mov ecx, dword [str._ShortSystemDir_]
mov edx, dword [0x4324f4]
test edx, edx
jl 0x402458
lea eax, [edx + 0x45eeb0]
jmp 0x40245a
xor eax, eax
sub ecx, edx
push 1
push ecx
push eax
call fcn.00403eff
add esp, 0xc
pop edi
pop ecx
ret