Function at 0x446150
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
xor eax, eax
mov dword [ebp - 0x1c], ecx
cmp dword [ebp + 0x10], 4
mov ecx, dword [ebp + 0xc]
mov ebx, ecx
push esi
push edi
mov dword [ebp - 0x18], edx
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], eax
jb 0x4463b9
mov edx, dword [ecx]
mov ecx, edx
and ecx, 0xf
add ecx, 5
cmp ecx, 0xf
jbe 0x446191
pop edi
pop esi
mov eax, 0xffffffd4
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
mov edi, 1
shl edi, cl
mov esi, 4
shr edx, 4
mov dword [ebp - 4], edi
mov dword [eax], ecx
inc ecx
lea eax, [edi + 1]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
cmp eax, 1
jle 0x44639d
jmp 0x4461c0
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 8]
cmp ecx, dword [edi]
mov edi, dword [ebp - 4]
ja 0x446382
cmp dword [ebp - 0x14], 0
je 0x4462a7
cmp dx, 0xffff
jne 0x446216
mov edi, dword [ebp + 0xc]
add edi, 0xfffffffb
add edi, dword [ebp + 0x10]
jmp 0x4461f0
add ecx, 0x18
mov dword [ebp - 0x14], ecx
cmp ebx, edi
jae 0x446209
mov edx, dword [ebx + 2]
add ebx, 2
mov ecx, esi
shr edx, cl
mov ecx, dword [ebp - 0x14]
jmp 0x44620f
shr edx, 0x10
add esi, 0x10
cmp dx, 0xffff
je 0x4461f0
mov eax, edx
and eax, 3
cmp al, 3
jne 0x446232
nop
shr edx, 2
add ecx, 3
mov eax, edx
add esi, 2
and eax, 3
cmp al, 3
je 0x446220
mov eax, edx
add esi, 2
and eax, 3
add ecx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
cmp ecx, dword [eax]
ja 0x446391
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x44626a
mov edi, dword [ebp - 0x1c]
sub ecx, eax
lea edi, [edi + eax*2]
xor eax, eax
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
mov edi, dword [ebp + 0x10]
mov ecx, esi
mov eax, dword [ebp + 0xc]
add edi, 0xfffffff9
add eax, edi
sar ecx, 3
mov edi, dword [ebp - 4]
cmp ebx, eax
jbe 0x44629a
mov edi, dword [ebp + 0x10]
add ecx, ebx
mov eax, dword [ebp + 0xc]
add edi, 0xfffffffc
add eax, edi
mov edi, dword [ebp - 4]
cmp ecx, eax
jbe 0x44629c
shr edx, 2
jmp 0x4462a7
add ecx, ebx
mov ebx, ecx
and esi, 7
mov ecx, esi
mov edx, dword [ebx]
shr edx, cl
movzx eax, di
lea ecx, [edi - 1]
mov dword [ebp - 0x24], eax
and ecx, edx
add eax, eax
mov dword [ebp - 0x28], eax
sub eax, dword [ebp - 0x10]
dec eax
movzx eax, ax
mov dword [ebp - 0x20], eax
movzx eax, dx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
movsx eax, dx
cmp ecx, eax
jae 0x4462e3
mov eax, dword [ebp - 0x24]
dec eax
and eax, dword [ebp - 0x14]
movzx ecx, ax
mov eax, dword [ebp - 0xc]
dec eax
add esi, eax
jmp 0x4462f9
mov eax, dword [ebp - 0x28]
dec eax
and eax, dword [ebp - 0x14]
movzx ecx, ax
movsx eax, cx
cmp eax, edi
jl 0x4462f6
sub ecx, edx
add esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x1c]
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 [edi + eax*2], cx
inc eax
mov edi, dword [ebp - 4]
mov dword [ebp - 8], eax
xor eax, eax
test cx, cx
sete al
mov dword [ebp - 0x14], eax
cmp edx, edi
jge 0x44633d
mov eax, dword [ebp - 0xc]
mov edi, edi
sar edi, 1
dec eax
cmp edx, edi
jl 0x446330
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
mov edx, dword [ebp + 0xc]
mov ecx, esi
add edx, dword [ebp + 0x10]
sar ecx, 3
lea eax, [edx - 7]
cmp ebx, eax
lea eax, [ecx + ebx]
jbe 0x446365
lea ecx, [edx - 4]
cmp eax, ecx
jbe 0x446365
sub ebx, edx
lea esi, [esi + ebx*8]
mov ebx, ecx
add esi, 0x20
jmp 0x44636a
mov ebx, eax
and esi, 7
mov edx, dword [ebx]
mov ecx, esi
mov eax, dword [ebp - 0x10]
and ecx, 0x1f
shr edx, cl
cmp eax, 1
jg 0x4461c0
mov ecx, dword [ebp - 8]
cmp eax, 1
je 0x4463a1
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffd0
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
jmp 0x446382
lea eax, [ecx - 1]
mov ecx, dword [ebp - 0x18]
mov dword [ecx], eax
lea eax, [esi + 7]
sar eax, 3
sub eax, dword [ebp + 0xc]
add eax, ebx
cmp eax, dword [ebp + 0x10]
jbe 0x4463be
mov eax, 0xffffffb8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret