Function at 0x14005f960
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xce0
mov rax, qword [0x14049f410]
xor rax, rsp
mov qword [rsp + 0xcd0], rax
mov r14d, dword [rdx + 8]
mov r11, rdx
mov r12d, dword [rcx + 4]
xor edx, edx
mov eax, r14d
mov r15d, 1
imul eax, dword [rsp + 0xd50]
mov rbx, r9
mov rdi, r8
mov dword [rsp + 0x28], r15d
mov r10, rcx
mov r9d, r15d
div r12d
xor edx, edx
mov dword [rsp + 0x84], eax
mov eax, r12d
div dword [rsp + 0xd50]
cmp eax, r15d
jbe 0x14005f9f6
add r9d, r9d
cmp eax, r9d
ja 0x14005f9d3
mov ecx, r9d
mov dword [rsp + 0x24], r9d
call fcn.14006a800
mov r13d, r9d
imul r13d, r9d
mov dword [rsp + 0x58], r13d
jmp 0x14005fa08
mov ecx, r15d
mov dword [rsp + 0x58], r15d
call fcn.14006a800
mov dword [rsp + 0x24], r15d
mov r8d, dword [r10 + 8]
mov ecx, eax
mov ebp, r14d
mov esi, eax
add eax, eax
sar ebp, cl
mov dword [rsp + 0x48], eax
test r8d, r8d
je 0x14006032b
mov r9d, dword [r10]
test r9d, r9d
je 0x14006032b
mov r13, qword [r10 + 0x18]
test r13, r13
je 0x14005fa40
cmp dword [r10 + 0x10], 0
jne 0x14005fa72
cmp qword [r10 + 0x28], 0
je 0x14005fa4e
cmp dword [r10 + 0x20], 0
jne 0x14005fa72
cmp qword [r10 + 0x38], 0
je 0x14005fa5c
cmp dword [r10 + 0x30], 0
jne 0x14005fa72
cmp qword [r10 + 0x48], 0
je 0x14006032b
cmp dword [r10 + 0x40], 0
je 0x14006032b
movsxd r15, dword [r11]
test r15d, r15d
js 0x14006032b
mov edx, dword [r11 + 4]
test edx, edx
js 0x14006032b
test r14d, r14d
jle 0x14006032b
mov ecx, dword [r11 + 0xc]
test ecx, ecx
jle 0x14006032b
lea eax, [r15 + r14]
cmp eax, r12d
jg 0x14006032b
lea eax, [rcx + rdx]
cmp eax, r8d
jg 0x14006032b
cmp qword [rsp + 0xd48], 0
je 0x14006032b
test rdi, rdi
je 0x14006032b
test rbx, rbx
je 0x14006032b
mov r8, qword [rsp + 0xd40]
test r8, r8
je 0x14006032b
mov edx, 0xff
nop
mov ecx, edx
movzx eax, byte [rcx + rdi]
sub eax, edx
mov dword [rsp + rcx*4 + 0xd0], eax
movzx eax, byte [rcx + rbx]
sub eax, edx
mov dword [rsp + rcx*4 + 0x4d0], eax
movzx eax, byte [rcx + r8]
sub eax, edx
mov dword [rsp + rcx*4 + 0x8d0], eax
mov eax, edx
dec edx
test eax, eax
jne 0x14005faf0
cmp r9d, 0x10200001
je 0x14005fd0a
cmp r9d, 0x20200001
je 0x14005fc71
cmp r9d, 0x30100001
je 0x14005fbf9
cmp r9d, 0x30200001
je 0x14005fb5c
mov eax, 0xfffffffa
jmp 0x14005ff38
mov edi, dword [rsp + 0x24]
mov r9, r15
mov r12d, dword [r10 + 0x10]
mov rdx, r9
mov r8d, dword [r11 + 4]
mov r14d, r12d
sar rdx, 1
mov eax, r8d
imul eax, r12d
sub r14d, edi
mov ecx, r8d
mov byte [rsp + 0x20], 2
sar ecx, 1
mov byte [rsp + 0x21], 2
cdqe
add rax, r13
mov r13d, dword [r10 + 0x20]
add rax, r15
mov ebx, r13d
mov qword [rsp + 0x50], rax
mov r15d, edi
imul ebx, edi
mov eax, r13d
mov edi, dword [r10 + 0x30]
shr r15d, 1
sub eax, r15d
mov dword [rsp + 0x30], eax
mov eax, ecx
imul eax, r13d
shr ebx, 1
cdqe
add rax, qword [r10 + 0x28]
add rax, rdx
mov qword [rsp + 0x38], rax
mov eax, edi
sub eax, r15d
mov dword [rsp + 0x34], eax
mov eax, edi
imul eax, ecx
cdqe
add rax, qword [r10 + 0x38]
add rax, rdx
mov r10d, 1
mov edx, dword [rsp + 0x24]
imul edi, edx
shr edi, 1
jmp 0x14005fd93
mov r12d, dword [r10 + 0x10]
mov r9, r15
mov edx, dword [rsp + 0x24]
mov eax, r12d
mov r8d, dword [r11 + 4]
mov r14d, r12d
imul eax, r8d
sub r14d, edx
mov byte [rsp + 0x20], 2
mov byte [rsp + 0x21], 2
cdqe
add rax, r13
mov r13d, dword [r10 + 0x20]
add rax, r15
mov ebx, r13d
mov qword [rsp + 0x50], rax
mov edi, r13d
sub edi, edx
imul ebx, edx
mov eax, r8d
mov dword [rsp + 0x30], edi
sar eax, 1
imul eax, r13d
mov dword [rsp + 0x34], edi
shr ebx, 1
mov edi, ebx
cdqe
add rax, qword [r10 + 0x28]
add rax, r15
mov r10d, 2
mov qword [rsp + 0x38], rax
inc rax
mov dword [rsp + 0x28], r10d
jmp 0x14005fd90
mov edx, dword [rsp + 0x24]
mov r9, r15
mov r12d, dword [r10 + 0x10]
mov rcx, r9
mov r8d, dword [r11 + 4]
mov eax, r12d
mov edi, dword [r10 + 0x30]
mov r14d, r12d
imul eax, r8d
sub r14d, edx
sar rcx, 1
mov dword [rsp + 0x28], 1
mov byte [rsp + 0x21], 2
mov byte [rsp + 0x20], 1
cdqe
add rax, r13
mov r13d, dword [r10 + 0x20]
add rax, r15
mov ebx, r13d
mov qword [rsp + 0x50], rax
mov r15d, edx
shr r15d, 1
mov eax, r13d
sub eax, r15d
imul ebx, edx
mov dword [rsp + 0x30], eax
mov eax, r13d
imul eax, r8d
cdqe
add rax, qword [r10 + 0x28]
add rax, rcx
mov qword [rsp + 0x38], rax
mov eax, edi
sub eax, r15d
mov dword [rsp + 0x34], eax
mov eax, edi
imul eax, r8d
cdqe
add rax, qword [r10 + 0x38]
mov r10d, dword [rsp + 0x28]
add rax, rcx
imul edi, edx
jmp 0x14005fd93
mov edx, dword [rsp + 0x24]
mov r9, r15
mov r12d, dword [r10 + 0x10]
mov r14d, r12d
mov r8d, dword [r11 + 4]
mov eax, r12d
mov edi, dword [r10 + 0x30]
sub r14d, edx
imul eax, r8d
mov dword [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
mov byte [rsp + 0x21], 1
cdqe
add rax, r13
mov r13d, dword [r10 + 0x20]
add rax, r15
mov ebx, r13d
mov qword [rsp + 0x50], rax
mov eax, r13d
sub eax, edx
imul ebx, edx
mov dword [rsp + 0x30], eax
mov eax, r13d
imul eax, r8d
cdqe
add rax, qword [r10 + 0x28]
add rax, r15
mov qword [rsp + 0x38], rax
mov eax, edi
sub eax, edx
mov dword [rsp + 0x34], eax
mov eax, edi
imul eax, r8d
cdqe
add rax, qword [r10 + 0x38]
mov r10d, dword [rsp + 0x28]
add rax, r15
imul edi, edx
mov r15d, edx
mov ecx, dword [r11 + 0xc]
mov qword [rsp + 0x40], rax
movzx eax, byte [rsp + 0x21]
imul r12d, edx
mov dword [rsp + 0x2c], ecx
movzx ecx, byte [rsp + 0x20]
cmp edx, eax
jae 0x14005ff63
mov edi, dword [rsp + 0xd50]
movzx esi, byte [rsp + 0x21]
mov r14, qword [rsp + 0x50]
mov ebx, esi
mov eax, dword [rsp + 0x2c]
imul r8d, edi
add r8, r9
mov r9d, dword [r11 + 8]
add r8, qword [rsp + 0xd48]
sub ebx, r10d
cmp cl, 2
jne 0x14005fe30
test al, 1
je 0x14005fe30
nop dword [rax]
movzx edx, byte [r14]
mov ecx, 0xff
lea eax, [rdx + 0x32]
cmp eax, ecx
cmovb ecx, eax
movzx eax, byte [r8]
imul ecx, eax
inc r8
shr ecx, 8
imul ecx, dword [rsp + rdx*4 + 0xd0]
sar ecx, 8
add cl, dl
mov byte [r14], cl
inc r14
sub r9d, 1
jne 0x14005fdf0
mov r9d, dword [r11 + 8]
jmp 0x14005ff0f
mov r15, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
nop word [rax + rax]
movzx ecx, byte [r14]
mov edx, 0xff
lea eax, [rcx + 0x32]
cmp eax, edx
cmovb edx, eax
movzx eax, byte [r8]
imul edx, eax
mov eax, dword [rsp + rcx*4 + 0xd0]
shr edx, 8
imul eax, edx
sar eax, 8
add al, cl
mov byte [r14], al
movzx ecx, byte [r15]
mov eax, dword [rsp + rcx*4 + 0x4d0]
imul eax, edx
sar eax, 8
add al, cl
mov byte [r15], al
movzx ecx, byte [rbp]
mov eax, dword [rsp + rcx*4 + 0x8d0]
imul eax, edx
sar eax, 8
add al, cl
mov byte [rbp], al
cmp sil, 2
jne 0x14005fed4
movzx edx, byte [r14 + 1]
inc r14
inc r8
mov ecx, 0xff
lea eax, [rdx + 0x32]
cmp eax, ecx
cmovb ecx, eax
movzx eax, byte [r8]
imul ecx, eax
shr ecx, 8
imul ecx, dword [rsp + rdx*4 + 0xd0]
sar ecx, 8
add cl, dl
mov byte [r14], cl
dec r9d
inc r14
add r15, r10
add rbp, r10
inc r8
sub r9d, 1
jne 0x14005fe40
mov r9d, dword [r11 + 8]
mov ecx, ebx
mov r10d, dword [rsp + 0x28]
mov edx, r9d
sar edx, cl
mov ecx, r13d
sub ecx, edx
add r15, rcx
add rbp, rcx
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x40], rbp
movzx ecx, byte [rsp + 0x20]
mov eax, r12d
sub eax, r9d
add r14, rax
mov eax, edi
sub eax, r9d
add r8, rax
mov eax, dword [rsp + 0x2c]
sub eax, 1
mov dword [rsp + 0x2c], eax
jne 0x14005fde3
xor eax, eax
mov rcx, qword [rsp + 0xcd0]
xor rcx, rsp
call fcn.1400fcc70
mov rbx, qword [rsp + 0xd30]
add rsp, 0xce0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rax, qword [rsp + 0x40]
mov ecx, esi
mov edx, dword [rsp + 0xd50]
mov r11, qword [rsp + 0x50]
mov r13, qword [rsp + 0x38]
mov qword [rsp + 0x78], rax
mov eax, edx
sub eax, ebp
sar r8d, cl
mov qword [rsp + 0x98], rax
sar r9, cl
imul r8d, edx
mov qword [rsp + 0x88], r11
mov qword [rsp + 0x90], r13
mov r10d, r8d
mov r8d, dword [rsp + 0x24]
add r10, r9
sub r10, rax
mov qword [rsp + 0xa8], r8
mov eax, dword [rsp + 0x2c]
add r10, qword [rsp + 0xd48]
sar eax, cl
lea ecx, [rbp - 1]
dec eax
mov dword [rsp + 0x60], ecx
mov dword [rsp + 0x2c], eax
mov eax, r14d
lea r9, [r10 + rdx]
mov qword [rsp + 0xa0], rax
mov eax, r15d
mov qword [rsp + 0xb0], rax
mov eax, r12d
mov qword [rsp + 0xb8], rax
mov eax, ebx
mov qword [rsp + 0xc0], rax
mov eax, edi
mov qword [rsp + 0xc8], rax
add r10, qword [rsp + 0x98]
add r9, qword [rsp + 0x98]
mov dword [rsp + 0x5c], ecx
nop dword [rax]
nop dword [rax + rax]
movzx edx, byte [r10]
inc r10
movzx ebx, byte [r9]
inc r9
movzx ecx, byte [r10]
movzx r12d, byte [r9]
sub ecx, edx
sub r12d, ebx
mov qword [rsp + 0x70], r9
mov qword [rsp + 0x68], r10
nop word [rax + rax]
mov rsi, qword [rsp + 0x78]
sub r12d, ecx
mov rax, r11
sub ebx, edx
mov r14d, r8d
mov r11d, edx
imul r11d, dword [rsp + 0x58]
mov rdi, r13
imul r14d, ecx
mov r15d, r8d
mov ecx, r8d
imul ecx, r12d
sub ebx, r14d
imul ebx, r8d
mov dword [rsp + 0x80], ecx
nop dword [rax + rax]
cmp byte [rsp + 0x20], 2
mov r10d, r8d
jne 0x14006010b
test r15b, 1
je 0x14006010b
mov r13d, dword [rsp + 0x48]
nop word [rax + rax]
movzx r9d, byte [rax]
mov r8d, 0xff
mov edx, r11d
lea ecx, [r9 + 0x32]
cmp ecx, r8d
cmovb r8d, ecx
mov ecx, r13d
sar edx, cl
add r11d, r14d
imul r8d, edx
dec r10d
sar r8d, 8
imul r8d, dword [rsp + r9*4 + 0xd0]
sar r8d, 8
add r8b, r9b
mov byte [rax], r8b
inc rax
test r10d, r10d
jg 0x1400600c0
jmp 0x1400601f2
mov ebp, dword [rsp + 0x28]
mov r13d, dword [rsp + 0x48]
nop dword [rax]
nop dword [rax + rax]
movzx r8d, byte [rax]
mov edx, r11d
mov r9d, 0xff
lea ecx, [r8 + 0x32]
cmp ecx, r9d
cmovb r9d, ecx
mov ecx, r13d
sar edx, cl
add r11d, r14d
mov ecx, dword [rsp + r8*4 + 0xd0]
imul r9d, edx
sar r9d, 8
imul ecx, r9d
sar ecx, 8
add cl, r8b
mov byte [rax], cl
movzx edx, byte [rdi]
mov ecx, dword [rsp + rdx*4 + 0x4d0]
imul ecx, r9d
sar ecx, 8
add cl, dl
mov byte [rdi], cl
movzx edx, byte [rsi]
mov ecx, dword [rsp + rdx*4 + 0x8d0]
imul ecx, r9d
sar ecx, 8
add cl, dl
cmp byte [rsp + 0x21], 2
mov byte [rsi], cl
jne 0x1400601cf
movzx r9d, byte [rax + 1]
inc rax
mov r8d, 0xff
mov edx, r11d
lea ecx, [r9 + 0x32]
cmp ecx, r8d
cmovb r8d, ecx
mov ecx, r13d
sar edx, cl
add r11d, r14d
imul r8d, edx
sar r8d, 8
imul r8d, dword [rsp + r9*4 + 0xd0]
sar r8d, 8
add r8b, r9b
mov byte [rax], r8b
dec r10d
inc rax
add rdi, rbp
add rsi, rbp
dec r10d
test r10d, r10d
jg 0x140060120
mov ecx, dword [rsp + 0x30]
add rdi, rcx
mov ecx, dword [rsp + 0x34]
add rsi, rcx
add rax, qword [rsp + 0xa0]
add r11d, ebx
sub ebx, dword [rsp + 0x80]
add r14d, r12d
mov r8d, dword [rsp + 0x24]
dec r15d
test r15d, r15d
jg 0x1400600a0
mov r11, qword [rsp + 0x88]
mov r13, qword [rsp + 0x90]
mov rcx, qword [rsp + 0xb0]
mov eax, dword [rsp + 0x5c]
add r13, rcx
add r11, qword [rsp + 0xa8]
dec eax
add qword [rsp + 0x78], rcx
mov qword [rsp + 0x88], r11
mov qword [rsp + 0x90], r13
mov dword [rsp + 0x5c], eax
test eax, eax
jg 0x140060284
jne 0x140060293
mov r10, qword [rsp + 0x68]
mov r9, qword [rsp + 0x70]
movzx edx, byte [r10]
inc r10
movzx ebx, byte [r9]
inc r9
xor eax, eax
mov r12d, eax
mov ecx, eax
jmp 0x14006004b
mov r10, qword [rsp + 0x68]
mov r9, qword [rsp + 0x70]
jmp 0x140060030
mov rax, qword [rsp + 0x50]
add rax, qword [rsp + 0xb8]
mov edx, dword [rsp + 0x2c]
mov r11, rax
mov qword [rsp + 0x50], rax
dec edx
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x38]
add rax, qword [rsp + 0xc0]
mov qword [rsp + 0x38], rax
mov r13, rax
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x40]
add rax, qword [rsp + 0xc8]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x2c], edx
test edx, edx
jg 0x140060318
jne 0x14005ff36
mov eax, dword [rsp + 0x84]
mov r10, qword [rsp + 0x68]
mov r9, qword [rsp + 0x70]
sub r10, rax
mov ecx, dword [rsp + 0x60]
sub r9, rax
jmp 0x140060020
mov r10, qword [rsp + 0x68]
mov r9, qword [rsp + 0x70]
mov ecx, dword [rsp + 0x60]
jmp 0x140060010
mov eax, 0xfffffffc
jmp 0x14005ff38