Function at 0x420338
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
push ebx
push esi
mov ebx, dword [ebp + 8]
push 0x22
push 0
lea eax, [ebp - 0x34]
push eax
call fcn.0046dddc
mov word [ebp - 4], 8
add esp, 0xc
lea eax, [ebx + 0x1c]
mov edx, dword [eax]
sub dword [eax + 4], edx
dec word [ebp - 4]
add eax, 0xfffffffc
cmp word [ebp - 4], 2
jae 0x42035c
mov word [ebp - 6], 0
mov word [ebp - 4], 0
mov si, 8
mov eax, ebx
mov dword [ebp - 0xc], eax
mov ebx, 0x80000000
mov eax, dword [ebp - 0xc]
test dword [eax], ebx
je 0x420394
mov dl, 1
jmp 0x420396
xor edx, edx
xor eax, eax
mov ecx, dword [ebp - 0xc]
test dword [ecx], ebx
je 0x4203a3
test dl, dl
je 0x4203b4
test dword [ecx], ebx
jne 0x4203ab
test dl, dl
jne 0x4203b4
shr ebx, 1
inc eax
cmp ax, 0x20
jb 0x42039b
movzx eax, ax
test eax, eax
jns 0x4203be
add eax, 3
sar eax, 2
mov cl, 7
sub cl, al
mov byte [ebp - 7], cl
xor eax, eax
mov al, byte [ebp - 7]
shl eax, 2
add ax, 4
mov word [ebp - 2], ax
mov al, byte [ebp - 7]
add eax, eax
add dl, al
mov byte [ebp - 7], dl
xor eax, eax
movzx edx, word [ebp - 6]
lea edx, [ebp + edx - 0x34]
movzx ecx, ax
push ecx
mov ecx, 3
pop ebx
sub ecx, ebx
xor ebx, ebx
mov bl, byte [ebp - 7]
sar ebx, cl
movzx ecx, si
dec ecx
and bl, 1
shl bl, cl
or byte [edx], bl
dec esi
test si, si
jne 0x420419
inc word [ebp - 6]
inc edx
mov si, 8
inc eax
cmp ax, 4
jb 0x4203ec
movzx edx, word [ebp - 6]
mov ecx, dword [ebp - 0xc]
xor eax, eax
mov dword [ebp - 0x10], ecx
lea edx, [ebp + edx - 0x34]
cmp ax, word [ebp - 2]
jae 0x420468
movzx ecx, word [ebp - 2]
movzx ebx, ax
sub ecx, ebx
mov ebx, dword [ebp - 0x10]
dec ecx
mov ebx, dword [ebx]
shr ebx, cl
movzx ecx, si
dec ecx
and bl, 1
shl bl, cl
or byte [edx], bl
dec esi
test si, si
jne 0x420461
inc word [ebp - 6]
inc edx
mov si, 8
inc eax
cmp ax, word [ebp - 2]
jb 0x420436
inc word [ebp - 4]
add dword [ebp - 0xc], 4
cmp word [ebp - 4], 9
jb 0x420384
cmp si, 8
je 0x420485
inc word [ebp - 6]
push 0x28
push 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.0046dddc
add esp, 0xc
call fcn.00420318
mov edx, dword [ebp + 0xc]
mov byte [edx], al
call fcn.00420318
movzx edx, word [ebp - 6]
mov ecx, 0x26
and eax, 0xff
sub ecx, edx
cdq
idiv ecx
add dl, 2
mov byte [ebp - 7], dl
xor edx, edx
mov eax, dword [ebp + 0xc]
mov cl, byte [eax]
mov eax, dword [ebp + 0xc]
sub cl, byte [ebp - 7]
mov byte [eax + 1], cl
mov dl, byte [ebp - 7]
mov word [ebp - 4], dx
movzx ecx, word [ebp - 4]
mov eax, dword [ebp + 0xc]
add eax, ecx
jmp 0x4204e7
mov byte [eax], 1
inc word [ebp - 4]
inc eax
xor edx, edx
mov dl, byte [ebp - 7]
movzx ecx, word [ebp - 6]
add edx, ecx
movzx ecx, word [ebp - 4]
cmp edx, ecx
jg 0x4204df
mov word [ebp - 4], 2
mov eax, dword [ebp + 0xc]
lea ebx, [eax + 2]
cmp byte [ebx], 0
jne 0x420512
call fcn.00420318
mov byte [ebx], al
inc word [ebp - 4]
inc ebx
cmp word [ebp - 4], 0x28
jb 0x420506
movzx eax, word [ebp - 6]
push eax
lea edx, [ebp - 0x34]
push edx
xor ecx, ecx
mov cl, byte [ebp - 7]
add ecx, dword [ebp + 0xc]
push ecx
call fcn.0046dd6c
mov word [ebp - 4], 1
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dl, byte [eax]
xor byte [eax + 1], dl
inc word [ebp - 4]
inc eax
cmp word [ebp - 4], 0x28
jb 0x420541
pop esi
pop ebx
mov esp, ebp
pop ebp
ret