Function at 0x4f56d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0xc90
push ebx
mov eax, dword [edx + 0x870]
push esi
add eax, 0x20
mov dword [esp + 8], eax
push edi
push ebp
and eax, 0x1fffffff
mov dword [esp + 0x14], eax
cmp eax, 0x64
jb 0x4f5706
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc90
ret
mov esi, dword [esp + 0x10]
lea edi, [esp + 0x660]
shl esi, 4
xor eax, eax
mov ecx, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
lea edi, [esp + 0x20]
mov ecx, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0xcb8]
test eax, eax
je 0x4f5903
mov esi, dword [esp + 0xca8]
mov edi, dword [esp + 0xcac]
mov ebp, dword [esp + 0xcb0]
mov dword [esp + 0x18], eax
mov ebx, esi
xor eax, eax
shr ebx, 3
mov ecx, dword [edx + 0x34]
mov al, byte [ebx + ecx]
mov ebx, 1
mov ecx, esi
and cl, 7
shl ebx, cl
mov ecx, dword [edx + 0x30]
test ebx, eax
jne 0x4f5788
xor eax, eax
mov al, byte [ecx + esi]
jmp 0x4f5817
mov bl, byte [ecx + esi]
mov eax, dword [edx + 0x2c]
cmp bl, 7
mov ecx, dword [eax + ebp*4]
jae 0x4f57d9
cmp ecx, 0x400
jb 0x4f57c3
cmp ecx, 0x80000
jb 0x4f57b2
shr ecx, 0x11
xor eax, eax
mov al, cl
add eax, 0x22
jmp 0x4f57cc
shr ecx, 9
xor eax, eax
mov al, byte [ecx + edx + 0x45c]
add eax, 0x12
jmp 0x4f57cc
xor eax, eax
mov al, byte [edx + ecx + 0x45c]
xor ecx, ecx
mov cl, bl
lea eax, [ecx + eax*8 + 0x100]
jmp 0x4f5816
cmp ecx, 0x400
jb 0x4f5806
cmp ecx, 0x80000
jb 0x4f57f5
shr ecx, 0x11
xor eax, eax
mov al, cl
add eax, 0x22
jmp 0x4f580f
shr ecx, 9
xor eax, eax
mov al, byte [ecx + edx + 0x45c]
add eax, 0x12
jmp 0x4f580f
xor eax, eax
mov al, byte [edx + ecx + 0x45c]
lea eax, [eax*8 + 0x107]
inc ebp
inc word [esp + eax*2 + 0x660]
inc esi
mov ebx, edi
xor eax, eax
shr ebx, 3
mov ecx, dword [edx + 0x34]
mov al, byte [ebx + ecx]
mov ebx, 1
mov ecx, edi
and cl, 7
shl ebx, cl
test ebx, eax
jne 0x4f584a
mov ecx, dword [edx + 0x30]
xor eax, eax
mov al, byte [ecx + edi]
jmp 0x4f58f3
mov eax, dword [edx + 0x30]
mov al, byte [eax + edi]
cmp al, 7
jae 0x4f58a4
mov ebx, dword [edx + 0x2c]
mov ecx, dword [esp + 0xcb4]
mov ecx, dword [ebx + ecx*4]
cmp ecx, 0x400
jb 0x4f588e
cmp ecx, 0x80000
jb 0x4f587d
shr ecx, 0x11
xor ebx, ebx
mov bl, cl
add ebx, 0x22
jmp 0x4f5897
shr ecx, 9
xor ebx, ebx
mov bl, byte [ecx + edx + 0x45c]
add ebx, 0x12
jmp 0x4f5897
xor ebx, ebx
mov bl, byte [edx + ecx + 0x45c]
xor ecx, ecx
mov cl, al
lea eax, [ecx + ebx*8 + 0x100]
jmp 0x4f58ec
mov eax, dword [edx + 0x2c]
mov ecx, dword [esp + 0xcb4]
mov eax, dword [eax + ecx*4]
cmp eax, 0x400
jb 0x4f58dc
cmp eax, 0x80000
jb 0x4f58cb
shr eax, 0x11
xor ecx, ecx
mov cl, al
add ecx, 0x22
jmp 0x4f58e5
shr eax, 9
xor ecx, ecx
mov cl, byte [eax + edx + 0x45c]
add ecx, 0x12
jmp 0x4f58e5
xor ecx, ecx
mov cl, byte [edx + eax + 0x45c]
lea eax, [ecx*8 + 0x107]
inc dword [esp + 0xcb4]
inc word [esp + eax*2 + 0x20]
inc edi
dec dword [esp + 0x18]
jne 0x4f575e
xor esi, esi
cmp dword [esp + 0x14], esi
je 0x4f5990
lea edi, [esp + 0x20]
lea ecx, [esp + 0x660]
mov ebx, dword [esp + 0x10]
shl ebx, 3
mov ax, word [ecx]
cmp ax, 0x100
jb 0x4f593e
shr ax, 8
movzx edx, ax
xor eax, eax
mov al, byte [edx + 0x5705b0]
add eax, 8
jmp 0x4f5949
movzx edx, ax
xor eax, eax
mov al, byte [edx + 0x5705b0]
mov dx, word [edi]
cmp dx, 0x100
jb 0x4f5967
shr dx, 8
movzx ebp, dx
xor edx, edx
mov dl, byte [ebp + 0x5705b0]
add edx, 8
jmp 0x4f5972
movzx ebp, dx
xor edx, edx
mov dl, byte [ebp + 0x5705b0]
mov eax, dword [eax*4 + 0x570568]
add edi, 2
sub eax, dword [edx*4 + 0x570568]
add ecx, 2
cdq
xor eax, edx
sub esi, edx
add esi, eax
dec ebx
jne 0x4f5921
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc90
ret