Function at 0x140315e60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
test rcx, rcx
je 0x14030c422
push rbx
sub rsp, 0x20
mov eax, dword [rcx + 0x220]
mov rbx, rcx
cmp dword [rcx + 0x234], eax
jae 0x14030c41d
mov r9d, 2
xor r8d, r8d
xor edx, edx
call fcn.140313fc0
mov rcx, rbx
mov dword [rbx + 0x2bc], 0
call fcn.1403125c0
add rsp, 0x20
pop rbx
ret
push rbx
sub rsp, 0x20
xor r9d, r9d
mov rbx, rcx
call fcn.140313fc0
mov rcx, qword [rbx + 0x240]
test rcx, rcx
je 0x140315cd2
mov rax, qword [rbx + 0x248]
mov qword [rbx + 0x240], rax
mov qword [rbx + 0x248], rcx
inc dword [rbx + 0x234]
mov eax, dword [rbx + 0x234]
cmp eax, dword [rbx + 0x220]
jb 0x140315e2e
cmp byte [rbx + 0x284], 0
je 0x140315e1b
test byte [rbx + 0x16c], 2
mov dword [rbx + 0x234], 0
je 0x140315d1d
inc byte [rbx + 0x285]
movzx r11d, byte [rbx + 0x285]
jmp 0x140315db4
movzx eax, byte [rbx + 0x285]
mov qword [rsp + 0x30], rdi
lea rdi, [0x140000000]
lea r11d, [rax + 1]
mov byte [rbx + 0x285], r11b
cmp r11b, 7
jae 0x140315daf
xor edx, edx
movzx r10d, r11b
movzx r8d, byte [r10 + rdi + 0x4cf1b8]
movzx eax, byte [r10 + rdi + 0x4cf1b0]
mov ecx, r8d
sub ecx, eax
mov eax, dword [rbx + 0x218]
dec eax
add eax, ecx
movzx ecx, byte [r10 + rdi + 0x4cf1c0]
div r8d
movzx r8d, byte [r10 + rdi + 0x4cf1c8]
mov r9d, eax
mov dword [rbx + 0x224], eax
mov eax, dword [rbx + 0x21c]
mov edx, r8d
sub edx, ecx
dec eax
add eax, edx
xor edx, edx
div r8d
mov dword [rbx + 0x220], eax
mov ecx, eax
movzx eax, r11b
test r9d, r9d
je 0x140315d30
test ecx, ecx
je 0x140315d30
mov rdi, qword [rsp + 0x30]
cmp r11b, 7
jae 0x140315e1b
mov r9, qword [rbx + 0x240]
test r9, r9
je 0x140315e2e
movzx eax, byte [rbx + 0x289]
movzx ecx, byte [rbx + 0x28c]
mov r8d, eax
mov edx, dword [rbx + 0x218]
imul eax, ecx
imul r8, rcx
cmp eax, 8
jb 0x140315e00
shr r8, 3
mov rcx, r9
imul r8, rdx
xor edx, edx
inc r8
call fcn.1403224b0
jmp 0x140315e2e
imul r8, rdx
xor edx, edx
mov rcx, r9
add r8, 7
shr r8, 3
inc r8
call fcn.1403224b0
jmp 0x140315e2e
mov r9d, 4
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.140313fc0
mov eax, dword [rbx + 0x2bc]
mov ecx, dword [rbx + 0x2b8]
inc eax
mov dword [rbx + 0x2bc], eax
test ecx, ecx
je 0x140315e57
cmp eax, ecx
jb 0x140315e57
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp 0x14030c3e0
add rsp, 0x20
pop rbx
ret
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x50
mov r14, qword [rcx + 0x248]
movabs rax, 0x1ffffffffffffff
movzx r13d, byte [rdx + 0x13]
xor ebp, ebp
mov rbx, qword [rdx + 8]
add r13d, 7
movzx r15d, byte [rcx + 0x286]
mov rdi, rcx
shr r13d, 3
mov rsi, 0xfffffffffffffeff
mov dword [rsp + 0xa0], r13d
mov r11, r14
mov qword [rsp + 0x20], r14
cmp rbx, rax
jb 0x140315ecd
mov eax, r15d
neg eax
and r15d, eax
jmp 0x140315f13
test r15b, 8
je 0x140315f13
cmp r15d, 8
je 0x140315f13
mov rsi, rbp
mov rdx, rbp
test rbx, rbx
je 0x140315f13
nop dword [rax]
nop dword [rax + rax]
movzx ecx, byte [r14 + rdx + 1]
mov eax, 0x100
sub eax, ecx
cmp ecx, 0x80
cmovae ecx, eax
inc rdx
mov eax, ecx
add rsi, rax
cmp rdx, rbx
jb 0x140315ef0
mov qword [rsp + 0x48], r12
cmp r15d, 0x10
jne 0x14031611a
mov r11, qword [rdi + 0x250]
lea r8, [r14 + 1]
mov qword [rsp + 0x20], r11
mov r10, rbp
mov r9d, r13d
mov rdx, r8
mov byte [r11], 1
lea rcx, [r11 + 1]
test r13d, r13d
je 0x140315f61
mov r10d, r9d
nop dword [rax + rax]
movzx eax, byte [rdx]
inc rdx
mov byte [rcx], al
inc rcx
sub r9, 1
jne 0x140315f50
mov r9, rbx
sub r9, r10
cmp r10, rbx
jae 0x140316054
cmp r9, 0x40
jb 0x14031602a
lea r14, [rbx - 1]
lea rax, [rbx - 1]
add r14, rcx
add rax, r8
lea r12, [rcx + r10]
lea r13, [r8 + r10]
cmp r12, rax
ja 0x140315f9e
cmp r14, r13
jae 0x140316022
lea rax, [rbx - 1]
add rax, rdx
lea r13, [rdx + r10]
cmp r12, rax
ja 0x140315fb3
cmp r14, r13
jae 0x140316022
and r9d, 0x3f
mov rax, rbx
sub rax, r9
nop dword [rax]
movdqu xmm0, xmmword [r8]
add r10, 0x40
movdqu xmm1, xmmword [rdx]
psubb xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x10]
movdqu xmmword [rcx], xmm1
movdqu xmm1, xmmword [rdx + 0x10]
psubb xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x20]
movdqu xmmword [rcx + 0x10], xmm1
movdqu xmm1, xmmword [rdx + 0x20]
psubb xmm1, xmm0
movdqu xmm0, xmmword [r8 + 0x30]
add r8, 0x40
movdqu xmmword [rcx + 0x20], xmm1
movdqu xmm1, xmmword [rdx + 0x30]
add rdx, 0x40
psubb xmm1, xmm0
movdqu xmmword [rcx + 0x30], xmm1
add rcx, 0x40
cmp r10, rax
jb 0x140315fc0
mov r13d, dword [rsp + 0xa0]
cmp r10, rbx
jae 0x140316054
sub r8, rcx
sub rdx, rcx
mov r9, rbx
sub r9, r10
nop dword [rax + rax]
movzx eax, byte [rdx + rcx]
sub al, byte [r8 + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub r9, 1
jne 0x140316040
test r15b, 0x20
je 0x1403160f1
mov r10, qword [rdi + 0x250]
mov r9, rbp
mov byte [r10], 2
lea rdx, [r10 + 1]
test rbx, rbx
je 0x1403160c7
mov r14, qword [rdi + 0x240]
mov r8, rdx
mov r12, qword [rdi + 0x248]
sub r8, r10
dec r8
sub r14, rdx
sub r12, rdx
movzx eax, byte [r12 + rdx + 1]
sub al, byte [r14 + rdx + 1]
movzx ecx, al
mov eax, 0x100
sub eax, ecx
mov byte [rdx], cl
cmp ecx, 0x80
cmovae ecx, eax
mov eax, ecx
add r9, rax
cmp r9, rsi
ja 0x1403160f1
inc rdx
inc r8
cmp r8, rbx
jb 0x140316092
cmp r9, rsi
jae 0x1403160f1
mov rax, qword [rdi + 0x258]
mov rsi, r9
mov qword [rsp + 0x20], r10
mov r11, r10
test rax, rax
je 0x1403160f1
mov qword [rdi + 0x250], rax
mov qword [rdi + 0x258], r10
cmp r15d, 0x40
jne 0x140316306
mov r8, rbx
mov edx, r13d
mov rcx, rdi
call fcn.140314ac0
mov r11, qword [rdi + 0x250]
mov qword [rsp + 0x20], r11
jmp 0x140316445
test r15b, 0x10
je 0x1403161f6
mov r12, qword [rdi + 0x250]
inc r14
mov r11d, r13d
mov r8, rbp
mov r10, rbp
mov r9, r14
mov byte [r12], 1
lea rdx, [r12 + 1]
test r13d, r13d
je 0x140316179
mov r10d, r11d
nop dword [rax]
movzx eax, byte [r9]
mov ecx, eax
mov byte [rdx], al
mov eax, 0x100
sub eax, ecx
cmp ecx, 0x80
cmovae ecx, eax
inc r9
mov eax, ecx
inc rdx
add r8, rax
sub r11, 1
jne 0x140316150
cmp r10, rbx
jae 0x1403161b7
sub r9, rdx
sub r14, rdx
movzx eax, byte [r9 + rdx]
sub al, byte [r14 + rdx]
movzx ecx, al
mov eax, 0x100
sub eax, ecx
mov byte [rdx], cl
cmp ecx, 0x80
cmovae ecx, eax
mov eax, ecx
add r8, rax
cmp r8, rsi
ja 0x1403161ea
inc rdx
inc r10
cmp r10, rbx
jb 0x140316184
cmp r8, rsi
jae 0x1403161ea
mov rax, qword [rdi + 0x258]
mov rsi, r8
mov r14, qword [rdi + 0x248]
mov r11, r12
mov qword [rsp + 0x20], r12
test rax, rax
je 0x1403161f6
mov qword [rdi + 0x250], rax
mov qword [rdi + 0x258], r12
jmp 0x1403161f6
mov r11, qword [rsp + 0x20]
mov r14, qword [rdi + 0x248]
cmp r15d, 0x20
jne 0x140316054
mov r11, qword [rdi + 0x250]
lea r8, [r14 + 1]
mov rdx, qword [rdi + 0x240]
mov r10, rbp
inc rdx
mov qword [rsp + 0x20], r11
mov byte [r11], 2
lea rcx, [r11 + 1]
test rbx, rbx
je 0x14031630d
cmp rbx, 0x40
jb 0x1403162d2
lea r9, [rbx - 1]
lea rax, [rbx - 1]
add r9, rcx
add rax, rdx
cmp rcx, rax
ja 0x140316254
cmp r9, rdx
jae 0x1403162d2
lea rax, [rbx - 1]
add rax, r8
cmp rcx, rax
ja 0x140316265
cmp r9, r8
jae 0x1403162d2
mov rax, rbx
and rax, 0xffffffffffffffc0
nop dword [rax]
movdqu xmm0, xmmword [rdx]
add r10, 0x40
movdqu xmm1, xmmword [r8]
psubb xmm1, xmm0
movdqu xmm0, xmmword [rdx + 0x10]
movdqu xmmword [rcx], xmm1
movdqu xmm1, xmmword [r8 + 0x10]
psubb xmm1, xmm0
movdqu xmm0, xmmword [rdx + 0x20]
movdqu xmmword [rcx + 0x10], xmm1
movdqu xmm1, xmmword [r8 + 0x20]
psubb xmm1, xmm0
movdqu xmm0, xmmword [rdx + 0x30]
add rdx, 0x40
movdqu xmmword [rcx + 0x20], xmm1
movdqu xmm1, xmmword [r8 + 0x30]
add r8, 0x40
psubb xmm1, xmm0
movdqu xmmword [rcx + 0x30], xmm1
add rcx, 0x40
cmp r10, rax
jb 0x140316270
cmp r10, rbx
jae 0x14031630d
sub r8, rcx
sub rdx, rcx
mov r9, rbx
sub r9, r10
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
sub al, byte [rdx + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub r9, 1
jne 0x1403162f0
jmp 0x14031630d
mov r14, qword [rdi + 0x248]
test r15b, 0x40
je 0x140316416
mov r13, qword [rdi + 0x250]
lea r12, [r14 + 1]
mov rdx, qword [rdi + 0x240]
mov r8, rbp
mov eax, dword [rsp + 0xa0]
inc rdx
mov r9d, ebp
mov r10, r12
mov byte [r13], 3
lea r11, [r13 + 1]
test eax, eax
je 0x140316385
mov r14d, eax
mov r9d, eax
nop
movzx eax, byte [r10]
inc r10
movzx ecx, byte [rdx]
inc rdx
shr cl, 1
sub al, cl
movzx ecx, al
mov eax, 0x100
sub eax, ecx
mov byte [r11], cl
inc r11
cmp ecx, 0x80
cmovae ecx, eax
mov eax, ecx
add r8, rax
sub r14, 1
jne 0x140316350
mov eax, r9d
cmp rax, rbx
jae 0x1403163e5
sub r12, rdx
sub r10, rdx
sub r11, rdx
nop word [rax + rax]
movzx eax, byte [rdx]
movzx ecx, byte [r12 + rdx]
lea rdx, [rdx + 1]
add ecx, eax
movzx eax, byte [r10 + rdx - 1]
shr ecx, 1
sub al, cl
movzx ecx, al
mov eax, 0x100
sub eax, ecx
mov byte [r11 + rdx - 1], cl
cmp ecx, 0x80
cmovae ecx, eax
mov eax, ecx
add r8, rax
cmp r8, rsi
ja 0x140316411
inc r9d
mov eax, r9d
cmp rax, rbx
jb 0x1403163a0
cmp r8, rsi
jae 0x140316411
mov rax, qword [rdi + 0x258]
mov rsi, r8
mov qword [rsp + 0x20], r13
mov r11, r13
test rax, rax
je 0x140316416
mov qword [rdi + 0x250], rax
mov qword [rdi + 0x258], r13
jmp 0x140316416
mov r11, qword [rsp + 0x20]
cmp r15d, 0x80
jne 0x14031643d
mov edx, dword [rsp + 0xa0]
mov r8, rbx
mov rcx, rdi
call fcn.140314cf0
mov r11, qword [rdi + 0x250]
jmp 0x1403165dc
mov r13d, dword [rsp + 0xa0]
test r15b, r15b
jns 0x1403165dc
mov r8, qword [rdi + 0x250]
mov r11, rbp
mov r9, qword [rdi + 0x248]
mov rax, qword [rdi + 0x240]
inc r9
inc rax
mov qword [rsp + 0x30], r8
mov byte [r8], 4
lea r14, [r8 + 1]
mov qword [rsp + 0xa0], r9
mov r15, rax
mov qword [rsp + 0x28], rax
mov edx, r13d
test r13d, r13d
je 0x1403164d6
mov r11d, edx
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [r9]
inc r9
sub al, byte [r15]
inc r15
movzx ecx, al
mov eax, 0x100
sub eax, ecx
mov byte [r14], cl
inc r14
cmp ecx, 0x80
cmovae ecx, eax
mov eax, ecx
add rbp, rax
sub rdx, 1
jne 0x1403164a0
mov rax, qword [rsp + 0x28]
cmp r11, rbx
jae 0x1403165b3
mov rdi, qword [rsp + 0xa0]
sub rax, rdi
sub r15, rdi
mov qword [rsp + 0x28], rax
sub r14, r9
nop word [rax + rax]
movzx eax, byte [rax + rdi]
movzx ecx, byte [r15 + rdi]
movzx r10d, byte [rdi]
lea rdi, [rdi + 1]
mov dword [rsp + 0xa0], eax
mov r8d, ecx
sub r8d, eax
mov dword [rsp + 0xa8], ecx
mov ecx, r10d
sub ecx, eax
mov eax, r8d
cdq
mov r12d, eax
mov eax, ecx
xor r12d, edx
sub r12d, edx
cdq
mov r13d, eax
lea eax, [rcx + r8]
xor r13d, edx
sub r13d, edx
cdq
xor eax, edx
sub eax, edx
cmp r12d, r13d
jg 0x140316556
cmp r12d, eax
jle 0x14031656a
mov r10d, dword [rsp + 0xa0]
cmp r13d, eax
cmovle r10d, dword [rsp + 0xa8]
movzx eax, byte [r9]
sub al, r10b
movzx ecx, al
mov eax, 0x100
sub eax, ecx
mov byte [r14 + r9], cl
inc r9
cmp ecx, 0x80
cmovae ecx, eax
mov eax, ecx
add rbp, rax
cmp rbp, rsi
ja 0x1403165a6
mov rax, qword [rsp + 0x28]
inc r11
cmp r11, rbx
jb 0x140316500
mov rdi, qword [rsp + 0x90]
mov r8, qword [rsp + 0x30]
cmp rbp, rsi
jae 0x1403165d7
mov rax, qword [rdi + 0x258]
mov r11, r8
test rax, rax
je 0x1403165dc
mov qword [rdi + 0x250], rax
mov qword [rdi + 0x258], r8
jmp 0x1403165dc
mov r11, qword [rsp + 0x20]
mov r8, qword [rsp + 0x98]
mov rdx, r11
mov rcx, rdi
mov r8, qword [r8 + 8]
inc r8
mov r12, qword [rsp + 0x48]
add rsp, 0x50
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
jmp 0x140315ca0