Function at 0x40f0c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x552064]
xor eax, ebp
mov dword [ebp - 8], eax
movd xmm0, dword [ebp + 0x14]
cvtdq2pd xmm0, xmm0
push ebx
push esi
push edi
sub esp, 8
mov dword [ebp - 0x40], ecx
mov edi, edx
mulsd xmm0, qword [ebp + 0x24]
movsd qword [esp], xmm0
call fcn.0050322a
movd xmm0, dword [ebp + 0x18]
cvtdq2pd xmm0, xmm0
fstp qword [ebp - 0x64]
mulsd xmm0, qword [ebp + 0x24]
cvttsd2si esi, qword [ebp - 0x64]
movsd qword [esp], xmm0
call fcn.0050322a
fstp qword [ebp - 0x64]
cvttsd2si ecx, qword [ebp - 0x64]
mov eax, edi
lea ebx, [esi + edi]
sub eax, esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 8]
mov edx, eax
sub edx, ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x28], edx
lea edi, [ecx + eax]
mov eax, dword [esi]
mov ecx, dword [esi + 8]
mov dword [ebp - 0x50], eax
sub ecx, dword [ebp - 0x50]
mov eax, dword [esi + 4]
mov esi, dword [esi + 0xc]
sub esi, eax
mov dword [ebp - 0x20], edi
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x48], esi
mulsd xmm0, qword [ebp + 0x24]
movsd qword [esp], xmm0
call fcn.0050322a
movd xmm0, esi
cvtdq2pd xmm0, xmm0
fstp qword [ebp - 0x6c]
mulsd xmm0, qword [ebp + 0x24]
movsd qword [esp], xmm0
call fcn.0050322a
fstp qword [ebp - 0x64]
cvttsd2si eax, qword [ebp - 0x64]
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0xc]
push dword [eax + 0xc]
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00468cd0
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x4c]
lea ecx, [ebp - 0x28]
push dword [eax + 0x1c]
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00468cd0
add esp, 0x20
cmp dword [ebp - 0x48], 0
jle 0x410c9d
mov esi, dword [ebp - 0x44]
test esi, esi
jle 0x410c9d
cmp ebx, dword [ebp - 0x38]
jle 0x410c9d
cmp edi, dword [ebp - 0xc]
jle 0x410c9d
cvttsd2si eax, qword [ebp - 0x6c]
shl eax, 2
call fcn.004e70b0
cvttsd2si eax, qword [ebp - 0x6c]
xor ecx, ecx
mov dword [ebp - 0x58], esp
test eax, eax
jle 0x40f24a
sub ebx, dword [ebp - 0x38]
xor edi, edi
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x10], ebx
lea ebx, [esi - 1]
nop dword [eax + eax]
mov eax, edi
cdq
idiv dword [ebp - 0x10]
mov edx, dword [ebp + 0x10]
sub eax, dword [ebp - 0x50]
add eax, dword [edx]
mov edx, esp
cmp ebx, eax
cmovle eax, ebx
add edi, esi
mov dword [edx + ecx*4], eax
inc ecx
cvttsd2si eax, qword [ebp - 0x6c]
cmp ecx, eax
jl 0x40f220
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x20]
lea eax, [esi*4]
call fcn.004e70b0
xor ecx, ecx
mov dword [ebp - 0x54], esp
test esi, esi
jle 0x40f294
sub edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x20], edi
mov edi, dword [ebp - 0x48]
dec edi
sub ebx, dword [ebp - 0xc]
nop
lea eax, [ebx + ecx]
imul eax, dword [ebp - 0x24]
cdq
idiv dword [ebp - 0x20]
mov edx, dword [ebp + 0x10]
sub eax, dword [ebp - 0x4c]
add eax, dword [edx + 4]
mov edx, dword [ebp - 0x54]
cmp edi, eax
cmovle eax, edi
mov dword [edx + ecx*4], eax
inc ecx
cmp ecx, esi
jl 0x40f270
mov edi, dword [ebp - 0x40]
movd xmm1, dword [ebp + 0x1c]
cvtdq2pd xmm1, xmm1
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x1c]
sub ecx, dword [ebp - 0x28]
cdq
dec ecx
xor eax, edx
sub eax, edx
mulsd xmm1, qword [ebp + 0x24]
imul eax, ecx
mov ecx, dword [ebp - 0x38]
movsd qword [ebp - 0x64], xmm1
lea ebx, [eax + ecx*4]
mov eax, dword [ebp + 0xc]
add ebx, dword [edi + 8]
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp + 0xc]
movzx ecx, byte [eax + 0x55]
mov edx, dword [eax + 0x10]
and ecx, 3
xor eax, eax
shl ecx, 2
cmp byte [ebx + 0x54], al
mov ebx, 2
mov dword [ebp - 0x28], edx
setne al
or ecx, eax
xor eax, eax
cmp edx, 0xff
cmovl eax, ebx
mov ebx, dword [ebp - 0x20]
or ecx, eax
jmp dword [ecx*4 + 0x410cb4]
lea esp, [ebp - 0x84]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004e66f2
mov esp, ebp
pop ebp
ret