Function at 0x4207a0
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x450
mov edx, ecx
push ebx
push ebp
xor ebp, ebp
mov cl, byte [edx + 0x22]
mov bl, byte [edx + 0x12]
xor eax, eax
push esi
test cl, cl
sete al
xor ecx, ecx
push edi
test bl, bl
sete cl
cmp ecx, eax
lea edi, [esp + 0x60]
setne byte [esp + 0x13]
xor eax, eax
xor ecx, ecx
mov ax, word [edx + 0x24]
mov cx, word [edx + 0x26]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
xor eax, eax
xor ecx, ecx
mov ax, word [edx + 0x28]
mov cl, byte [edx + 0x2a]
mov dword [esp + 0x50], eax
mov dword [esp + 0x3c], ecx
xor eax, eax
xor ecx, ecx
mov al, byte [edx + 0x2b]
mov cl, byte [edx + 0x2c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov ecx, 0x100
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x468]
xor ebx, ebx
cmp edi, ebp
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebp
jle 0x4209e5
jmp 0x420836
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x464]
cmp ebp, esi
jge 0x4209e5
mov eax, edi
xor ecx, ecx
sub eax, ebx
mov dword [esp + 0x24], ecx
test eax, eax
mov dword [esp + 0x38], eax
jle 0x4209af
mov eax, esi
sub eax, ebp
add eax, 0xfffffff9
mov dword [esp + 0x34], eax
mov eax, ebx
imul eax, esi
mov dword [esp + 0x20], eax
jmp 0x420879
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp ecx, dword [esp + 0x34]
jge 0x4209af
mov edx, dword [edx + 0x197c]
add eax, ecx
mov ecx, dword [esp + 0x14]
lea edi, [eax + ecx]
mov cl, byte [esp + 0x13]
test cl, cl
mov ax, word [edx + edi*2]
je 0x4208b3
mov ecx, eax
xor ebx, ebx
shl ecx, 8
mov bl, ah
xor bl, cl
and ebx, 0xff
xor ebx, ecx
mov eax, ebx
mov esi, eax
and esi, 0xffff
xor eax, eax
mov cl, byte [esp + eax + 0x3c]
mov ebp, dword [esp + eax + 0x48]
mov ebx, esi
add eax, 4
shr ebx, cl
and ebx, ebp
cmp eax, 0xc
mov dword [esp + eax + 0x50], ebx
jl 0x4208bd
mov ecx, dword [esp + 0x28]
mov eax, 7
lea edx, [edx + edi*2 + 2]
add ecx, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x1c]
mov bx, word [eax]
mov al, byte [esp + 0x13]
test al, al
je 0x420916
mov eax, ebx
xor ecx, ecx
shl eax, 8
mov cl, bh
xor cl, al
and ecx, 0xff
xor ecx, eax
mov ebx, ecx
xor ebp, ebp
and ebx, 0xffff
xor edi, edi
mov cl, byte [esp + edi + 0x3c]
mov eax, dword [esp + edi + 0x48]
mov esi, ebx
mov edx, dword [esp + edi + 0x54]
shr esi, cl
add edi, 4
and esi, eax
mov eax, esi
mov dword [esp + edi + 0x50], esi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add ebp, eax
cmp edi, 0xc
jl 0x420920
cmp ebp, 0xff
jle 0x420956
mov ebp, 0xff
mov edx, dword [esp + ebp*4 + 0x60]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
lea ebp, [esp + ebp*4 + 0x60]
inc edx
add ecx, 2
dec eax
mov dword [ebp], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], eax
jne 0x4208f2
mov edx, dword [esp + 0x464]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x468]
add esi, edx
inc eax
mov dword [esp + 0x20], esi
mov esi, edx
mov edx, dword [esp + 0x30]
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x420871
cmp esi, edi
jle 0x4209c7
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], 0
add eax, edi
mov dword [esp + 0x14], eax
jmp 0x4209d9
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], 0
add eax, esi
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x18]
cmp ebx, edi
jl 0x420832
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x64]
add eax, esi
mov edi, dword [esp + 0x28]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv edi
cmp eax, 0x5a
jl 0x420a13
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x450
ret 8
xor eax, eax
mov ecx, 1
mov edx, dword [esp + ecx*4 + 0x60]
mov ebx, edx
imul ebx, ecx
imul ebx, ecx
add eax, ebx
test edx, edx
je 0x420a04
mov ebx, dword [esp + ecx*4 + 0x5c]
add ebx, ebx
cmp edx, ebx
jg 0x420a04
inc ecx
cmp ecx, 8
jl 0x420a1a
cmp ecx, 0x100
jge 0x420a59
mov edx, dword [esp + ecx*4 + 0x60]
imul edx, ecx
imul edx, ecx
add eax, edx
inc ecx
cmp ecx, 0x100
jl 0x420a44
sub edi, esi
xor edx, edx
div edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 8