Function at 0x4f2720
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [ebp - 0x14], 0
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x1c]
mov eax, edx
sar edx, 0x1f
add ecx, ebx
idiv dword [ebp + 0x14]
mov edx, ecx
mov dword [ebp - 0x10], eax
mov eax, edx
mov dword [ebp - 0x24], ecx
sar edx, 0x1f
idiv dword [ebp + 0x14]
cmp eax, dword [ebp - 0x10]
jle 0x4f2813
lea esi, [esi]
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x28]
mov dword [ebp - 0x1c], esi
push ecx
push ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x24]
push edx
mov eax, dword [ebp + 0x18]
push eax
call fcn.004e78a0
add esp, 0x10
mov ecx, eax
test eax, eax
js 0x4f2911
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x20]
mov ebx, dword [eax + ecx*4]
test ebx, ebx
js 0x4f2830
push eax
push eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x1c]
movsx eax, byte [eax + ebx - 1]
push eax
mov eax, dword [ebp + 0x18]
push eax
call fcn.004e7a70
add esp, 0x10
lea eax, [ebx - 1]
cmp eax, 0xffffffff
je 0x4f2930
mov esi, dword [ebp + 8]
xor ecx, ecx
mov ebx, dword [esi]
mov edx, ebx
imul edx, eax
mov eax, dword [esi + 0x10]
cmp ebx, 0
lea edx, [eax + edx*4]
jle 0x4f27ff
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
inc esi
mov dword [ebp - 0x14], esi
mov esi, dword [ebp + 0xc]
fld dword [edx + ecx*4]
mov eax, dword [esi + eax*4]
mov esi, dword [ebp - 0x10]
fadd dword [eax + esi*4]
fstp dword [eax + esi*4]
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 0x14], eax
je 0x4f2820
inc ecx
cmp ebx, ecx
jg 0x4f27d6
mov edx, dword [ebp - 0x24]
mov eax, edx
sar edx, 0x1f
idiv dword [ebp + 0x14]
cmp eax, dword [ebp - 0x10]
jg 0x4f2760
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
inc ecx
inc esi
cmp ebx, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], esi
jmp 0x4f27d4
mov esi, ebx
mov edi, dword [edx + 8]
sar esi, 0xf
and ebx, 0x7fff
and esi, 0x7fff
sub edi, ebx
push eax
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp + 0x18]
push eax
call fcn.004e78a0
mov edx, eax
add esp, 0x10
shr edx, 0x1f
mov ecx, eax
cmp dword [ebp - 0x1c], 1
setg al
test eax, edx
je 0x4f289b
lea esi, [esi]
push ebx
push ebx
mov ecx, dword [ebp - 0x1c]
dec ecx
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp + 0x18]
push eax
call fcn.004e78a0
mov edx, eax
add esp, 0x10
shr edx, 0x1f
mov ecx, eax
cmp dword [ebp - 0x1c], 1
setg al
test eax, edx
jne 0x4f2870
test ecx, ecx
js 0x4f2930
mov eax, ecx
call fcn.004f1ce0
mov dword [ebp - 0x20], eax
mov eax, edi
sub eax, esi
cmp eax, 1
jle 0x4f28ec
mov edx, dword [ebp + 8]
mov ebx, dword [edx + 0x14]
lea esi, [esi]
mov ecx, eax
mov edx, dword [ebp - 0x20]
sar ecx, 1
lea eax, [ecx + esi]
cmp dword [ebx + eax*4], edx
seta dl
and edx, 0xff
lea eax, [edx - 1]
neg edx
and edx, ecx
and eax, ecx
sub edi, edx
add esi, eax
mov eax, edi
sub eax, esi
cmp eax, 1
jg 0x4f28c0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x1c]
movsx eax, byte [esi + eax]
cmp eax, dword [ebp - 0x1c]
jg 0x4f291e
push edx
push edx
push eax
mov eax, dword [ebp + 0x18]
push eax
call fcn.004e7a70
add esp, 0x10
mov eax, esi
jmp 0x4f27b6
mov eax, dword [ebp + 8]
xor esi, esi
mov edi, dword [eax + 8]
jmp 0x4f2846
push eax
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov edi, dword [ebp + 0x18]
push edi
call fcn.004e7a70
add esp, 0x10
lea esp, [ebp - 0xc]
or eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret