Function at 0x180005790
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
sub rsp, 0x1a8
lea eax, [r8 + 0xd]
mov r10, rdx
mov r9, rcx
cmp r8d, eax
jae 0x180005b11
mov qword [r11 - 8], rbx
lea edx, [r8 - 0xdc]
mov qword [r11 - 0x10], rbp
mov r8d, 0xd
mov qword [r11 - 0x18], rsi
mov ebx, 0x3436
mov qword [r11 - 0x20], rdi
mov rdi, qword [rsp + 0x1c8]
mov qword [r11 - 0x28], r12
mov r12, qword [rsp + 0x1c8]
mov qword [r11 - 0x30], r13
mov dword [rsp + 0x1c0], edx
movzx esi, byte [rsp + 0x1c0]
movzx r13d, byte [rsp + 0x1c0]
mov qword [r11 - 0x38], r14
movzx r14d, byte [rsp + 0x1c0]
mov qword [r11 - 0x40], r15
lea r11, [0x180000000]
movzx r15d, byte [rsp + 0x1c0]
mov qword [rsp + 0x38], r8
nop dword [rax]
cmp edx, 0x13
ja case.0x180005844.6
mov ecx, dword [r11 + rdx*4 + 0x5b1c]
add rcx, r11
jmp rcx
movzx esi, byte [rsp + 0x151]
jmp case.0x180005844.6
movzx eax, word [0x18004cee6]
mov word [rsp + 0x32], ax
movzx eax, byte [0x18004cee8]
mov byte [rsp + 0x34], al
jmp case.0x180005844.6
mov rdx, qword [r10 + 0x18]
mov rcx, qword [r10 + 0x10]
mov rax, rdx
sub rax, rcx
cmp rax, 2
jb 0x1800058a5
lea rax, [rcx + 2]
mov qword [r10 + 0x10], rax
mov rax, r10
cmp rdx, 0x10
jb 0x180005897
mov rax, qword [r10]
mov word [rax + rcx], bx
mov byte [rax + rcx + 2], 0
jmp 0x180005ab2
xor r8d, r8d
mov qword [rsp + 0x20], 2
lea r9, [0x18004ceec]
mov rcx, r10
lea edx, [r8 + 2]
call fcn.180002180
jmp 0x180005a96
xor r12d, r12d
jmp case.0x180005844.6
mov byte [rsp + 0x36], 0
lea rax, [rsp + 0x30]
mov rbp, 0xffffffffffffffff
inc rbp
cmp byte [rax + rbp], 0
jne 0x1800058e2
mov rdx, qword [r10 + 0x18]
mov rcx, qword [r10 + 0x10]
mov rax, rdx
sub rax, rcx
cmp rbp, rax
ja 0x180005934
lea rax, [rcx + rbp]
mov qword [r10 + 0x10], rax
mov rax, r10
cmp rdx, 0x10
jb 0x180005912
mov rax, qword [r10]
lea rbx, [rax + rcx]
mov r8, rbp
mov rcx, rbx
lea rdx, [rsp + 0x30]
call fcn.180031de0
mov byte [rbx + rbp], 0
mov ebx, 0x3436
jmp 0x180005a96
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov rdx, rbp
mov rcx, r10
call fcn.180002180
jmp 0x180005a96
mov byte [rsp + 0x151], sil
jmp case.0x180005844.6
cmp qword [r10 + 0x18], 0x10
lea rdi, [rsp + 0x50]
mov qword [rsp + 0x40], r10
jb case.0x180005844.6
mov rax, qword [r10]
mov qword [rsp + 0x40], rax
jmp case.0x180005844.6
mov byte [rsp + 0x35], 0x3a
jmp case.0x180005844.6
mov r8d, 1
lea rdx, [0x18004cf23]
lea rcx, [rsp + 0x30]
call fcn.180035410
jmp 0x180005a96
cmp r12, qword [r10 + 0x10]
jae 0x180005a4b
mov r8d, 0xd7
mov eax, r8d
sub eax, 0xd7
je 0x180005a1d
sub eax, 0x23
je 0x180005a07
sub eax, 0x23
je 0x1800059fd
sub eax, 0x23
je 0x1800059ea
cmp eax, 0x23
jne 0x180005a28
movzx eax, r15b
movzx ecx, byte [rax + rdi]
mov rax, qword [rsp + 0x40]
xor byte [rax + r12], cl
inc r12
jmp 0x180005a28
movzx ecx, r14b
movzx eax, sil
movzx r15d, byte [rcx + rdi]
add r15b, byte [rax + rdi]
jmp 0x180005a28
movzx eax, sil
mov byte [rax + rdi], r13b
jmp 0x180005a28
movzx edx, r14b
movzx eax, sil
movzx r13d, byte [rdx + rdi]
movzx ecx, byte [rax + rdi]
mov byte [rdx + rdi], cl
jmp 0x180005a28
inc r14b
movzx eax, r14b
add sil, byte [rax + rdi]
add r8d, 0x23
cmp r8d, 0x186
jb 0x1800059b6
cmp r12, qword [r10 + 0x10]
jb 0x1800059b0
mov edx, dword [rsp + 0x1c0]
mov r8, qword [rsp + 0x38]
mov byte [rsp + 0x150], r14b
jmp case.0x180005844.6
movzx r14d, byte [rsp + 0x150]
jmp case.0x180005844.6
mov byte [rsp + 0x31], 0x22
jmp case.0x180005844.6
cmp qword [r9 + 0x18], 0x10
mov rcx, r9
jb 0x180005a74
mov rcx, qword [r9]
mov eax, dword [r9 + 0x10]
lea r8, [rsp + 0x50]
lea r9, [rsp + 0x1c8]
mov dword [rsp + 0x1c8], eax
mov edx, 0x4b
call fcn.180015670
mov r10, qword [rsp + 0x1b8]
lea r11, [0x180000000]
mov r8, qword [rsp + 0x38]
mov r9, qword [rsp + 0x1b0]
mov edx, dword [rsp + 0x1c0]
inc edx
sub r8, 1
mov dword [rsp + 0x1c0], edx
mov qword [rsp + 0x38], r8
jne 0x180005830
mov r15, qword [rsp + 0x168]
mov r14, qword [rsp + 0x170]
mov r13, qword [rsp + 0x178]
mov r12, qword [rsp + 0x180]
mov rdi, qword [rsp + 0x188]
mov rsi, qword [rsp + 0x190]
mov rbp, qword [rsp + 0x198]
mov rbx, qword [rsp + 0x1a0]
add rsp, 0x1a8
ret