Function at 0x140195fd0
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 0x140195ffa
mov rbp, rdi
sub rbp, rdx
test rbp, rbp
jg 0x140196181
mov rbp, qword [rsp + 0x70]
test rbp, rbp
jle 0x140196245
cmp r12, rdi
jl 0x14019614c
mov rax, qword [rcx + 0x20]
sub rax, rdi
cmp rax, rbp
jl 0x140196123
cmp rbp, 1
jne 0x140196067
test rsi, rsi
jne 0x14019604d
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 0x1401960a7
test rsi, rsi
jne 0x14019608b
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 0x1401960e4
test rsi, rsi
jne 0x1401960ca
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 0x140196123
test rsi, rsi
jne 0x140196108
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.140195ad0
add rax, rdi
mov rcx, rax
mov r8, rbp
test rsi, rsi
je 0x140196170
mov rdx, rsi
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14023df70
lea rdx, [rdi + rbp]
call fcn.140195ad0
sub rdi, r12
mov r8, rdi
lea rbx, [r12 + rax]
lea rcx, [rbx + rbp]
mov rdx, rbx
call fcn.14023df70
mov rcx, rbx
jmp 0x140196132
xor edx, edx
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14023e790
mov qword [rsp + 0x60], r15
mov r15, qword [rsp + 0x70]
test r15, r15
jg 0x1401961a7
mov r8, rbp
mov r15, qword [rsp + 0x60]
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.140196250
mov qword [rsp + 0x50], r13
mov r13, rdi
sub r13, r12
mov qword [rsp + 0x58], r14
sub r13, rbp
cmp r15, rbp
jle 0x1401961e6
sub rdi, rbp
lea rdx, [r15 + rdi]
call fcn.140195ad0
lea r14, [r12 + rax]
test r13, r13
jle 0x14019621a
lea rdx, [r14 + rbp]
mov r8, r13
lea rcx, [r14 + r15]
call fcn.14023df70
jmp 0x14019621a
mov r14, qword [rcx + 0x18]
add r14, r12
cmp r15, rbp
jge 0x14019621a
test r13, r13
jle 0x140196207
lea rdx, [r14 + rbp]
mov r8, r13
lea rcx, [r14 + r15]
call fcn.14023df70
sub rdi, rbp
mov rcx, rbx
lea rdx, [r15 + rdi]
call fcn.140195ad0
lea r14, [r12 + rax]
mov r13, qword [rsp + 0x50]
mov r8, r15
mov rcx, r14
test rsi, rsi
je 0x140196234
mov rdx, rsi
call fcn.14023df70
jmp 0x14019623b
xor edx, edx
call fcn.14023e790
mov r14, qword [rsp + 0x58]
mov r15, qword [rsp + 0x60]
add rsp, 0x20
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret