Function at 0x5845f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov rbx, qword [rsp + 0xd0]
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0xb8], rdx
mov qword [rsp + 0xc0], r8
mov qword [rsp + 0xc8], r9
test r8, r8
je 0x584906
mov qword [rsp + 0x28], 0
mov rdi, rbx
nop dword [rax]
mov rax, qword [rsp + 0x28]
mov rdx, qword [rsp + 0xb0]
mov rsi, qword [rdi]
mov r8, qword [rsp + 0xc8]
mov rbx, rax
mov dword [rsp + 0x44], eax
not eax
shr rbx, 3
and eax, 7
movzx ebp, byte [rdx + rbx]
mov ecx, eax
mov qword [rsp + 0x38], rbx
mov rdx, rdi
mov dword [rsp + 0x40], eax
mov rbx, qword [rdi + 8]
sar ebp, cl
mov rcx, rdi
shl ebp, 7
mov byte [rsp + 0x37], bpl
call qword [rsp + 0xe8]
movzx eax, byte [rdi]
mov edx, dword [rsp + 0xe0]
xor eax, ebp
test edx, edx
je 0x5846a6
mov byte [rsp + 0x37], al
mov r15d, ebx
mov r14, rbx
mov byte [rsp + 0x5c], al
mov eax, esi
shr r15d, 0x18
shr r14, 0x28
movzx eax, ah
mov r12, rsi
mov dword [rsp + 0x48], r15d
movzx r15d, r14b
mov r14, rbx
mov r13d, eax
shr r14, 0x30
shr r12, 0x10
mov rcx, rsi
mov dword [rsp + 0x4c], r15d
movzx r14d, r14b
movzx r12d, r12b
shr rcx, 0x20
lea r15d, [rsi + rsi]
mov dword [rsp + 0x58], r14d
mov r14, rbx
mov r11d, esi
movzx ecx, cl
shr r14, 0x38
mov r8, rsi
mov r9, rsi
mov rax, rsi
mov qword [rsp + 0x50], r14
mov r14d, r13d
shr esi, 0x1f
movzx r10d, bl
sar r14d, 7
shr r11d, 0x18
mov rbp, rbx
mov rdx, rbx
or r15d, r14d
mov r14d, r12d
add r12d, r12d
shr r8, 0x28
or esi, r12d
mov r12d, ecx
movzx r8d, r8b
add r11d, r11d
sar r12d, 7
shr r9, 0x30
add ecx, ecx
add r13d, r13d
or r11d, r12d
mov r12d, r8d
movzx r9d, r9b
shr rax, 0x38
sar r12d, 7
add r8d, r8d
sar r14d, 7
movzx r11d, r11b
or ecx, r12d
mov r12d, r9d
add r9d, r9d
or r13d, r14d
sar r12d, 7
shr rbp, 0x10
movzx ecx, cl
movzx esi, sil
or r8d, r12d
mov r12d, eax
shr rdx, 0x20
movzx r13d, r13b
sar r12d, 7
movzx r8d, r8b
movzx r15d, r15b
movzx ebp, bpl
or r9d, r12d
mov r12d, r10d
add eax, eax
add r10d, r10d
sar r12d, 7
movzx r9d, r9b
movzx edx, dl
mov r14d, dword [rsp + 0x58]
or eax, r12d
movzx eax, al
shl rax, 8
or rax, r9
mov r9d, r14d
shl rax, 8
or rax, r8
mov r8d, edx
add edx, edx
shl rax, 8
sar r8d, 7
or rax, rcx
movzx ecx, bh
shr ebx, 0x1f
shl rax, 8
or rax, r11
lea r11d, [r14 + r14]
shl rax, 8
or rax, rsi
mov esi, dword [rsp + 0x50]
shl rax, 8
or rax, r13
shl rax, 8
or rax, r15
mov r15d, dword [rsp + 0x4c]
mov qword [rdi], rax
mov eax, ecx
add ecx, ecx
sar eax, 7
or r10d, eax
mov eax, ebp
add ebp, ebp
sar eax, 7
or ebx, ebp
movzx r10d, r10b
or eax, ecx
mov ecx, dword [rsp + 0x48]
movzx ebx, bl
movzx eax, al
add ecx, ecx
or ecx, r8d
mov r8d, r15d
sar r8d, 7
movzx ecx, cl
or edx, r8d
sar r9d, 7
lea r8d, [r15 + r15]
add qword [rsp + 0x28], 1
or r8d, r9d
mov r9d, esi
add esi, esi
movzx edx, dl
sar r9d, 7
movzx r8d, r8b
or r9d, r11d
mov r11d, esi
movzx esi, byte [rsp + 0x37]
movzx r9d, r9b
shr sil, 7
or esi, r11d
movzx esi, sil
shl rsi, 8
or rsi, r9
shl rsi, 8
or rsi, r8
mov r8, qword [rsp + 0x38]
add r8, qword [rsp + 0xb8]
shl rsi, 8
or rsi, rdx
mov edx, dword [rsp + 0x5c]
shl rsi, 8
or rsi, rcx
movzx ecx, byte [rsp + 0x40]
and edx, 0x80
shl rsi, 8
or rsi, rbx
shl rsi, 8
or rsi, rax
mov eax, 1
shl eax, cl
mov ecx, dword [rsp + 0x44]
shl rsi, 8
or rsi, r10
not eax
and ecx, 7
mov qword [rdi + 8], rsi
and al, byte [r8]
sar edx, cl
or edx, eax
mov rax, qword [rsp + 0x28]
mov byte [r8], dl
cmp qword [rsp + 0xc0], rax
jne 0x584640
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret