Function at 0x51fb84
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xfffff794
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x5200a0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0x14]
mov edx, 0x5200b8
call fcn.004046b8
jne 0x51fc65
mov eax, dword [ebx + 0x24]
mov edx, 0x5200c8
call fcn.004046b8
je 0x51fbe1
mov eax, dword [ebx + 0x24]
mov edx, 0x5200dc
call fcn.004046b8
jne 0x51fc65
mov eax, dword [ebx + 0x2c]
call fcn.0040456c
lea eax, [eax + eax*2]
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4f3df0]
call fcn.00405974
add esp, 4
mov eax, dword [ebx + 0x2c]
call fcn.0040456c
dec eax
test eax, eax
jl 0x51fc45
inc eax
mov dword [ebp - 0x10], eax
xor esi, esi
lea eax, [esi + esi*2]
mov edx, dword [ebp - 4]
mov ecx, dword [ebx + 0x2c]
mov cl, byte [ecx + esi]
mov byte [edx + eax], cl
mov edx, dword [ebp - 4]
mov ecx, dword [ebx + 0x2c]
mov cl, byte [ecx + esi]
mov byte [edx + eax + 1], cl
mov edx, dword [ebp - 4]
mov ecx, dword [ebx + 0x2c]
mov cl, byte [ecx + esi]
mov byte [edx + eax + 2], cl
inc esi
dec dword [ebp - 0x10]
jne 0x51fc16
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x114]
call fcn.004f43c4
lea eax, [ebx + 0x14]
mov edx, 0x5200c8
call fcn.00404300
jmp 0x520084
mov eax, dword [ebx + 0x14]
mov edx, 0x5200b8
call fcn.004046b8
jne 0x51fd01
mov eax, dword [ebx + 0x24]
mov edx, 0x5200ec
call fcn.004046b8
je 0x51fc96
mov eax, dword [ebx + 0x24]
mov edx, 0x520100
call fcn.004046b8
jne 0x51fd01
xor ecx, ecx
mov edx, 8
mov eax, dword [ebx + 0x114]
call fcn.004f41a0
mov eax, dword [ebx + 0x2c]
call fcn.0040456c
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4f3df0]
call fcn.00405974
add esp, 4
mov eax, dword [ebx + 0x2c]
call fcn.0040456c
push eax
lea eax, [ebx + 0x2c]
call fcn.004047c4
mov edx, dword [ebp - 4]
pop ecx
call fcn.004029a4
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x114]
call fcn.004f43c4
lea eax, [ebx + 0x14]
mov edx, 0x5200ec
call fcn.00404300
jmp 0x520084
mov eax, dword [ebx + 0x14]
mov edx, 0x5200b8
call fcn.004046b8
jne 0x51fedc
mov eax, dword [ebx + 0x24]
mov edx, 0x520110
call fcn.004046b8
jne 0x51fedc
mov eax, dword [ebx + 0x2c]
call fcn.0040456c
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
lea eax, [eax + eax*2]
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4f3df0]
call fcn.00405974
add esp, 4
mov byte [ebp - 9], 0
lea esi, [ebp - 0x868]
lea edi, [ebp - 0x1068]
lea eax, [ebp - 0x1868]
mov dword [ebp - 0x14], eax
xor eax, eax
mov al, byte [ebp - 9]
imul eax, eax, 0x64
mov dword [ebp - 0x186c], eax
fild dword [ebp - 0x186c]
fdiv dword [0x520114]
fstp qword [esi]
wait
push 0x406fe000
push 0
xor edx, edx
mov dl, byte [ebp - 9]
mov eax, dword [ebx + 0xe0]
call fcn.004d970c
fstp qword [edi]
wait
push 0x406fe000
push 0
xor edx, edx
mov dl, byte [ebp - 9]
mov eax, dword [ebx + 0xe0]
call fcn.004d9734
mov eax, dword [ebp - 0x14]
fstp qword [eax]
wait
inc byte [ebp - 9]
add dword [ebp - 0x14], 8
add edi, 8
add esi, 8
cmp byte [ebp - 9], 0
jne 0x51fd70
mov eax, dword [ebp - 8]
dec eax
test eax, eax
jl 0x51febc
inc eax
mov dword [ebp - 0x10], eax
xor esi, esi
lea eax, [esi + esi*2]
mov edx, dword [ebx + 0x2c]
movzx eax, byte [edx + eax]
mov edx, dword [ebp + eax*8 - 0x868]
mov dword [ebp - 0x68], edx
mov edx, dword [ebp + eax*8 - 0x864]
mov dword [ebp - 0x64], edx
lea eax, [esi + esi*2]
mov edx, dword [ebx + 0x2c]
movzx eax, byte [edx + eax + 1]
mov edx, dword [ebp + eax*8 - 0x1068]
mov dword [ebp - 0x60], edx
mov edx, dword [ebp + eax*8 - 0x1064]
mov dword [ebp - 0x5c], edx
lea eax, [esi + esi*2]
mov edx, dword [ebx + 0x2c]
movzx eax, byte [edx + eax + 2]
mov edx, dword [ebp + eax*8 - 0x1868]
mov dword [ebp - 0x58], edx
mov edx, dword [ebp + eax*8 - 0x1864]
mov dword [ebp - 0x54], edx
lea ecx, [ebp - 0x30]
lea edx, [ebp - 0x68]
mov eax, dword [ebx + 0xbc]
mov edi, dword [eax]
call dword [edi + 8]
fld qword [ebp - 0x30]
fmul dword [0x520114]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.004d49d0
lea edx, [esi + esi*2]
mov ecx, dword [ebp - 4]
mov byte [ecx + edx], al
fld qword [ebp - 0x28]
fmul dword [0x520114]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.004d49d0
lea edx, [esi + esi*2]
mov ecx, dword [ebp - 4]
mov byte [ecx + edx + 1], al
fld qword [ebp - 0x20]
fmul dword [0x520114]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.004d49d0
lea edx, [esi + esi*2]
mov ecx, dword [ebp - 4]
mov byte [ecx + edx + 2], al
inc esi
dec dword [ebp - 0x10]
jne 0x51fde9
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x114]
call fcn.004f43c4
lea eax, [ebx + 0x14]
mov edx, 0x5200ec
call fcn.00404300
jmp 0x520084
mov eax, dword [ebx + 0x14]
mov edx, 0x5200b8
call fcn.004046b8
jne 0x520062
mov eax, dword [ebx + 0x24]
mov edx, 0x520120
call fcn.004046b8
jne 0x520062
mov eax, dword [ebx + 0x2c]
call fcn.0040456c
test eax, eax
jns 0x51ff11
add eax, 3
sar eax, 2
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
lea eax, [eax + eax*2]
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4f3df0]
call fcn.00405974
add esp, 4
mov eax, dword [ebp - 8]
dec eax
test eax, eax
jl 0x520045
inc eax
mov dword [ebp - 0x10], eax
xor esi, esi
mov eax, esi
shl eax, 2
mov edx, dword [ebx + 0x2c]
mov dl, byte [edx + eax]
and edx, 0xff
mov dword [ebp - 0x186c], edx
fild dword [ebp - 0x186c]
fdiv dword [0x520114]
fstp qword [ebp - 0x50]
wait
mov edx, dword [ebx + 0x2c]
mov dl, byte [edx + eax + 1]
and edx, 0xff
mov dword [ebp - 0x186c], edx
fild dword [ebp - 0x186c]
fdiv dword [0x520114]
fstp qword [ebp - 0x48]
wait
mov edx, dword [ebx + 0x2c]
mov dl, byte [edx + eax + 2]
and edx, 0xff
mov dword [ebp - 0x186c], edx
fild dword [ebp - 0x186c]
fdiv dword [0x520114]
fstp qword [ebp - 0x40]
wait
mov edx, dword [ebx + 0x2c]
mov al, byte [edx + eax + 3]
and eax, 0xff
mov dword [ebp - 0x186c], eax
fild dword [ebp - 0x186c]
fdiv dword [0x520114]
fstp qword [ebp - 0x38]
wait
lea ecx, [ebp - 0x30]
lea edx, [ebp - 0x50]
mov eax, dword [ebx + 0xbc]
mov edi, dword [eax]
call dword [edi]
fld qword [ebp - 0x30]
fmul dword [0x520114]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.004d49d0
lea edi, [esi + esi*2]
mov edx, dword [ebp - 4]
mov byte [edx + edi], al
fld qword [ebp - 0x28]
fmul dword [0x520114]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.004d49d0
mov edx, dword [ebp - 4]
mov byte [edx + edi + 1], al
fld qword [ebp - 0x20]
fmul dword [0x520114]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.004d49d0
mov edx, dword [ebp - 4]
mov byte [edx + edi + 2], al
inc esi
dec dword [ebp - 0x10]
jne 0x51ff46
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x114]
call fcn.004f43c4
lea eax, [ebx + 0x14]
mov edx, 0x5200ec
call fcn.00404300
jmp 0x520084
mov eax, dword [ebx + 0x14]
mov edx, 0x5200b8
call fcn.004046b8
jne 0x520084
mov eax, dword [ebx + 0x24]
mov edx, 0x5200c8
call fcn.004046b8
jne 0x520084
cmp dword [ebx + 0x20], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5200a7
lea eax, [ebp - 4]
mov edx, dword [0x4f3df0]
call fcn.00405a94
ret