Function at 0x180006a90
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov r13d, edx
mov r11, r9
add edx, 0xe
mov r9, r8
mov dword [rsp + 0x40], edx
mov rsi, rcx
cmp r13d, edx
jae 0x180006efd
mov ebx, dword [rbp + 0xb8]
lea edx, [r13 - 0x8c]
mov r12, qword [rsp + 0x50]
mov r14d, dword [rbp + 0xb8]
movzx r15d, byte [rbp + 0xb8]
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x44], edx
lea r8, [0x18014978c]
mov edi, 0x10
lea r10, [0x180000000]
cmp edx, 0x2d
ja case.default.0x180006b2b
movzx eax, byte [r10 + rdx + 0x6f5c]
mov ecx, dword [r10 + rax*4 + 0x6f20]
add rcx, r10
jmp rcx
mov rax, qword [rsi]
xor ebx, ebx
test rax, rax
je 0x180006ebf
cmp qword [r11], rbx
je 0x180006ebf
mov qword [rsp + 0x48], rax
lea ecx, [rbx + 0x63]
lea rax, [rbp + 0xb8]
mov word [rbp + 0xb8], di
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0x48]
xor edx, edx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r8
xor r8d, r8d
call fcn.180052510
mov r12, rax
jmp 0x180006e96
xor r9d, r9d
nop word [rax + rax]
mov r8d, 0x68
mov eax, r8d
sub eax, 0x68
je 0x180006bad
cmp eax, 1
jne 0x180006bd0
mov eax, r14d
mov byte [rax + rsi + 2], r15b
jmp 0x180006bd0
movzx r15d, byte [r9 + rsi + 2]
lea rdx, [r9 + rsi]
movzx ecx, byte [rsp + r9 + 0x70]
add ecx, r14d
add ecx, r15d
movzx r14d, cl
movzx ecx, byte [r14 + rsi + 2]
mov byte [rdx + 2], cl
inc r8d
cmp r8d, 0x6a
jb 0x180006b96
inc r9d
cmp r9d, 0x100
jb 0x180006b90
jmp 0x180006e96
mov byte [rsi], 0
jmp case.0x180006b2b.14
mov rcx, qword [rsp + 0x58]
mov qword [rcx + 0x10], 0
mov dword [rcx + 0x18], 0
jmp case.0x180006b2b.14
xor r12d, r12d
jmp case.0x180006b2b.14
test r12, r12
jne 0x180006cf3
mov edi, 0xc2
mov eax, edi
sub eax, 0xc2
je 0x180006c89
cmp eax, 0x48
jne 0x180006cd9
test ebx, ebx
jne 0x180006c66
mov rax, qword [rsi]
lea r9, [0x180147500]
lea r8, [rbp + 0xb8]
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x48]
mov dword [rbp + 0xb8], ebx
mov ecx, 0xb8
call fcn.180027180
mov ebx, eax
jmp 0x180006cd9
mov eax, 0xc1
nop dword [rax + rax]
cmp eax, 0xc1
je 0x180006ec6
add eax, 0x87
cmp eax, 0x148
jb 0x180006c70
jmp 0x180006cd9
mov rax, qword [rsi]
lea rdx, [rsp + 0x60]
mov rcx, qword [rax + 8]
mov qword [rsp + 0x60], rcx
mov ecx, 0xb8
call fcn.180020780
mov r12, rax
test rax, rax
mov rax, qword [rsi]
je 0x180006ee0
mov r9d, 0x104
mov qword [rsp + 0x48], rax
lea r8, [rsp + 0x48]
mov qword [rsp + 0x20], r12
lea rdx, [0x18014978c]
xor ecx, ecx
call fcn.1800105f0
mov rbx, rax
add edi, 0x48
cmp edi, 0x152
jb 0x180006c21
mov edx, dword [rsp + 0x44]
mov r11, qword [rbp + 0xc8]
test ebx, ebx
jne case.0x180006b2b.14
mov rdx, qword [r11]
lea r8, [rsp + 0x48]
lea ecx, [rbx + 0x3f]
mov qword [rsp + 0x48], r12
call fcn.180058e20
mov ebx, eax
jmp 0x180006e96
mov byte [rsi + 1], 0
jmp case.0x180006b2b.14
mov rcx, qword [rsi]
lea rax, [rbp + 0xb8]
mov qword [rsp + 0x28], rax
mov r9d, 0xcb
lea rax, [rsp + 0x48]
mov dword [rsp + 0x48], 0x18
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
mov byte [rbp + 0xb8], 0
call fcn.180058440
jmp 0x180006e96
mov rax, qword [rsp + 0x58]
mov dword [rax + 0x1c], 0
jmp case.0x180006b2b.14
mov rax, qword [rsp + 0x58]
lea rdx, [rsp + 0x48]
mov r9d, 0x47
xor r8d, r8d
xor ecx, ecx
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
call fcn.180022800
mov rax, qword [rsi]
mov rcx, qword [rsp + 0x58]
mov dword [rax + 0x18], 0
mov eax, dword [rcx + 8]
mov dword [rcx + 0xc], eax
jmp 0x180006e96
xor r14d, r14d
lea rcx, [rsi + 2]
xor eax, eax
nop dword [rax]
nop word [rax + rax]
mov byte [rcx], al
lea rcx, [rcx + 1]
inc eax
cmp eax, 0x100
jb 0x180006dc0
mov r10d, dword [r9]
xor r8d, r8d
lea r9, [rsp + 0x70]
nop word [rax + rax]
xor edx, edx
lea r9, [r9 + 1]
mov eax, r8d
inc r8d
div r10d
movzx eax, byte [rdx + r11]
mov byte [r9 - 1], al
cmp r8d, 0x100
jb 0x180006de0
jmp 0x180006e96
mov rax, qword [rsi]
mov qword [rax + 0x10], r11
jmp case.0x180006b2b.14
mov rax, qword [rsi]
test rax, rax
je 0x180006efd
cmp dword [rax + 4], 3
jne 0x180006efd
mov rax, qword [rax + 0x50]
xor edi, edi
mov qword [rsp + 0x58], rax
mov rax, qword [rax]
cmp dword [rax + 0x18], edi
jbe case.0x180006b2b.14
nop dword [rax + rax]
lea r8, [rbp + 0xb8]
mov dword [rbp + 0xb8], edi
mov edx, 0x3a
mov qword [rsp + 0x48], rax
lea rcx, [rsp + 0x48]
call fcn.18005d0a0
mov rcx, qword [rsi]
xor r9d, r9d
mov r8, rax
mov dword [rsp + 0x20], 0x35
mov rdx, qword [rcx + 8]
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x50], rdx
xor edx, edx
call fcn.180054690
mov rcx, qword [rsp + 0x58]
inc edi
mov rax, qword [rcx]
cmp edi, dword [rax + 0x18]
jb 0x180006e40
mov edx, dword [rsp + 0x44]
mov eax, dword [rsp + 0x40]
inc edx
inc r13d
mov dword [rsp + 0x44], edx
cmp r13d, eax
jae 0x180006efd
mov r11, qword [rbp + 0xc8]
mov r9, qword [rbp + 0xc0]
jmp 0x180006afb
mov eax, 0x1083
jmp 0x180006f03
lea r8, [rsp + 0x50]
mov qword [rsp + 0x50], r12
mov edx, 0x34
xor ecx, ecx
call fcn.18001fe10
mov eax, ebx
jmp 0x180006f03
mov rcx, qword [rax + 0x10]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x50], rcx
mov r8d, 0x84
xor ecx, ecx
call fcn.1800082d0
jmp 0x180006f03
mov eax, dword [rbp + 0xb8]
mov rbx, qword [rsp + 0x1b0]
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret