Function at 0x1400416f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp word [r8], 8
mov rsi, r9
mov rdi, r8
mov rbx, rdx
jne 0x140041911
xor edx, edx
mov r8d, 0x428
mov rcx, rbx
mov qword [rsp + 0x30], rbp
call fcn.140081300
mov dword [rbx], 0x28
xor r11b, r11b
mov ebp, 0x40
nop word [rax + rax]
movzx r8d, word [rdi + 4]
movzx ecx, byte [rdi + 0xa]
xor edx, edx
movzx r9d, r11b
movzx r10d, r11b
inc r11b
mov eax, r9d
shr eax, cl
and eax, r8d
imul eax, eax, 0xff
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x2a], al
movzx r8d, word [rdi + 6]
movzx ecx, byte [rdi + 0xc]
mov eax, r9d
shr eax, cl
and eax, r8d
imul eax, eax, 0xff
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x29], al
movzx r8d, word [rdi + 8]
movzx ecx, byte [rdi + 0xe]
shr r9d, cl
and r9d, r8d
imul r9d, r9d, 0xff
mov eax, r9d
movzx r9d, r11b
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x28], al
movzx r8d, word [rdi + 4]
movzx ecx, byte [rdi + 0xa]
mov eax, r9d
movzx r10d, r11b
inc r11b
shr eax, cl
and eax, r8d
imul eax, eax, 0xff
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x2a], al
movzx r8d, word [rdi + 6]
movzx ecx, byte [rdi + 0xc]
mov eax, r9d
shr eax, cl
and eax, r8d
imul eax, eax, 0xff
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x29], al
movzx r8d, word [rdi + 8]
movzx ecx, byte [rdi + 0xe]
shr r9d, cl
and r9d, r8d
imul r9d, r9d, 0xff
mov eax, r9d
movzx r9d, r11b
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x28], al
movzx r8d, word [rdi + 4]
movzx ecx, byte [rdi + 0xa]
mov eax, r9d
movzx r10d, r11b
shr eax, cl
and eax, r8d
imul eax, eax, 0xff
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x2a], al
movzx r8d, word [rdi + 6]
movzx ecx, byte [rdi + 0xc]
mov eax, r9d
shr eax, cl
and eax, r8d
imul eax, eax, 0xff
div r8d
mov byte [rbx + r10*4 + 0x29], al
movzx r8d, word [rdi + 8]
movzx ecx, byte [rdi + 0xe]
xor edx, edx
inc r11b
shr r9d, cl
and r9d, r8d
imul r9d, r9d, 0xff
mov eax, r9d
movzx r9d, r11b
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x28], al
movzx r8d, word [rdi + 4]
movzx ecx, byte [rdi + 0xa]
mov eax, r9d
movzx r10d, r11b
inc r11b
shr eax, cl
and eax, r8d
imul eax, eax, 0xff
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x2a], al
movzx r8d, word [rdi + 6]
movzx ecx, byte [rdi + 0xc]
mov eax, r9d
shr eax, cl
and eax, r8d
imul eax, eax, 0xff
div r8d
xor edx, edx
mov byte [rbx + r10*4 + 0x29], al
movzx r8d, word [rdi + 8]
movzx ecx, byte [rdi + 0xe]
shr r9d, cl
and r9d, r8d
imul r9d, r9d, 0xff
mov eax, r9d
div r8d
sub rbp, 1
mov byte [rbx + r10*4 + 0x28], al
jne 0x140041740
mov rbp, qword [rsp + 0x30]
jmp 0x14004194d
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0x34]
call fcn.140081300
mov dword [rbx + 0x10], 3
movzx ecx, byte [rdi + 0xa]
movzx eax, word [rdi + 4]
shl eax, cl
mov dword [rbx + 0x28], eax
movzx ecx, byte [rdi + 0xc]
movzx eax, word [rdi + 6]
shl eax, cl
mov dword [rbx + 0x2c], eax
movzx ecx, byte [rdi + 0xe]
movzx eax, word [rdi + 8]
shl eax, cl
mov dword [rbx + 0x30], eax
mov dword [rbx], 0x28
mov eax, 1
mov word [rbx + 0xc], ax
movzx eax, word [rdi]
mov word [rbx + 0xe], ax
mov eax, dword [rsi + 8]
mov dword [rbx + 4], eax
mov eax, dword [rsi + 0xc]
mov rsi, qword [rsp + 0x40]
neg eax
mov dword [rbx + 8], eax
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret