Function at 0x140014fa0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x20
mov rdi, qword [rcx + 0x28]
lea rax, [rdx + r8]
mov rsi, r9
mov rbp, r8
mov r12, rdx
mov rbx, rcx
cmp rax, rdi
jle 0x140014fca
mov rbp, rdi
sub rbp, rdx
test rbp, rbp
jg 0x140015151
mov rbp, qword [rsp + 0x70]
test rbp, rbp
jle 0x140015215
cmp r12, rdi
jl 0x14001511c
mov rax, qword [rcx + 0x20]
sub rax, rdi
cmp rax, rbp
jl 0x1400150f3
cmp rbp, 1
jne 0x140015037
test rsi, rsi
jne 0x14001501d
mov rax, qword [rbx + 0x18]
xor cl, cl
mov byte [rdi + rax], cl
inc qword [rbx + 0x28]
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
movzx ecx, byte [r9]
mov rax, qword [rbx + 0x18]
mov byte [rdi + rax], cl
inc qword [rbx + 0x28]
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp rbp, 2
jne 0x140015077
test rsi, rsi
jne 0x14001505b
mov rax, qword [rbx + 0x18]
xor ecx, ecx
mov word [rdi + rax], cx
add qword [rbx + 0x28], rbp
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
movzx ecx, word [r9]
mov rax, qword [rbx + 0x18]
mov word [rdi + rax], cx
add qword [rbx + 0x28], 2
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp rbp, 4
jne 0x1400150b4
test rsi, rsi
jne 0x14001509a
mov rax, qword [rbx + 0x18]
xor ecx, ecx
mov dword [rdi + rax], ecx
add qword [rbx + 0x28], rbp
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov ecx, dword [r9]
mov rax, qword [rbx + 0x18]
mov dword [rdi + rax], ecx
add qword [rbx + 0x28], 4
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp rbp, 8
jne 0x1400150f3
test rsi, rsi
jne 0x1400150d8
mov rax, qword [rbx + 0x18]
xor ecx, ecx
mov qword [rdi + rax], rcx
add qword [rbx + 0x28], rbp
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, qword [r9]
mov rax, qword [rbx + 0x18]
mov qword [rdi + rax], rcx
add qword [rbx + 0x28], 8
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rdx, [rdi + rbp]
call fcn.140014ca0
add rax, rdi
mov rcx, rax
mov r8, rbp
test rsi, rsi
je 0x140015140
mov rdx, rsi
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14006e250
lea rdx, [rdi + rbp]
call fcn.140014ca0
sub rdi, r12
mov r8, rdi
lea rbx, [r12 + rax]
lea rcx, [rbx + rbp]
mov rdx, rbx
call fcn.14006e250
mov rcx, rbx
jmp 0x140015102
xor edx, edx
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14006de90
mov qword [rsp + 0x60], r15
mov r15, qword [rsp + 0x70]
test r15, r15
jg 0x140015177
mov r8, rbp
mov r15, qword [rsp + 0x60]
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp 0x140015220
mov qword [rsp + 0x50], r13
mov r13, rdi
sub r13, r12
mov qword [rsp + 0x58], r14
sub r13, rbp
cmp r15, rbp
jle 0x1400151b6
sub rdi, rbp
lea rdx, [r15 + rdi]
call fcn.140014ca0
lea r14, [r12 + rax]
test r13, r13
jle 0x1400151ea
lea rdx, [r14 + rbp]
mov r8, r13
lea rcx, [r14 + r15]
call fcn.14006e250
jmp 0x1400151ea
mov r14, qword [rcx + 0x18]
add r14, r12
cmp r15, rbp
jge 0x1400151ea
test r13, r13
jle 0x1400151d7
lea rdx, [r14 + rbp]
mov r8, r13
lea rcx, [r14 + r15]
call fcn.14006e250
sub rdi, rbp
mov rcx, rbx
lea rdx, [r15 + rdi]
call fcn.140014ca0
lea r14, [r12 + rax]
mov r13, qword [rsp + 0x50]
mov r8, r15
mov rcx, r14
test rsi, rsi
je 0x140015204
mov rdx, rsi
call fcn.14006e250
jmp 0x14001520b
xor edx, edx
call fcn.14006de90
mov r14, qword [rsp + 0x58]
mov r15, qword [rsp + 0x60]
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
test r8, r8
jle 0x1400152da
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, r8
mov r8, qword [rcx + 0x28]
mov rbx, rcx
cmp rdx, 0xffffffffffffffff
jg 0x14001526b
sub r8, rdi
test r8, r8
jg 0x140015259
mov rdx, qword [rcx + 0x18]
test rdx, rdx
je 0x1400152ac
mov rax, qword [rcx]
jmp 0x1400152a9
mov rdx, r8
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp fcn.140014ca0
mov rax, r8
sub rax, rdx
cmp rdi, rax
jge 0x14001528e
mov rcx, qword [rcx + 0x18]
sub r8, rdx
add rcx, rdx
sub r8, rdi
lea rdx, [rcx + rdi]
call fcn.14006e250
jmp 0x140015291
mov rdi, rax
mov rdx, qword [rbx + 0x28]
cmp rdx, rdi
jne 0x1400152c5
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x1400152ac
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x18]
xor eax, eax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x28], rax
mov qword [rbx + 0x20], rax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
sub rdx, rdi
mov rcx, rbx
call fcn.140014ca0
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret