Function at 0x14005e220
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x450
mov rax, qword [0x1402a83b0]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov rbp, rcx
xor r12d, r12d
xor edx, edx
mov qword [rcx + 0x58], r12
lea rcx, [rsp + 0x30]
mov r8d, 0x404
call fcn.1401c0040
movzx edi, word [rbp + 0x50]
test di, di
je 0x14005e814
mov rax, qword [rbp + 0x1f0]
mov ecx, 0x7f0
movzx edx, word [rax + 0xc]
test cx, dx
jne 0x14005e814
movzx ecx, byte [rbp + 0xa]
mov r13d, 1
mov ebx, r13d
shl bx, cl
cmp dx, r13w
jne 0x14005e2c9
mov word [rsp + 0x230], 0xff00
mov word [rsp + 0x130], 0xff00
mov word [rsp + 0x30], 0xff00
jmp 0x14005e374
cmp dx, 2
jne 0x14005e31e
movzx r9d, word [rax + 0x20]
movzx r8d, r12w
cmp r12w, r9w
jge 0x14005e374
movsx r10d, r9w
lea rcx, [rsp + 0x130]
dec r10d
movsx eax, r8w
inc r8w
lea rcx, [rcx + 1]
imul eax, eax, 0xff
cdq
idiv r10d
mov byte [rcx + 0xff], al
mov byte [rcx - 1], al
mov byte [rcx - 0x101], al
cmp r8w, r9w
jl 0x14005e2f1
jmp 0x14005e374
movzx edx, word [rax + 0x20]
cmp r12w, dx
jge 0x14005e374
mov r8, qword [rax + 0x28]
mov rcx, r12
movzx edx, dx
movzx eax, byte [r8 + rcx]
lea rcx, [rcx + 1]
mov byte [rsp + rcx + 0x2f], al
movzx eax, byte [r8 + rcx + 0xff]
mov byte [rsp + rcx + 0x12f], al
movzx eax, byte [r8 + rcx + 0x1ff]
mov byte [rsp + rcx + 0x22f], al
movzx eax, byte [r8 + rcx + 0x2ff]
mov byte [rsp + rcx + 0x32f], al
dec rdx
jne 0x14005e332
test r13b, dil
je 0x14005e3c6
cmp r12w, bx
jge 0x14005e3c6
lea rcx, [rsp + 0x130]
movzx edx, bx
nop word [rax + rax]
mov eax, 0xff
lea rcx, [rcx + 1]
sub al, byte [rcx - 0x101]
mov byte [rcx - 0x101], al
mov eax, 0xff
sub al, byte [rcx - 1]
mov byte [rcx - 1], al
mov eax, 0xff
sub al, byte [rcx + 0xff]
mov byte [rcx + 0xff], al
dec rdx
jne 0x14005e390
movzx r14d, word [rbp + 0x52]
mov esi, r13d
movzx r15d, di
mov ecx, r14d
shl si, cl
dec si
and r15w, 2
jne 0x14005e404
test dil, 4
jne 0x14005e404
test dil, 8
jne 0x14005e404
movzx eax, bx
cmp r14w, 8
jg 0x14005e3fe
shl ax, 2
jmp 0x14005e40a
shl ax, 3
jmp 0x14005e40a
movzx eax, bx
add ax, ax
movsx rcx, ax
mov rdx, r13
call fcn.1401be1f8
mov rcx, rax
mov qword [rbp + 0x58], rax
test rax, rax
jne 0x14005e42b
movzx eax, r13w
jmp 0x14005e818
test r15w, r15w
je 0x14005e444
lea rdx, [rsp + 0x30]
movzx r8d, bx
call fcn.14005e850
jmp 0x14005e814
test dil, 4
je 0x14005e45d
lea rdx, [rsp + 0x30]
movzx r8d, bx
call fcn.14005e920
jmp 0x14005e814
test dil, 8
je 0x14005e476
lea rdx, [rsp + 0x30]
movzx r8d, bx
call fcn.14005ea20
jmp 0x14005e814
mov eax, 0x200
test dil, 0x10
je 0x14005e5db
cmp r14w, 8
jg 0x14005e547
test ax, di
movsx rax, bx
lea r9, [rax + rcx]
je 0x14005e4a3
lea r11, [rax + r9]
jmp 0x14005e4aa
mov r11, rcx
lea rcx, [rax + r9]
cmp r12w, bx
jge 0x14005e814
movsx edi, si
lea r10, [rsp + 0x130]
movzx ebx, bx
movzx r8d, byte [r10 - 0x100]
mov eax, 0x80808081
lea rcx, [rcx + 1]
lea r11, [r11 + 1]
lea r9, [r9 + 1]
lea r10, [r10 + 1]
imul r8d, edi
imul r8d
add edx, r8d
movzx r8d, byte [r10 - 1]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x80808081
imul r8d, edi
mov byte [r11 - 1], dl
imul r8d
add edx, r8d
movzx r8d, byte [r10 + 0xff]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x80808081
imul r8d, edi
mov byte [r9 - 1], dl
imul r8d
add edx, r8d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rcx - 1], dl
dec rbx
jne 0x14005e4c2
jmp 0x14005e814
test ax, di
movsx rax, bx
lea r9, [rcx + rax*2]
je 0x14005e55a
lea r10, [r9 + rax*2]
jmp 0x14005e561
mov r10, rcx
lea rcx, [r9 + rax*2]
cmp r12w, bx
jge 0x14005e814
lea r8, [rsp + 0x130]
movzx r11d, bx
nop word [rax + rax]
movzx eax, byte [r8 - 0x100]
lea rcx, [rcx + 2]
lea r10, [r10 + 2]
movzx edx, ax
lea r9, [r9 + 2]
lea r8, [r8 + 1]
shl dx, 8
or dx, ax
movzx eax, byte [r8 - 1]
mov word [r10 - 2], dx
movzx edx, ax
shl dx, 8
or dx, ax
movzx eax, byte [r8 + 0xff]
mov word [r9 - 2], dx
movzx edx, ax
shl dx, 8
or dx, ax
mov word [rcx - 2], dx
dec r11
jne 0x14005e580
jmp 0x14005e814
cmp r14w, 8
jg 0x14005e786
lea r9, [rcx + 1]
test ax, di
je 0x14005e5fa
mov r11, qword [rsp + 0x20]
lea r10, [r9 + 1]
jmp 0x14005e605
mov r10, rcx
lea rcx, [r9 + 1]
lea r11, [rcx + 1]
mov eax, 0x400
cmp di, ax
jne 0x14005e6e9
cmp r12w, bx
jge 0x14005e814
sub r10, rcx
sub r9, rcx
movsx esi, si
sub r11, rcx
lea rdi, [rsp + 0x130]
movzx ebx, bx
nop dword [rax]
nop dword [rax + rax]
movzx r8d, byte [rdi - 0x100]
mov eax, 0x80808081
lea rcx, [rcx + 4]
lea rdi, [rdi + 1]
imul r8d, esi
imul r8d
add edx, r8d
movzx r8d, byte [rdi - 1]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x80808081
imul r8d, esi
mov byte [r10 + rcx - 4], dl
imul r8d
add edx, r8d
movzx r8d, byte [rdi + 0xff]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x80808081
imul r8d, esi
mov byte [r9 + rcx - 4], dl
imul r8d
add edx, r8d
movzx r8d, byte [rdi + 0x1ff]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x80808081
imul r8d, esi
mov byte [rcx - 4], dl
imul r8d
add edx, r8d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [r11 + rcx - 4], dl
dec rbx
jne 0x14005e640
jmp 0x14005e814
cmp r12w, bx
jge 0x14005e814
movsx edi, si
lea r11, [rsp + 0x130]
movzx ebx, bx
movzx r8d, byte [r11 - 0x100]
mov eax, 0x80808081
lea rcx, [rcx + 3]
lea r11, [r11 + 1]
lea r10, [r10 + 3]
lea r9, [r9 + 3]
imul r8d, edi
imul r8d
add edx, r8d
movzx r8d, byte [r11 - 1]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x80808081
imul r8d, edi
mov byte [r10 - 3], dl
imul r8d
add edx, r8d
movzx r8d, byte [r11 + 0xff]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x80808081
imul r8d, edi
mov byte [r9 - 3], dl
imul r8d
add edx, r8d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rcx - 3], dl
dec rbx
jne 0x14005e701
jmp 0x14005e814
lea r9, [rcx + 4]
test ax, di
je 0x14005e795
lea r11, [r9 + 4]
jmp 0x14005e79c
mov r11, rcx
lea rcx, [r9 + 4]
cmp r12w, bx
jge 0x14005e814
sub r11, r9
lea r10, [rsp + 0x130]
movzx ebx, bx
sub rcx, r9
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r10 - 0x100]
lea r9, [r9 + 6]
lea r10, [r10 + 1]
movzx edx, ax
shl dx, 8
or dx, ax
movzx eax, byte [r10 - 1]
mov word [r11 + r9 - 6], dx
movzx edx, ax
shl dx, 8
or dx, ax
mov word [r9 - 6], dx
movzx edx, byte [r10 + 0xff]
movzx r8d, dx
shl r8w, 8
or r8w, dx
mov word [rcx + r9 - 6], r8w
dec rbx
jne 0x14005e7c0
movzx eax, r12w
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.1401bd600
lea r11, [rsp + 0x450]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret