Function at 0x180007b80
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov eax, dword [r9]
mov r14, r9
mov r15, r8
mov rsi, rdx
mov rdi, rcx
test eax, eax
jne 0x180007d08
mov ecx, dword [r9 + 4]
xor ebx, ebx
cmp ecx, 8
jne 0x180007c1c
test rdx, rdx
je 0x180007bdd
nop
movzx eax, byte [rbx + r8]
inc rbx
mov byte [rdi + 2], al
mov byte [rdi + 1], al
mov byte [rdi], al
mov byte [rdi + 3], 0xff
add rdi, 4
cmp rbx, rsi
jne 0x180007bc0
cmp dword [r9 + 0x18], 0
je 0x180007fae
mov rax, rsi
neg rax
lea rcx, [rdi + rax*4]
test rsi, rsi
je 0x180007fae
nop dword [rax + rax]
movzx eax, byte [rcx]
cmp eax, dword [r9 + 0x1c]
jne 0x180007c0d
mov byte [rcx + 3], 0
add rcx, 4
sub rsi, 1
jne 0x180007c00
jmp 0x180007fae
cmp ecx, 0x10
jne 0x180007c6f
test rsi, rsi
je 0x180007fae
inc rdi
nop dword [rax]
movzx eax, byte [r8 + rbx*2]
mov byte [rdi + 1], al
mov byte [rdi], al
mov byte [rdi - 1], al
cmp dword [r9 + 0x18], 0
je 0x180007c59
movzx ecx, byte [r8 + rbx*2 + 1]
shl eax, 8
add ecx, eax
cmp ecx, dword [r9 + 0x1c]
jne 0x180007c59
xor al, al
jmp 0x180007c5b
mov al, 0xff
mov byte [rdi + 2], al
inc rbx
add rdi, 4
cmp rbx, rsi
jne 0x180007c30
jmp 0x180007fae
mov r11d, 1
mov r10, rbx
shl r11d, cl
dec r11d
test rsi, rsi
je 0x180007fae
nop word [rax + rax]
mov r9d, dword [r14 + 4]
mov r8d, ebx
test r9, r9
je 0x180007cd0
nop dword [rax]
movzx eax, r10b
add r8d, r8d
and al, 7
mov ecx, 7
sub cl, al
mov rax, r10
shr rax, 3
inc r10
movzx edx, byte [rax + r15]
shr dl, cl
and dl, 1
movzx eax, dl
or r8d, eax
sub r9, 1
jne 0x180007ca0
imul eax, r8d, 0xff
xor edx, edx
div r11d
mov byte [rdi + 2], al
mov byte [rdi + 1], al
mov byte [rdi], al
cmp dword [r14 + 0x18], ebx
je 0x180007cf4
cmp r8d, dword [r14 + 0x1c]
jne 0x180007cf4
xor al, al
jmp 0x180007cf6
mov al, 0xff
mov byte [rdi + 3], al
add rdi, 4
sub rsi, 1
jne 0x180007c90
jmp 0x180007fae
cmp eax, 2
jne 0x180007e13
cmp dword [r9 + 4], 8
jne 0x180007d91
test rsi, rsi
je 0x180007d43
mov rbx, rsi
mov r8d, 3
mov rdx, r15
mov rcx, rdi
call fcn.180004f60
mov byte [rdi + 3], 0xff
add r15, 3
add rdi, 4
sub rbx, 1
jne 0x180007d20
cmp dword [r14 + 0x18], 0
je 0x180007fae
mov rax, rsi
neg rax
lea rcx, [rdi + rax*4]
test rsi, rsi
je 0x180007fae
movzx eax, byte [rcx]
cmp eax, dword [r14 + 0x1c]
jne 0x180007d82
movzx eax, byte [rcx + 1]
cmp eax, dword [r14 + 0x20]
jne 0x180007d82
movzx eax, byte [rcx + 2]
cmp eax, dword [r14 + 0x24]
jne 0x180007d82
mov byte [rcx + 3], 0
add rcx, 4
sub rsi, 1
jne 0x180007d61
jmp 0x180007fae
test rsi, rsi
je 0x180007fae
add rdi, 2
add r15, 4
movzx eax, byte [r15 - 4]
movzx edx, byte [r15 - 2]
movzx r8d, byte [r15]
mov byte [rdi - 2], al
mov byte [rdi - 1], dl
mov byte [rdi], r8b
cmp dword [r9 + 0x18], 0
je 0x180007dfb
mov ecx, eax
movzx eax, byte [r15 - 3]
shl ecx, 8
add ecx, eax
cmp ecx, dword [r9 + 0x1c]
jne 0x180007dfb
movzx eax, byte [r15 - 1]
mov ecx, edx
shl ecx, 8
add ecx, eax
cmp ecx, dword [r9 + 0x20]
jne 0x180007dfb
movzx eax, byte [r15 + 1]
mov ecx, r8d
shl ecx, 8
add ecx, eax
cmp ecx, dword [r9 + 0x24]
jne 0x180007dfb
xor al, al
jmp 0x180007dfd
mov al, 0xff
mov byte [rdi + 1], al
add r15, 6
add rdi, 4
sub rsi, 1
jne 0x180007da2
jmp 0x180007fae
cmp eax, 3
jne 0x180007ed9
xor ebx, ebx
cmp dword [r9 + 4], 8
jne 0x180007e5c
test rsi, rsi
je 0x180007fae
nop
movzx ecx, byte [rbx + r15]
mov r8d, 4
mov rax, qword [r14 + 8]
lea rdx, [rax + rcx*4]
mov rcx, rdi
call fcn.180004f60
inc rbx
add rdi, 4
cmp rbx, rsi
jne 0x180007e30
jmp 0x180007fae
mov rbp, rbx
test rsi, rsi
je 0x180007fae
nop dword [rax + rax]
mov r9d, dword [r14 + 4]
mov r8d, ebx
test r9, r9
je 0x180007eb0
nop dword [rax]
movzx eax, bpl
add r8d, r8d
and al, 7
mov ecx, 7
sub cl, al
mov rax, rbp
shr rax, 3
inc rbp
movzx edx, byte [rax + r15]
shr dl, cl
and dl, 1
movzx eax, dl
or r8d, eax
sub r9, 1
jne 0x180007e80
lea edx, [r8*4]
mov rcx, rdi
add rdx, qword [r14 + 8]
mov r8d, 4
call fcn.180004f60
add rdi, 4
sub rsi, 1
jne 0x180007e70
jmp 0x180007fae
cmp eax, 4
jne 0x180007f54
xor ebx, ebx
cmp dword [r9 + 4], 8
jne 0x180007f1a
test rsi, rsi
je 0x180007fae
inc rdi
movzx eax, byte [r8 + rbx*2]
mov byte [rdi + 1], al
mov byte [rdi], al
mov byte [rdi - 1], al
lea rdi, [rdi + 4]
movzx eax, byte [r8 + rbx*2 + 1]
inc rbx
mov byte [rdi - 2], al
cmp rbx, rsi
jne 0x180007ef3
jmp 0x180007fae
test rsi, rsi
je 0x180007fae
inc rdi
nop word [rax + rax]
movzx eax, byte [r8 + rbx*4]
mov byte [rdi + 1], al
mov byte [rdi], al
mov byte [rdi - 1], al
lea rdi, [rdi + 4]
movzx eax, byte [r8 + rbx*4 + 2]
inc rbx
mov byte [rdi - 2], al
cmp rbx, rsi
jne 0x180007f30
jmp 0x180007fae
cmp eax, 6
jne 0x180007fae
cmp dword [r9 + 4], 8
jne 0x180007f72
lea r8, [rdx*4]
mov rdx, r15
call fcn.180004f60
jmp 0x180007fae
test rsi, rsi
je 0x180007fae
add rdi, 2
add r15, 4
nop
movzx eax, byte [r15 - 4]
lea r15, [r15 + 8]
mov byte [rdi - 2], al
lea rdi, [rdi + 4]
movzx eax, byte [r15 - 0xa]
mov byte [rdi - 5], al
movzx eax, byte [r15 - 8]
mov byte [rdi - 4], al
movzx eax, byte [r15 - 6]
mov byte [rdi - 3], al
sub rsi, 1
jne 0x180007f80
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret