Function at 0x140007c30
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rbx
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 rdi, rdx
mov rsi, rcx
test eax, eax
jne 0x140007db8
mov ecx, dword [r9 + 4]
xor ebx, ebx
cmp ecx, 8
jne 0x140007ccc
test rdx, rdx
je 0x140007c8d
nop word [rax + rax]
movzx eax, byte [r8 + rbx]
inc rbx
mov byte [rsi + 2], al
mov byte [rsi + 1], al
mov byte [rsi], al
mov byte [rsi + 3], 0xff
add rsi, 4
cmp rbx, rdi
jne 0x140007c70
cmp dword [r9 + 0x18], 0
je 0x140007f89
mov rax, rdi
neg rax
lea rcx, [rsi + rax*4]
test rdi, rdi
je 0x140007f89
nop dword [rax + rax]
movzx eax, byte [rcx]
cmp eax, dword [r9 + 0x1c]
jne 0x140007cbd
mov byte [rcx + 3], 0
add rcx, 4
sub rdi, 1
jne 0x140007cb0
jmp 0x140007f89
cmp ecx, 0x10
jne 0x140007d1f
test rdi, rdi
je 0x140007f89
inc rsi
nop dword [rax]
movzx eax, byte [r8 + rbx*2]
mov byte [rsi + 1], al
mov byte [rsi], al
mov byte [rsi - 1], al
cmp dword [r9 + 0x18], 0
je 0x140007d09
movzx ecx, byte [r8 + rbx*2 + 1]
shl eax, 8
add ecx, eax
cmp ecx, dword [r9 + 0x1c]
jne 0x140007d09
xor al, al
jmp 0x140007d0b
mov al, 0xff
mov byte [rsi + 2], al
inc rbx
add rsi, 4
cmp rbx, rdi
jne 0x140007ce0
jmp 0x140007f89
mov r11d, 1
mov r10, rbx
shl r11d, cl
dec r11d
test rdi, rdi
je 0x140007f89
inc rsi
nop word [rax + rax]
mov r9d, dword [r14 + 4]
mov r8d, ebx
test r9, r9
je 0x140007d80
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 0x140007d50
imul eax, r8d, 0xff
xor edx, edx
div r11d
mov byte [rsi + 1], al
mov byte [rsi], al
mov byte [rsi - 1], al
cmp dword [r14 + 0x18], ebx
je 0x140007da4
cmp r8d, dword [r14 + 0x1c]
jne 0x140007da4
xor al, al
jmp 0x140007da6
mov al, 0xff
mov byte [rsi + 2], al
add rsi, 4
sub rdi, 1
jne 0x140007d40
jmp 0x140007f89
cmp eax, 2
jne 0x140007ec3
cmp dword [r9 + 4], 8
jne 0x140007e41
test rdi, rdi
je 0x140007df3
mov rbx, rdi
mov r8d, 3
mov rdx, r15
mov rcx, rsi
call fcn.1400011b0
mov byte [rsi + 3], 0xff
add r15, 3
add rsi, 4
sub rbx, 1
jne 0x140007dd0
cmp dword [r14 + 0x18], 0
je 0x140007f89
mov rax, rdi
neg rax
lea rcx, [rsi + rax*4]
test rdi, rdi
je 0x140007f89
movzx eax, byte [rcx]
cmp eax, dword [r14 + 0x1c]
jne 0x140007e32
movzx eax, byte [rcx + 1]
cmp eax, dword [r14 + 0x20]
jne 0x140007e32
movzx eax, byte [rcx + 2]
cmp eax, dword [r14 + 0x24]
jne 0x140007e32
mov byte [rcx + 3], 0
add rcx, 4
sub rdi, 1
jne 0x140007e11
jmp 0x140007f89
test rdi, rdi
je 0x140007f89
add rsi, 2
add r15, 4
movzx eax, byte [r15 - 4]
movzx edx, byte [r15 - 2]
movzx r8d, byte [r15]
mov byte [rsi - 2], al
mov byte [rsi - 1], dl
mov byte [rsi], r8b
cmp dword [r9 + 0x18], 0
je 0x140007eab
mov ecx, eax
movzx eax, byte [r15 - 3]
shl ecx, 8
add ecx, eax
cmp ecx, dword [r9 + 0x1c]
jne 0x140007eab
movzx eax, byte [r15 - 1]
mov ecx, edx
shl ecx, 8
add ecx, eax
cmp ecx, dword [r9 + 0x20]
jne 0x140007eab
movzx eax, byte [r15 + 1]
mov ecx, r8d
shl ecx, 8
add ecx, eax
cmp ecx, dword [r9 + 0x24]
jne 0x140007eab
xor al, al
jmp 0x140007ead
mov al, 0xff
mov byte [rsi + 1], al
add r15, 6
add rsi, 4
sub rdi, 1
jne 0x140007e52
jmp 0x140007f89
cmp eax, 3
jne 0x140007f9d
xor ebx, ebx
cmp dword [r9 + 4], 8
jne 0x140007f0c
test rdi, rdi
je 0x140007f89
nop
movzx ecx, byte [r15 + rbx]
mov r8d, 4
mov rax, qword [r14 + 8]
lea rdx, [rax + rcx*4]
mov rcx, rsi
call fcn.1400011b0
inc rbx
add rsi, 4
cmp rbx, rdi
jne 0x140007ee0
jmp 0x140007f89
mov qword [rsp + 0x40], rbp
mov rbp, rbx
test rdi, rdi
je 0x140007f84
nop dword [rax]
mov r9d, dword [r14 + 4]
mov r8d, ebx
test r9, r9
je 0x140007f60
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 0x140007f30
lea edx, [r8*4]
mov rcx, rsi
add rdx, qword [r14 + 8]
mov r8d, 4
call fcn.1400011b0
add rsi, 4
sub rdi, 1
jne 0x140007f20
mov rbp, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
cmp eax, 4
jne 0x140008004
xor ebx, ebx
cmp dword [r9 + 4], 8
jne 0x140007fd7
test rdi, rdi
je 0x140007f89
inc rsi
movzx eax, byte [r8 + rbx*2]
mov byte [rsi + 1], al
mov byte [rsi], al
mov byte [rsi - 1], al
lea rsi, [rsi + 4]
movzx eax, byte [r8 + rbx*2 + 1]
inc rbx
mov byte [rsi - 2], al
cmp rbx, rdi
jne 0x140007fb3
jmp 0x140007f89
test rdi, rdi
je 0x140007f89
inc rsi
nop
movzx eax, byte [r8 + rbx*4]
mov byte [rsi + 1], al
mov byte [rsi], al
mov byte [rsi - 1], al
lea rsi, [rsi + 4]
movzx eax, byte [r8 + rbx*4 + 2]
inc rbx
mov byte [rsi - 2], al
cmp rbx, rdi
jne 0x140007fe0
jmp 0x140007f89
cmp eax, 6
jne 0x140007f89
cmp dword [r9 + 4], 8
jne 0x140008025
lea r8, [rdx*4]
mov rdx, r15
call fcn.1400011b0
jmp 0x140007f89
test rdi, rdi
je 0x140007f89
add rsi, 2
add r15, 4
nop word [rax + rax]
movzx eax, byte [r15 - 4]
lea r15, [r15 + 8]
mov byte [rsi - 2], al
lea rsi, [rsi + 4]
movzx eax, byte [r15 - 0xa]
mov byte [rsi - 5], al
movzx eax, byte [r15 - 8]
mov byte [rsi - 4], al
movzx eax, byte [r15 - 6]
mov byte [rsi - 3], al
sub rdi, 1
jne 0x140008040
jmp 0x140007f89