Function at 0x5e7b20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov ecx, dword [ebp + 0x14]
xor eax, eax
cmp dword [ebp + 0x18], 4
push ebx
push esi
mov esi, ecx
mov dword [ebp - 8], eax
push edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x1c], eax
jb 0x5e7d9f
mov edx, dword [ecx]
mov edi, edx
and edi, 0xf
add edi, 5
mov dword [ebp - 0x10], edi
cmp edi, 0xf
jbe 0x5e7b61
pop edi
pop esi
mov eax, 0xffffffd4
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
mov ebx, 4
shr edx, 4
mov dword [eax], edi
mov edi, 1
mov eax, dword [ebp - 0x10]
mov ecx, eax
shl edi, cl
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], edi
lea ecx, [edi + 1]
mov eax, ecx
mov dword [ebp - 0x14], ecx
cmp eax, 1
jle 0x5e7d83
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
cmp ecx, dword [edi]
mov edi, dword [ebp - 4]
ja 0x5e7d68
cmp dword [ebp - 0x1c], 0
je 0x5e7c78
mov edi, ecx
cmp dx, 0xffff
jne 0x5e7beb
mov eax, dword [ebp + 0x14]
add eax, 0xfffffffb
add eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], eax
add edi, 0x18
cmp esi, eax
jae 0x5e7bd5
mov edx, dword [esi + 2]
add esi, 2
mov ecx, ebx
shr edx, cl
jmp 0x5e7bdb
shr edx, 0x10
add ebx, 0x10
mov eax, dword [ebp - 0x1c]
cmp dx, 0xffff
je 0x5e7bc2
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], esi
mov eax, edx
and eax, 3
cmp al, 3
jne 0x5e7c06
shr edx, 2
add edi, 3
mov eax, edx
add ebx, 2
and eax, 3
cmp al, 3
je 0x5e7bf4
mov eax, edx
add ebx, 2
and eax, 3
add edi, eax
mov eax, dword [ebp + 0xc]
cmp edi, dword [eax]
ja 0x5e7d77
cmp ecx, edi
jae 0x5e7c3d
mov esi, ecx
xor eax, eax
mov ecx, edi
sub ecx, dword [ebp - 8]
mov dword [ebp - 8], edi
mov edi, dword [ebp + 8]
shr ecx, 1
lea edi, [edi + esi*2]
mov esi, dword [ebp - 0xc]
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [ebp + 0x14]
mov edi, ebx
add eax, 0xfffffff9
sar edi, 3
add eax, dword [ebp + 0x18]
cmp esi, eax
jbe 0x5e7c66
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
add ecx, 0xfffffffc
add eax, ecx
lea ecx, [edi + esi]
cmp ecx, eax
jbe 0x5e7c66
shr edx, 2
jmp 0x5e7c75
mov edx, dword [esi + edi]
add esi, edi
and ebx, 7
mov dword [ebp - 0xc], esi
mov ecx, ebx
shr edx, cl
mov edi, dword [ebp - 4]
add ebx, dword [ebp - 0x10]
lea ecx, [edi - 1]
movzx eax, di
and ecx, edx
mov dword [ebp - 0x20], eax
add eax, eax
mov dword [ebp - 0x24], eax
sub eax, dword [ebp - 0x14]
dec eax
movzx eax, ax
mov dword [ebp - 0x1c], eax
movzx eax, dx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
cwde
cmp ecx, eax
jae 0x5e7cb0
mov eax, dword [ebp - 0x20]
dec eax
and eax, dword [ebp - 0x18]
dec ebx
movzx ecx, ax
jmp 0x5e7cd1
mov esi, dword [ebp - 0x24]
dec esi
and esi, dword [ebp - 0x18]
movzx eax, si
movsx edx, ax
sub eax, dword [ebp - 0x1c]
cmp edx, edi
movzx ecx, ax
movzx eax, si
mov esi, dword [ebp - 0xc]
cmovl ecx, eax
movzx ecx, cx
mov edi, dword [ebp + 8]
dec ecx
movsx eax, cx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x14]
cwde
sub edx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], 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 - 0x1c], eax
cmp edx, edi
jge 0x5e7d13
mov eax, dword [ebp - 0x10]
sar edi, 1
dec eax
cmp edx, edi
jl 0x5e7d06
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], edi
mov eax, dword [ebp + 0x18]
mov edx, ebx
add eax, 0xfffffff9
sar edx, 3
add eax, dword [ebp + 0x14]
cmp esi, eax
jbe 0x5e7d48
mov eax, dword [ebp + 0x18]
lea ecx, [edx + esi]
add eax, 0xfffffffc
add eax, dword [ebp + 0x14]
cmp ecx, eax
jbe 0x5e7d48
mov eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x18]
sub esi, eax
lea ebx, [ebx + esi*8]
add ebx, 0x20
lea esi, [eax - 4]
jmp 0x5e7d4d
add esi, edx
and ebx, 7
mov edx, dword [esi]
mov ecx, ebx
mov eax, dword [ebp - 0x14]
and ecx, 0x1f
shr edx, cl
mov dword [ebp - 0xc], esi
cmp eax, 1
jg 0x5e7b92
mov ecx, dword [ebp - 8]
cmp eax, 1
je 0x5e7d87
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 0x5e7d68
mov eax, dword [ebp + 0xc]
dec ecx
mov dword [eax], ecx
lea ecx, [ebx + 7]
sar ecx, 3
add esi, ecx
sub esi, dword [ebp + 0x14]
mov eax, esi
cmp esi, dword [ebp + 0x18]
jbe 0x5e7da4
mov eax, 0xffffffb8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret