Function at 0x4416b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x20], ecx
xor eax, eax
cmp dword [ebp + 0x10], 4
mov ecx, dword [ebp + 0xc]
push edi
mov edi, ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 8], eax
mov dword [ebp - 0x18], eax
jb 0x44193c
mov edx, dword [ecx]
push esi
mov esi, edx
and esi, 0xf
add esi, 5
mov dword [ebp - 0xc], esi
cmp esi, 0xf
jbe 0x4416f5
pop esi
mov eax, 0xffffffd4
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
shr edx, 4
push ebx
mov ebx, 4
mov dword [eax], esi
mov esi, 1
mov eax, dword [ebp - 0xc]
mov ecx, eax
shl esi, cl
inc eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], esi
lea ecx, [esi + 1]
mov eax, ecx
mov dword [ebp - 0x10], ecx
cmp eax, 1
jle 0x441913
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
cmp ecx, dword [esi]
mov esi, dword [ebp - 4]
ja 0x4418f8
cmp dword [ebp - 0x18], 0
je 0x441810
cmp dx, 0xffff
jne 0x44177b
mov esi, dword [ebp + 0xc]
add esi, 0xfffffffb
add esi, dword [ebp + 0x10]
add ecx, 0x18
mov dword [ebp - 0x18], ecx
cmp edi, esi
jae 0x44176b
mov edx, dword [edi + 2]
add edi, 2
mov ecx, ebx
shr edx, cl
mov ecx, dword [ebp - 0x18]
jmp 0x441771
shr edx, 0x10
add ebx, 0x10
cmp dx, 0xffff
je 0x441752
mov dword [ebp - 0x14], edi
mov eax, edx
and eax, 3
cmp al, 3
jne 0x441796
shr edx, 2
add ecx, 3
mov eax, edx
add ebx, 2
and eax, 3
cmp al, 3
je 0x441784
mov eax, edx
add ebx, 2
and eax, 3
add ecx, eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
cmp ecx, dword [eax]
ja 0x441907
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4417d3
mov edi, dword [ebp - 0x20]
sub ecx, eax
mov esi, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
xor eax, eax
shr ecx, 1
lea edi, [edi + esi*2]
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp + 0x10]
mov ecx, ebx
mov eax, dword [ebp + 0xc]
add esi, 0xfffffff9
add eax, esi
sar ecx, 3
mov esi, dword [ebp - 4]
cmp edi, eax
jbe 0x441803
mov esi, dword [ebp + 0x10]
add ecx, edi
mov eax, dword [ebp + 0xc]
add esi, 0xfffffffc
add eax, esi
mov esi, dword [ebp - 4]
cmp ecx, eax
jbe 0x441805
shr edx, 2
jmp 0x441810
add ecx, edi
mov edi, ecx
and ebx, 7
mov ecx, ebx
mov edx, dword [edi]
shr edx, cl
add ebx, dword [ebp - 0xc]
lea ecx, [esi - 1]
movzx eax, si
and ecx, edx
mov dword [ebp - 0x24], eax
add eax, eax
mov dword [ebp - 0x28], eax
sub eax, dword [ebp - 0x10]
dec eax
movzx eax, ax
mov dword [ebp - 0x14], eax
movzx eax, dx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
cwde
cmp ecx, eax
jae 0x441848
mov eax, dword [ebp - 0x24]
dec eax
and eax, dword [ebp - 0x18]
dec ebx
movzx ecx, ax
jmp 0x441867
mov esi, dword [ebp - 0x28]
dec esi
and esi, dword [ebp - 0x18]
movzx eax, si
movsx edx, ax
sub eax, dword [ebp - 0x14]
cmp edx, dword [ebp - 4]
movzx ecx, ax
movzx eax, si
cmovl ecx, eax
movzx ecx, cx
mov esi, dword [ebp - 0x20]
dec ecx
movsx eax, cx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x10]
cwde
sub edx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], edx
mov word [esi + eax*2], cx
inc eax
mov esi, dword [ebp - 4]
mov dword [ebp - 8], eax
xor eax, eax
test cx, cx
sete al
mov dword [ebp - 0x18], eax
cmp edx, esi
jge 0x4418ad
mov eax, dword [ebp - 0xc]
nop dword [eax]
sar esi, 1
dec eax
cmp edx, esi
jl 0x4418a0
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], esi
mov edx, dword [ebp + 0xc]
mov ecx, ebx
add edx, dword [ebp + 0x10]
sar ecx, 3
lea eax, [edx - 7]
cmp edi, eax
jbe 0x4418d5
lea eax, [ecx + edi]
lea ecx, [edx - 4]
cmp eax, ecx
jbe 0x4418d8
sub edi, edx
lea ebx, [ebx + edi*8]
mov edi, ecx
add ebx, 0x20
jmp 0x4418dd
lea eax, [edi + ecx]
mov edi, eax
and ebx, 7
mov edx, dword [edi]
mov ecx, ebx
mov eax, dword [ebp - 0x10]
and ecx, 0x1f
shr edx, cl
mov dword [ebp - 0x14], edi
cmp eax, 1
jg 0x441727
mov ecx, dword [ebp - 8]
cmp eax, 1
je 0x441917
pop ebx
pop esi
or eax, 0xffffffff
pop edi
mov esp, ebp
pop ebp
ret
pop ebx
pop esi
mov eax, 0xffffffd0
pop edi
mov esp, ebp
pop ebp
ret
xor ecx, ecx
jmp 0x4418f8
lea eax, [ecx - 1]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], eax
lea eax, [ebx + 7]
sar eax, 3
mov ecx, 0xffffffb8
sub eax, dword [ebp + 0xc]
add eax, edi
cmp eax, dword [ebp + 0x10]
pop ebx
pop esi
cmova eax, ecx
pop edi
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffb8
pop edi
mov esp, ebp
pop ebp
ret