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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x114
mov esi, edx
mov ebp, dword [esp + 0x128]
mov edi, 2
mov dword [esp + 8], ecx
nop dword [eax]
movzx eax, byte [esi + edi - 2]
test al, al
je 0x402329
mov byte [esp + edi + 0x12], al
movzx eax, byte [esi + edi - 1]
test al, al
je 0x40232e
mov byte [esp + edi + 0x13], al
movzx eax, byte [esi + edi]
test al, al
je 0x40232f
mov byte [esp + edi + 0x14], al
add edi, 3
cmp edi, 0x101
jne 0x4022e0
lea esi, [esp + 0x113]
mov byte [esp + 0x113], 0
xor eax, eax
mov edi, 0xff
jmp 0x402357
add edi, 0xfffffffe
jmp 0x40232f
dec edi
lea esi, [esp + edi + 0x14]
mov byte [esp + edi + 0x14], 0
lea ecx, [edi - 0x101]
cmp ecx, 0xfffffffd
ja 0x40234d
mov byte [esi], 0x40
mov eax, 1
jmp 0x402357
xor eax, eax
cmp edi, 0x100
je 0x40235b
mov byte [esi + eax], 0
mov dword [esp + 0xc], eax
lea esi, [esp + eax + 0x14]
mov dword [esp + 0x10], edi
add esi, edi
mov ebx, 1
xor edx, edx
mov edi, dword [esp + 0x12c]
mov dword [esp + 4], esi
nop dword [eax + eax]
mov ecx, ebp
and ecx, 0xf
mov eax, ecx
or al, 0x30
mov ah, cl
add ah, 0x57
cmp ecx, 0xa
movzx ecx, al
movzx eax, ah
cmovb eax, ecx
mov byte [esi + ebx - 1], al
cmp ebp, 0x10
mov eax, edi
sbb eax, 0
jb 0x402408
mov ecx, ebp
shr ecx, 4
mov eax, ebp
mov dword [esp], ebp
mov ebp, edi
shld ebp, eax, 0x18
mov esi, edi
shr esi, 8
and ecx, 0xf
mov eax, ecx
or al, 0x30
mov ah, cl
add ah, 0x57
cmp ecx, 0xa
movzx ecx, al
movzx eax, ah
cmovb eax, ecx
mov ecx, dword [esp + 4]
mov byte [ecx + ebx], al
add ebx, 2
inc edx
mov eax, 0xff
cmp eax, dword [esp]
mov eax, 0
sbb eax, edi
mov edi, esi
mov esi, dword [esp + 4]
jb 0x402380
dec ebx
mov dword [esp], edx
lea ebp, [esi + ebx]
xor esi, esi
cmp dword [esp], 1
jne 0x402423
jmp 0x40246c
mov eax, ebx
dec eax
je 0x4024aa
mov eax, ebx
shr eax, 1
mov dword [esp], eax
lea ebp, [esi + ebx]
xor esi, esi
cmp dword [esp], 1
je 0x40246c
and dword [esp], 0x7ffffffe
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0xc]
lea edx, [esp + eax + 0x14]
lea eax, [esp + eax + 0x15]
lea edx, [ebx + edx - 1]
xor esi, esi
movzx ecx, byte [eax + esi - 1]
mov ch, byte [edx]
mov byte [eax + esi - 1], ch
mov byte [edx], cl
movzx ecx, byte [eax + esi]
mov edi, esi
xor edi, 0xfffffffe
mov ch, byte [ebp + edi]
mov byte [eax + esi], ch
mov byte [ebp + edi], cl
add esi, 2
add edx, 0xfffffffe
cmp dword [esp], esi
jne 0x402440
test bl, 2
jne 0x402483
mov edi, dword [esp + 8]
mov esi, dword [esp + 4]
mov byte [esi + ebx], 0
test edi, edi
jne 0x4024bb
jmp 0x4024f2
mov ecx, dword [esp + 4]
movzx eax, byte [ecx + esi]
mov edx, esi
not edx
mov ah, byte [ebp + edx]
mov byte [ecx + esi], ah
mov esi, ecx
mov byte [ebp + edx], al
mov edi, dword [esp + 8]
mov byte [esi + ebx], 0
test edi, edi
jne 0x4024bb
jmp 0x4024f2
mov ebx, 1
mov edi, dword [esp + 8]
mov byte [esi + ebx], 0
test edi, edi
je 0x4024f2
mov ecx, dword [edi + 0x20]
jmp 0x4024c8
xor ebx, ebx
cmp bl, byte [esp + edx + 0x14]
je 0x4024f4
sub ecx, 1
jb 0x4024f2
mov eax, dword [edi + 0x18]
mov eax, dword [eax + ecx*4]
mov esi, dword [eax]
movzx ebx, byte [esi]
xor edx, edx
test bl, bl
je 0x4024c0
nop
cmp bl, byte [esp + edx + 0x14]
jne 0x4024c2
movzx ebx, byte [esi + edx + 1]
inc edx
test bl, bl
jne 0x4024e0
jmp 0x4024c0
xor eax, eax
add esp, 0x114
pop esi
pop edi
pop ebx
pop ebp
ret