Function at 0x140005850
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
push rbp
push rsi
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x140079010]
xor rax, rsp
mov qword [rsp + 0x30], rax
movsd xmm2, qword [rsp + 0xa0]
mov r14, rcx
movsd qword [rsp + 0x28], xmm2
mov r15, rdx
movzx eax, byte [rsp + 0x28]
mov rbp, r9
mov byte [rsp + 0x20], al
mov rbx, r8
movzx eax, byte [rsp + 0x29]
mov byte [rsp + 0x21], al
movzx eax, byte [rsp + 0x2a]
mov byte [rsp + 0x22], al
movzx eax, byte [rsp + 0x2b]
mov byte [rsp + 0x23], al
movzx eax, byte [rsp + 0x2c]
mov byte [rsp + 0x24], al
movzx eax, byte [rsp + 0x2d]
mov byte [rsp + 0x25], al
movzx eax, byte [rsp + 0x2e]
mov byte [rsp + 0x26], al
movzx eax, byte [rsp + 0x2f]
mov byte [rsp + 0x27], al
mov rdx, qword [rsp + 0x20]
mov rcx, rdx
mov rsi, rdx
sar rcx, 0x34
and ecx, 0x7ff
shr rsi, 0x3f
test esi, esi
je 0x1400058f2
xorps xmm2, xmmword [0x1400702e0]
cmp ecx, 0x7ff
jne 0x14000592f
movabs rax, 0xfffffffffffff
lea rcx, [0x140068544]
test rax, rdx
lea rax, [0x140068540]
cmovne rcx, rax
mov qword [r14], rcx
mov dword [r9], 0x7000
mov dword [r15], 3
jmp 0x140005c44
test ecx, ecx
jne 0x14000597a
movabs rax, 0x7fffffffffffffff
test rax, rdx
jne 0x140005959
mov edx, 1
mov dword [r9], edx
mov qword [r14], rbx
mov byte [r8], 0x30
mov dword [r15], edx
jmp 0x140005c44
movabs rax, 0x8000000000000
test rax, rdx
jne 0x14000597a
nop dword [rax + rax]
dec ecx
sar rax, 1
test rdx, rax
je 0x140005970
lea eax, [rcx - 0x3ff]
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], r12
test eax, eax
jns 0x1400059a3
imul eax, eax, 0x269
cdq
and edx, 0x7ff
lea edi, [rdx + rax]
sar edi, 0xb
jmp 0x1400059b8
imul eax, eax, 0x4d1
cdq
and edx, 0xfff
lea edi, [rdx + rax]
sar edi, 0xc
inc edi
mov r9d, 0x12
lea rdx, [rsp + 0x20]
sub r9d, edi
lea rcx, [rsp + 0x28]
call fcn.140004e90
movsd xmm4, qword [rsp + 0x28]
lea r11d, [rdi + 1]
cvttsd2si rcx, xmm4
movabs rax, 0xde0b6b3a7640000
movaps xmm3, xmm4
xorps xmm2, xmm2
cvtsi2sd xmm2, rcx
subsd xmm3, xmm2
movaps xmm1, xmm3
movaps xmm0, xmm3
subsd xmm1, xmm4
subsd xmm0, xmm1
addsd xmm1, xmm2
subsd xmm4, xmm0
subsd xmm4, xmm1
addsd xmm4, xmm3
addsd xmm4, qword [rsp + 0x20]
cvttsd2si r9, xmm4
add r9, rcx
mov ecx, dword [rsp + 0xa8]
cmp r9, rax
mov qword [rsp + 0x20], r9
cmovb r11d, edi
test ecx, ecx
jns 0x140005a45
and ecx, 0x7ffffff
inc ecx
jmp 0x140005a48
add ecx, r11d
lea r12, [0x140000000]
mov edi, r11d
cmp ecx, 0x18
jae 0x140005ad5
cmp r9, 0x3b9aca00
mov eax, 0xa
mov edx, 1
cmovb eax, edx
mov r10d, eax
cmp r9, qword [r12 + rax*8 + 0x699c0]
jb 0x140005a93
nop dword [rax + rax]
inc r10d
cmp r10d, 0x14
je 0x140005ad5
cmp r9, qword [r12 + r10*8 + 0x699c0]
jae 0x140005a80
cmp ecx, r10d
jae 0x140005ad5
mov eax, r10d
sub eax, ecx
cmp eax, 0x18
jae 0x140005ad5
cdqe
lea edi, [r11 + 1]
xor edx, edx
mov rcx, qword [r12 + rax*8 + 0x699c0]
mov r8, rcx
shr r8, 1
add r8, r9
mov rax, r8
div rcx
cmp r8, qword [r12 + r10*8 + 0x699c0]
mov r9, rax
mov qword [rsp + 0x20], rax
cmovb edi, r11d
test r9, r9
je 0x140005b70
mov eax, 0xffffffff
cmp r9, rax
jle 0x140005b30
movabs r11, 0x20c49ba5e353f7cf
movabs r10, 0x3e800000000
nop dword [rax]
mov rax, r11
mov r8, r9
imul r9
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul rcx, rdx, 0x3e8
cmp r9, rcx
jne 0x140005b70
mov qword [rsp + 0x20], rdx
mov r9, rdx
cmp r8, r10
jge 0x140005b00
mov r8d, dword [rsp + 0x20]
mov eax, 0x10624dd3
mul r8d
shr edx, 6
imul ecx, edx, 0x3e8
cmp r8d, ecx
jne 0x140005b68
nop dword [rax + rax]
mov r8d, edx
mov eax, 0x10624dd3
mul edx
shr edx, 6
imul ecx, edx, 0x3e8
cmp r8d, ecx
je 0x140005b50
mov r9d, r8d
mov qword [rsp + 0x20], r9
add rbx, 0x40
movabs r11, 0x55e63b88c230e77f
xor r8d, r8d
lea r10, [rbx - 8]
cmp r9, 0x5f5e100
jl 0x140005bb8
mov rax, r11
imul r9
sar rdx, 0x19
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul eax, edx, 0x5f5e100
mov qword [rsp + 0x20], rdx
sub r9d, eax
mov ecx, r9d
mov r9, rdx
jmp 0x140005bc4
mov ecx, dword [rsp + 0x20]
xor r9d, r9d
mov qword [rsp + 0x20], r9
test ecx, ecx
je 0x140005bfb
nop dword [rax + rax]
sub rbx, 2
mov eax, 0x51eb851f
mul ecx
add r8d, 2
shr edx, 5
imul eax, edx, 0x64
sub ecx, eax
add ecx, ecx
movzx eax, word [rcx + r12 + 0x79182]
mov ecx, edx
mov word [rbx], ax
test edx, edx
jne 0x140005bd0
test r9, r9
je 0x140005c21
cmp rbx, r10
je 0x140005b81
mov eax, ebx
sub eax, r10d
add r8d, eax
dec rbx
mov byte [rbx], 0x30
cmp rbx, r10
jne 0x140005c11
jmp 0x140005b81
mov r12, qword [rsp + 0x40]
test r8d, r8d
je 0x140005c36
cmp byte [rbx], 0x30
jne 0x140005c36
inc rbx
dec r8d
mov dword [rbp], edi
mov rdi, qword [rsp + 0x48]
mov qword [r14], rbx
mov dword [r15], r8d
mov eax, esi
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140065230
add rsp, 0x50
pop r15
pop r14
pop rsi
pop rbp
pop rbx
ret