Function at 0x594e20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x14], ecx
mov ebx, dword [ebp + 8]
test ebx, ebx
js 0x5953b0
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax + 2]
xor eax, eax
mov dword [ebp - 0x24], ecx
test cx, cx
sete al
mov edx, 0x8a
mov ecx, 7
cmove ecx, edx
mov dword [ebp - 0x10], ecx
mov ecx, 4
sub ecx, eax
mov dword [ebp - 0x18], ecx
mov edi, 0xffffffff
xor eax, eax
xor esi, esi
jmp 0x594eb1
xor ecx, ecx
mov edi, dword [ebp - 0x28]
cmp edi, eax
sete cl
mov eax, 4
sub eax, ecx
mov dword [ebp - 0x18], eax
xor ecx, 7
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
lea edx, [eax + 1]
mov esi, ebx
cmp eax, ecx
mov eax, edx
mov ebx, ecx
je 0x5953b0
mov ecx, ebx
mov ebx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
movzx edx, word [edx + eax*4 + 6]
mov eax, ebx
mov dword [ebp - 0x1c], esi
lea ebx, [esi + 1]
cmp ebx, dword [ebp - 0x10]
mov dword [ebp - 0x24], edx
jge 0x594ed5
cmp eax, edx
je 0x594e9d
cmp ebx, dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
jge 0x594fa0
mov edi, ebx
mov esi, dword [ebp - 0x14]
mov ebx, dword [esi + 0x170c]
movzx ecx, word [esi + 0x1708]
mov dword [ebp - 0x10], ecx
jmp 0x594f18
mov dword [ebp - 0x10], ecx
add ebx, dword [ebp - 0x1c]
mov dword [esi + 0x170c], ebx
add edi, 0xffffffff
mov eax, dword [ebp - 0x28]
je 0x595386
movzx edx, word [esi + eax*4 + 0xace]
movzx eax, word [esi + eax*4 + 0xacc]
mov dword [ebp - 0x18], eax
mov ecx, ebx
shl eax, cl
mov ecx, dword [ebp - 0x10]
or ecx, eax
mov eax, 0x10
mov dword [ebp - 0x1c], edx
sub eax, edx
mov word [esi + 0x1708], cx
cmp ebx, eax
jle 0x594f00
mov edx, dword [esi + 8]
mov eax, ecx
mov ecx, dword [esi + 0x14]
lea ebx, [ecx + 1]
mov dword [esi + 0x14], ebx
mov byte [edx + ecx], al
movzx edx, byte [esi + 0x1709]
mov ecx, dword [esi + 8]
mov ebx, dword [esi + 0x14]
lea eax, [ebx + 1]
mov dword [esi + 0x14], eax
mov byte [ecx + ebx], dl
mov eax, dword [esi + 0x170c]
mov cl, 0x10
sub cl, al
mov ebx, dword [ebp - 0x1c]
add ebx, eax
add ebx, 0xfffffff0
mov edx, dword [ebp - 0x18]
shr edx, cl
mov word [esi + 0x1708], dx
mov dword [ebp - 0x10], edx
jmp 0x594f06
test eax, eax
je 0x594fc9
cmp eax, edi
jne 0x595062
mov edi, dword [ebp - 0x14]
mov eax, dword [edi + 0x170c]
mov dword [ebp - 0x10], eax
mov eax, ebx
movzx ebx, word [edi + 0x1708]
mov dword [ebp - 0x1c], eax
jmp 0x59518e
mov eax, dword [ebp - 0x1c]
cmp eax, 9
jg 0x5950ee
mov edi, dword [ebp - 0x14]
movzx edx, word [edi + 0xb12]
mov ecx, dword [edi + 0x170c]
mov ebx, 0x10
mov dword [ebp - 0x10], edx
sub ebx, edx
movzx esi, word [edi + 0xb10]
mov edx, esi
shl edx, cl
or dx, word [edi + 0x1708]
mov word [edi + 0x1708], dx
cmp ecx, ebx
jle 0x59527c
mov ecx, dword [edi + 8]
mov dword [ebp - 0x18], ecx
mov ebx, dword [edi + 0x14]
lea ecx, [ebx + 1]
mov dword [edi + 0x14], ecx
mov ecx, dword [ebp - 0x18]
mov byte [ecx + ebx], dl
mov cl, byte [edi + 0x1709]
mov byte [ebp - 0x18], cl
mov edx, dword [edi + 8]
mov ebx, dword [edi + 0x14]
lea ecx, [ebx + 1]
mov dword [edi + 0x14], ecx
mov cl, byte [ebp - 0x18]
mov byte [edx + ebx], cl
mov edx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, dl
mov ebx, dword [ebp - 0x10]
add ebx, edx
add ebx, 0xfffffff0
shr esi, cl
mov word [edi + 0x1708], si
mov edx, esi
jmp 0x595281
mov edx, dword [ebp - 0x14]
movzx esi, word [edx + eax*4 + 0xace]
mov ecx, dword [edx + 0x170c]
mov edi, 0x10
mov dword [ebp - 0x10], esi
sub edi, esi
movzx eax, word [edx + eax*4 + 0xacc]
mov ebx, eax
shl ebx, cl
or bx, word [edx + 0x1708]
mov word [edx + 0x1708], bx
cmp ecx, edi
jle 0x59517b
mov esi, dword [edx + 8]
mov edi, dword [edx + 0x14]
lea ecx, [edi + 1]
mov dword [edx + 0x14], ecx
mov byte [esi + edi], bl
mov cl, byte [edx + 0x1709]
mov byte [ebp - 0x18], cl
mov edi, dword [edx + 8]
mov ebx, dword [edx + 0x14]
lea ecx, [ebx + 1]
mov dword [edx + 0x14], ecx
mov cl, byte [ebp - 0x18]
mov byte [edi + ebx], cl
mov ebx, dword [edx + 0x170c]
mov cl, 0x10
sub cl, bl
mov esi, dword [ebp - 0x10]
add esi, ebx
add esi, 0xfffffff0
mov dword [ebp - 0x10], esi
shr eax, cl
mov word [edx + 0x1708], ax
mov ebx, eax
jmp 0x595183
mov edi, dword [ebp - 0x14]
movzx edx, word [edi + 0xb16]
mov ecx, dword [edi + 0x170c]
mov ebx, 0x10
mov dword [ebp - 0x10], edx
sub ebx, edx
movzx esi, word [edi + 0xb14]
mov edx, esi
shl edx, cl
or dx, word [edi + 0x1708]
mov word [edi + 0x1708], dx
cmp ecx, ebx
jle 0x5952f8
mov ecx, dword [edi + 8]
mov dword [ebp - 0x18], ecx
mov ebx, dword [edi + 0x14]
lea ecx, [ebx + 1]
mov dword [edi + 0x14], ecx
mov ecx, dword [ebp - 0x18]
mov byte [ecx + ebx], dl
mov cl, byte [edi + 0x1709]
mov byte [ebp - 0x18], cl
mov edx, dword [edi + 8]
mov ebx, dword [edi + 0x14]
lea ecx, [ebx + 1]
mov dword [edi + 0x14], ecx
mov cl, byte [ebp - 0x18]
mov byte [edx + ebx], cl
mov edx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, dl
mov ebx, dword [ebp - 0x10]
add ebx, edx
add ebx, 0xfffffff0
shr esi, cl
mov word [edi + 0x1708], si
mov edx, esi
jmp 0x5952fd
mov esi, ecx
add esi, dword [ebp - 0x10]
mov dword [ebp - 0x10], esi
mov edi, edx
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x170c], eax
movzx edx, word [edi + 0xb0e]
movzx esi, word [edi + 0xb0c]
mov dword [ebp - 0x30], esi
mov eax, dword [ebp - 0x10]
mov ecx, eax
shl esi, cl
or ebx, esi
mov ecx, 0x10
mov dword [ebp - 0x18], edx
sub ecx, edx
mov word [edi + 0x1708], bx
cmp eax, ecx
jle 0x595202
mov eax, dword [edi + 8]
mov esi, dword [edi + 0x14]
lea ecx, [esi + 1]
mov dword [edi + 0x14], ecx
mov byte [eax + esi], bl
mov al, byte [edi + 0x1709]
mov esi, dword [edi + 8]
mov ebx, dword [edi + 0x14]
lea ecx, [ebx + 1]
mov dword [edi + 0x14], ecx
mov byte [esi + ebx], al
mov ebx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, bl
mov eax, dword [ebp - 0x18]
lea esi, [eax + ebx]
add esi, 0xfffffff0
mov ebx, dword [ebp - 0x30]
shr ebx, cl
mov word [edi + 0x1708], bx
jmp 0x595208
mov esi, dword [ebp - 0x10]
add esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, 0xfffd
movzx eax, ax
mov edx, eax
mov ecx, esi
shl edx, cl
or ebx, edx
mov dword [edi + 0x170c], esi
mov word [edi + 0x1708], bx
cmp esi, 0xf
jl 0x595272
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0x14]
lea esi, [edx + 1]
mov dword [edi + 0x14], esi
mov byte [ecx + edx], bl
mov cl, byte [edi + 0x1709]
mov edx, dword [edi + 8]
mov esi, dword [edi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [ebp - 0x14]
mov dword [ebx + 0x14], edi
mov edi, dword [ebp - 0x14]
mov byte [edx + esi], cl
mov ebx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, bl
shr eax, cl
mov word [edi + 0x1708], ax
add ebx, 0xfffffff2
jmp 0x595380
mov ebx, esi
add ebx, 2
jmp 0x595380
mov ebx, ecx
add ebx, dword [ebp - 0x10]
add eax, 0xfffe
movzx eax, ax
mov esi, eax
mov ecx, ebx
shl esi, cl
or edx, esi
mov dword [edi + 0x170c], ebx
mov word [edi + 0x1708], dx
cmp ebx, 0xe
jl 0x59536d
mov ecx, dword [edi + 8]
mov esi, dword [edi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [ebp - 0x14]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], dl
mov ecx, dword [ebp - 0x14]
mov cl, byte [ecx + 0x1709]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 8]
mov esi, dword [ebp - 0x14]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [ebp - 0x14]
mov dword [ebx + 0x14], edi
mov edi, dword [ebp - 0x14]
mov byte [edx + esi], cl
mov ebx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, bl
shr eax, cl
mov word [edi + 0x1708], ax
add ebx, 0xfffffff3
jmp 0x595380
mov ebx, ecx
add ebx, dword [ebp - 0x10]
add eax, 0xfff6
movzx eax, ax
mov esi, eax
mov ecx, ebx
shl esi, cl
or edx, esi
mov dword [edi + 0x170c], ebx
mov word [edi + 0x1708], dx
cmp ebx, 0xa
jl 0x595372
mov ecx, dword [edi + 8]
mov esi, dword [edi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [ebp - 0x14]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], dl
mov ecx, dword [ebp - 0x14]
mov cl, byte [ecx + 0x1709]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 8]
mov esi, dword [ebp - 0x14]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [ebp - 0x14]
mov dword [ebx + 0x14], edi
mov edi, dword [ebp - 0x14]
mov byte [edx + esi], cl
mov ebx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, bl
shr eax, cl
mov word [edi + 0x1708], ax
add ebx, 0xfffffff7
jmp 0x595380
add ebx, 3
jmp 0x595380
add ebx, 7
nop word cs:[eax + eax]
nop
mov dword [edi + 0x170c], ebx
xor ebx, ebx
mov eax, dword [ebp - 0x24]
test ax, ax
jne 0x594e80
mov dword [ebp - 0x10], 0x8a
mov dword [ebp - 0x18], 3
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x28]
jmp 0x594ea0
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret