Function at 0x52ef90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov dword [esp + 0xc], edx
mov dword [esp], ecx
cmp dword [esp + 0x2c], 0
js 0x52f50b
mov eax, dword [esp + 0xc]
movzx ebp, word [eax + 2]
xor eax, eax
test ebp, ebp
sete al
mov esi, 0x8a
mov ecx, 7
cmove ecx, esi
mov edx, 4
sub edx, eax
mov edi, 0xffffffff
xor eax, eax
xor esi, esi
jmp 0x52f002
xor ecx, ecx
cmp ebx, ebp
sete cl
mov edx, 4
sub edx, ecx
xor ecx, 7
mov edi, ebx
lea ebx, [eax + 1]
cmp eax, dword [esp + 0x2c]
mov eax, ebx
je 0x52f50b
mov ebx, ebp
mov ebp, dword [esp + 0xc]
movzx ebp, word [ebp + eax*4 + 6]
mov dword [esp + 4], esi
add esi, 1
cmp esi, ecx
jge 0x52f01c
cmp ebx, ebp
je 0x52eff3
cmp esi, edx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 8], ebx
jge 0x52f0f0
mov eax, dword [esp]
mov ecx, dword [eax + 0x170c]
jmp 0x52f055
add ecx, edx
mov dword [eax + 0x170c], ecx
add esi, 0xffffffff
mov ebx, dword [esp + 8]
je 0x52f4ea
movzx edx, word [eax + ebx*4 + 0xace]
mov ebp, 0x10
sub ebp, edx
movzx edi, word [eax + ebx*4 + 0xacc]
mov ebx, edi
shl ebx, cl
or bx, word [eax + 0x1708]
mov word [eax + 0x1708], bx
cmp ecx, ebp
jle 0x52f040
mov ecx, dword [eax + 8]
mov dword [esp + 4], ecx
mov ebp, dword [eax + 0x14]
lea eax, [ebp + 1]
mov ecx, dword [esp]
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 4]
mov byte [eax + ebp], bl
mov eax, dword [esp]
movzx eax, byte [eax + 0x1709]
mov byte [esp + 4], al
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov ebx, dword [esp]
mov ebx, dword [ebx + 0x14]
lea ebp, [ebx + 1]
mov eax, dword [esp]
mov dword [eax + 0x14], ebp
movzx eax, byte [esp + 4]
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov ebx, dword [eax + 0x170c]
mov cl, 0x10
sub cl, bl
shr edi, cl
mov word [eax + 0x1708], di
lea ecx, [edx + ebx]
add ecx, 0xfffffff0
jmp 0x52f042
test ebx, ebx
mov edx, dword [esp]
je 0x52f10e
cmp ebx, edi
jne 0x52f1ae
mov ecx, dword [edx + 0x170c]
mov dword [esp + 4], esi
jmp 0x52f2c4
cmp dword [esp + 4], 9
jg 0x52f227
movzx esi, word [edx + 0xb12]
mov edx, dword [edx + 0x170c]
mov eax, 0x10
mov ecx, dword [esp]
movzx edi, word [ecx + 0xb10]
mov ebx, edi
mov ecx, edx
shl ebx, cl
sub eax, esi
mov ecx, dword [esp]
or bx, word [ecx + 0x1708]
cmp edx, eax
mov eax, dword [esp]
jle 0x52f3bc
mov word [eax + 0x1708], bx
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x14]
lea ebp, [ecx + 1]
mov edx, dword [esp]
mov dword [edx + 0x14], ebp
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov al, byte [eax + 0x1709]
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
mov ebx, dword [edx + 0x14]
lea ebp, [ebx + 1]
mov edx, dword [esp]
mov dword [edx + 0x14], ebp
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov ebx, dword [eax + 0x170c]
mov cl, 0x10
sub cl, bl
shr edi, cl
lea ecx, [esi + ebx]
add ecx, 0xfffffff0
mov ebx, edi
jmp 0x52f3c0
movzx esi, word [edx + ebx*4 + 0xace]
mov ecx, dword [edx + 0x170c]
mov eax, 0x10
sub eax, esi
movzx edi, word [edx + ebx*4 + 0xacc]
mov ebx, edi
shl ebx, cl
or bx, word [edx + 0x1708]
mov word [edx + 0x1708], bx
cmp ecx, eax
jle 0x52f2bc
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0x14]
lea ebp, [ecx + 1]
mov dword [edx + 0x14], ebp
mov byte [eax + ecx], bl
mov al, byte [edx + 0x1709]
mov ecx, dword [edx + 8]
mov ebx, dword [edx + 0x14]
lea ebp, [ebx + 1]
mov dword [edx + 0x14], ebp
mov byte [ecx + ebx], al
mov ebx, dword [edx + 0x170c]
mov cl, 0x10
sub cl, bl
shr edi, cl
mov word [edx + 0x1708], di
lea ecx, [esi + ebx]
add ecx, 0xfffffff0
jmp 0x52f2be
movzx esi, word [edx + 0xb16]
mov edx, dword [edx + 0x170c]
mov eax, 0x10
mov ecx, dword [esp]
movzx edi, word [ecx + 0xb14]
mov ebx, edi
mov ecx, edx
shl ebx, cl
sub eax, esi
mov ecx, dword [esp]
or bx, word [ecx + 0x1708]
cmp edx, eax
mov eax, dword [esp]
jle 0x52f440
mov word [eax + 0x1708], bx
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x14]
lea ebp, [ecx + 1]
mov edx, dword [esp]
mov dword [edx + 0x14], ebp
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov al, byte [eax + 0x1709]
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
mov ebx, dword [edx + 0x14]
lea ebp, [ebx + 1]
mov edx, dword [esp]
mov dword [edx + 0x14], ebp
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov ebx, dword [eax + 0x170c]
mov cl, 0x10
sub cl, bl
shr edi, cl
lea ecx, [esi + ebx]
add ecx, 0xfffffff0
mov ebx, edi
jmp 0x52f444
add ecx, esi
mov dword [edx + 0x170c], ecx
movzx esi, word [edx + 0xb0e]
mov eax, 0x10
movzx edi, word [edx + 0xb0c]
mov ebx, edi
shl ebx, cl
sub eax, esi
or bx, word [edx + 0x1708]
cmp ecx, eax
jle 0x52f329
mov word [edx + 0x1708], bx
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0x14]
lea ebp, [ecx + 1]
mov dword [edx + 0x14], ebp
mov byte [eax + ecx], bl
mov al, byte [edx + 0x1709]
mov ecx, dword [edx + 8]
mov ebx, dword [edx + 0x14]
lea ebp, [ebx + 1]
mov dword [edx + 0x14], ebp
mov byte [ecx + ebx], al
mov ebx, dword [edx + 0x170c]
mov cl, 0x10
sub cl, bl
shr edi, cl
lea ecx, [esi + ebx]
add ecx, 0xfffffff0
mov ebx, edi
jmp 0x52f32b
add ecx, esi
mov eax, edx
mov edx, dword [esp + 4]
mov dword [eax + 0x170c], ecx
add edx, 0xfffd
cmp ecx, 0xf
jl 0x52f3a9
movzx esi, dx
shl edx, cl
or ebx, edx
mov word [eax + 0x1708], bx
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x14]
lea edx, [ecx + 1]
mov edi, dword [esp]
mov dword [edi + 0x14], edx
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov al, byte [eax + 0x1709]
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
mov edx, dword [edx + 0x14]
lea edi, [edx + 1]
mov ebx, dword [esp]
mov dword [ebx + 0x14], edi
mov byte [ecx + edx], al
mov eax, dword [esp]
mov edx, dword [eax + 0x170c]
mov cl, 0x10
sub cl, dl
shr esi, cl
mov ecx, edx
mov word [eax + 0x1708], si
add ecx, 0xfffffff2
jmp 0x52f4e0
shl edx, cl
or ebx, edx
mov word [eax + 0x1708], bx
add ecx, 2
jmp 0x52f4e0
mov ecx, edx
add ecx, esi
mov dword [eax + 0x170c], ecx
mov edx, dword [esp + 4]
add edx, 0xfffe
cmp ecx, 0xe
jl 0x52f4bd
movzx esi, dx
shl edx, cl
or ebx, edx
mov word [eax + 0x1708], bx
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x14]
lea edx, [ecx + 1]
mov edi, dword [esp]
mov dword [edi + 0x14], edx
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov al, byte [eax + 0x1709]
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
mov edx, dword [edx + 0x14]
lea edi, [edx + 1]
mov ebx, dword [esp]
mov dword [ebx + 0x14], edi
mov byte [ecx + edx], al
mov eax, dword [esp]
mov edx, dword [eax + 0x170c]
mov cl, 0x10
sub cl, dl
shr esi, cl
mov ecx, edx
mov word [eax + 0x1708], si
add ecx, 0xfffffff3
jmp 0x52f4e0
mov ecx, edx
add ecx, esi
mov dword [eax + 0x170c], ecx
mov edx, dword [esp + 4]
add edx, 0xfff6
cmp ecx, 0xa
jl 0x52f4cd
movzx esi, dx
shl edx, cl
or ebx, edx
mov word [eax + 0x1708], bx
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x14]
lea edx, [ecx + 1]
mov edi, dword [esp]
mov dword [edi + 0x14], edx
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov al, byte [eax + 0x1709]
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
mov edx, dword [edx + 0x14]
lea edi, [edx + 1]
mov ebx, dword [esp]
mov dword [ebx + 0x14], edi
mov byte [ecx + edx], al
mov eax, dword [esp]
mov edx, dword [eax + 0x170c]
mov cl, 0x10
sub cl, dl
shr esi, cl
mov ecx, edx
mov word [eax + 0x1708], si
add ecx, 0xfffffff7
jmp 0x52f4e0
shl edx, cl
or ebx, edx
mov word [eax + 0x1708], bx
add ecx, 3
jmp 0x52f4e0
shl edx, cl
or ebx, edx
mov word [eax + 0x1708], bx
add ecx, 7
nop dword [eax + eax]
mov ebx, dword [esp + 8]
mov dword [eax + 0x170c], ecx
xor esi, esi
mov ebp, dword [esp + 0x14]
test ebp, ebp
mov eax, dword [esp + 0x10]
jne 0x52efe0
mov ecx, 0x8a
mov edx, 3
jmp 0x52eff1
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret