Function at 0x140114050
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
movdqa xmmword [rsp + 0x30], xmm6
mov r11, qword [rsp + 0xb0]
test r11, r11
je 0x140114973
mov r10d, edx
mov rsi, rcx
movzx ebx, byte [r9 + 0x19]
cmp r11, 1
jne 0x14011409c
movzx ebp, byte [r9 + 0x1a]
test r10w, r10w
jne 0x140114822
jmp 0x140114908
movabs rax, 0x7ffffffffffffff
lea r12, [r11 + rax]
and rax, r12
cmp rax, 8
jae 0x1401140ba
xor edi, edi
jmp 0x140114418
cmp rax, 0x20
jae 0x1401140c7
xor edi, edi
jmp 0x140114327
mov edx, r12d
and edx, 0x1f
mov rdi, rax
sub rdi, rdx
movzx ebx, bl
movd xmm0, ebx
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea rbx, [r9 + 0x419]
mov r14, rdi
movdqa xmm1, xmm0
nop word cs:[rax + rax]
movzx ebp, byte [rbx - 0x200]
movd xmm2, ebp
movzx ebp, byte [rbx - 0x220]
movd xmm3, ebp
punpcklbw xmm3, xmm2
movzx ebp, byte [rbx - 0x240]
movd xmm2, ebp
movzx ebp, byte [rbx - 0x260]
movd xmm4, ebp
punpcklbw xmm4, xmm2
punpcklwd xmm4, xmm3
movzx ebp, byte [rbx - 0x280]
movd xmm2, ebp
movzx ebp, byte [rbx - 0x2a0]
movd xmm3, ebp
punpcklbw xmm3, xmm2
movzx ebp, byte [rbx - 0x2c0]
movd xmm5, ebp
movzx ebp, byte [rbx - 0x2e0]
movd xmm2, ebp
punpcklbw xmm2, xmm5
punpcklwd xmm2, xmm3
punpckldq xmm2, xmm4
movzx ebp, byte [rbx - 0x300]
movd xmm3, ebp
movzx ebp, byte [rbx - 0x320]
movd xmm4, ebp
punpcklbw xmm4, xmm3
movzx ebp, byte [rbx - 0x340]
movd xmm3, ebp
movzx ebp, byte [rbx - 0x360]
movd xmm5, ebp
punpcklbw xmm5, xmm3
punpcklwd xmm5, xmm4
movzx ebp, byte [rbx - 0x380]
movd xmm3, ebp
movzx ebp, byte [rbx - 0x3a0]
movd xmm4, ebp
punpcklbw xmm4, xmm3
movzx ebp, byte [rbx - 0x3c0]
movd xmm3, ebp
movzx ebp, byte [rbx - 0x3e0]
movd xmm6, ebp
punpcklbw xmm6, xmm3
punpcklwd xmm6, xmm4
punpckldq xmm6, xmm5
punpcklqdq xmm6, xmm2
pmaxub xmm0, xmm6
movzx ebp, byte [rbx]
movd xmm2, ebp
movzx ebp, byte [rbx - 0x20]
movd xmm3, ebp
punpcklbw xmm3, xmm2
movzx ebp, byte [rbx - 0x40]
movd xmm2, ebp
movzx ebp, byte [rbx - 0x60]
movd xmm4, ebp
punpcklbw xmm4, xmm2
punpcklwd xmm4, xmm3
movzx ebp, byte [rbx - 0x80]
movd xmm2, ebp
movzx ebp, byte [rbx - 0xa0]
movd xmm3, ebp
punpcklbw xmm3, xmm2
movzx ebp, byte [rbx - 0xc0]
movd xmm5, ebp
movzx ebp, byte [rbx - 0xe0]
movd xmm2, ebp
punpcklbw xmm2, xmm5
punpcklwd xmm2, xmm3
punpckldq xmm2, xmm4
movzx ebp, byte [rbx - 0x100]
movd xmm3, ebp
movzx ebp, byte [rbx - 0x120]
movd xmm4, ebp
punpcklbw xmm4, xmm3
movzx ebp, byte [rbx - 0x140]
movd xmm3, ebp
movzx ebp, byte [rbx - 0x160]
movd xmm5, ebp
punpcklbw xmm5, xmm3
punpcklwd xmm5, xmm4
movzx ebp, byte [rbx - 0x180]
movd xmm3, ebp
movzx ebp, byte [rbx - 0x1a0]
movd xmm4, ebp
punpcklbw xmm4, xmm3
movzx ebp, byte [rbx - 0x1c0]
movd xmm3, ebp
movzx ebp, byte [rbx - 0x1e0]
movd xmm6, ebp
punpcklbw xmm6, xmm3
punpcklwd xmm6, xmm4
punpckldq xmm6, xmm5
punpcklqdq xmm6, xmm2
pmaxub xmm1, xmm6
add rbx, 0x400
add r14, 0xffffffffffffffe0
jne 0x140114100
pmaxub xmm0, xmm1
pshufd xmm1, xmm0, 0xee
pmaxub xmm1, xmm0
pshufd xmm0, xmm1, 0x55
pmaxub xmm0, xmm1
movdqa xmm1, xmm0
psrld xmm1, 0x10
pmaxub xmm1, xmm0
movdqa xmm0, xmm1
psrlw xmm0, 8
pmaxub xmm0, xmm1
movd ebx, xmm0
test rdx, rdx
je 0x140114458
cmp edx, 8
jb 0x140114418
mov dword [rsp + 0x24], r8d
mov rdx, rdi
mov qword [rsp + 0x28], r12
mov r14d, r12d
and r14d, 7
mov rdi, rax
sub rdi, r14
movzx ebx, bl
movd xmm0, ebx
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
mov rbx, rdx
shl rbx, 5
add rbx, r9
add rbx, 0x119
add rdx, r14
sub rdx, rax
nop dword [rax + rax]
movzx ebp, byte [rbx - 0xe0]
movzx r15d, byte [rbx - 0xc0]
movzx r12d, byte [rbx - 0xa0]
movzx r13d, byte [rbx - 0x60]
movzx ecx, byte [rbx - 0x20]
movzx r8d, byte [rbx - 0x40]
shl r8d, 8
or r8d, r13d
shl r15d, 8
or r15d, ebp
shl r12d, 0x10
or r12d, r15d
movzx ebp, byte [rbx - 0x80]
shl ebp, 0x18
or ebp, r12d
movd xmm1, ebp
pinsrw xmm1, r8d, 2
movzx r8d, byte [rbx]
shl r8d, 8
or r8d, ecx
pinsrw xmm1, r8d, 3
pmaxub xmm0, xmm1
add rbx, 0x100
add rdx, 8
jne 0x140114370
pshufd xmm1, xmm0, 0x55
pmaxub xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
pmaxub xmm0, xmm1
movdqa xmm1, xmm0
psrlw xmm1, 8
pmaxub xmm1, xmm0
movd ebx, xmm1
mov edx, ebx
test r14, r14
mov r8d, dword [rsp + 0x24]
mov r12, qword [rsp + 0x28]
je 0x140114446
mov r14, rax
sub r14, rdi
shl rdi, 5
add rdi, r9
add rdi, 0x39
nop dword [rax]
movzx edx, byte [rdi]
movzx ecx, bl
cmp cl, dl
cmova edx, ecx
add rdi, 0x20
mov ebx, edx
dec r14
jne 0x140114430
movzx ebp, byte [r9 + 0x1a]
cmp rax, 8
jae 0x140114465
xor edi, edi
jmp 0x1401147e3
mov edx, ebx
movzx ebp, byte [r9 + 0x1a]
cmp rax, 8
jb 0x140114451
cmp rax, 0x20
jae 0x140114472
xor edi, edi
jmp 0x1401146f7
mov ebx, r12d
and ebx, 0x1f
mov rdi, rax
sub rdi, rbx
movzx ecx, bpl
movd xmm0, ecx
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea r14, [r9 + 0x41a]
mov r15, rdi
movdqa xmm1, xmm0
nop word cs:[rax + rax]
movzx ecx, byte [r14 - 0x200]
movd xmm2, ecx
movzx ecx, byte [r14 - 0x220]
movd xmm3, ecx
punpcklbw xmm3, xmm2
movzx ecx, byte [r14 - 0x240]
movd xmm2, ecx
movzx ecx, byte [r14 - 0x260]
movd xmm4, ecx
punpcklbw xmm4, xmm2
punpcklwd xmm4, xmm3
movzx ecx, byte [r14 - 0x280]
movd xmm2, ecx
movzx ecx, byte [r14 - 0x2a0]
movd xmm3, ecx
punpcklbw xmm3, xmm2
movzx ecx, byte [r14 - 0x2c0]
movd xmm5, ecx
movzx ecx, byte [r14 - 0x2e0]
movd xmm2, ecx
punpcklbw xmm2, xmm5
punpcklwd xmm2, xmm3
punpckldq xmm2, xmm4
movzx ecx, byte [r14 - 0x300]
movd xmm3, ecx
movzx ecx, byte [r14 - 0x320]
movd xmm4, ecx
punpcklbw xmm4, xmm3
movzx ecx, byte [r14 - 0x340]
movd xmm3, ecx
movzx ecx, byte [r14 - 0x360]
movd xmm5, ecx
punpcklbw xmm5, xmm3
punpcklwd xmm5, xmm4
movzx ecx, byte [r14 - 0x380]
movd xmm3, ecx
movzx ecx, byte [r14 - 0x3a0]
movd xmm4, ecx
punpcklbw xmm4, xmm3
movzx ecx, byte [r14 - 0x3c0]
movd xmm3, ecx
movzx ecx, byte [r14 - 0x3e0]
movd xmm6, ecx
punpcklbw xmm6, xmm3
punpcklwd xmm6, xmm4
punpckldq xmm6, xmm5
punpcklqdq xmm6, xmm2
pmaxub xmm0, xmm6
movzx ecx, byte [r14]
movd xmm2, ecx
movzx ecx, byte [r14 - 0x20]
movd xmm3, ecx
punpcklbw xmm3, xmm2
movzx ecx, byte [r14 - 0x40]
movd xmm2, ecx
movzx ecx, byte [r14 - 0x60]
movd xmm4, ecx
punpcklbw xmm4, xmm2
punpcklwd xmm4, xmm3
movzx ecx, byte [r14 - 0x80]
movd xmm2, ecx
movzx ecx, byte [r14 - 0xa0]
movd xmm3, ecx
punpcklbw xmm3, xmm2
movzx ecx, byte [r14 - 0xc0]
movd xmm5, ecx
movzx ecx, byte [r14 - 0xe0]
movd xmm2, ecx
punpcklbw xmm2, xmm5
punpcklwd xmm2, xmm3
punpckldq xmm2, xmm4
movzx ecx, byte [r14 - 0x100]
movd xmm3, ecx
movzx ecx, byte [r14 - 0x120]
movd xmm4, ecx
punpcklbw xmm4, xmm3
movzx ecx, byte [r14 - 0x140]
movd xmm3, ecx
movzx ecx, byte [r14 - 0x160]
movd xmm5, ecx
punpcklbw xmm5, xmm3
punpcklwd xmm5, xmm4
movzx ecx, byte [r14 - 0x180]
movd xmm3, ecx
movzx ecx, byte [r14 - 0x1a0]
movd xmm4, ecx
punpcklbw xmm4, xmm3
movzx ecx, byte [r14 - 0x1c0]
movd xmm3, ecx
movzx ecx, byte [r14 - 0x1e0]
movd xmm6, ecx
punpcklbw xmm6, xmm3
punpcklwd xmm6, xmm4
punpckldq xmm6, xmm5
punpcklqdq xmm6, xmm2
pmaxub xmm1, xmm6
add r14, 0x400
add r15, 0xffffffffffffffe0
jne 0x1401144b0
pmaxub xmm0, xmm1
pshufd xmm1, xmm0, 0xee
pmaxub xmm1, xmm0
pshufd xmm0, xmm1, 0x55
pmaxub xmm0, xmm1
movdqa xmm1, xmm0
psrld xmm1, 0x10
pmaxub xmm1, xmm0
movdqa xmm0, xmm1
psrlw xmm0, 8
pmaxub xmm0, xmm1
movd ebp, xmm0
test rbx, rbx
je 0x140114816
cmp ebx, 8
jb 0x1401147e3
mov dword [rsp + 0x24], r8d
mov rbx, rdi
and r12d, 7
mov rdi, rax
sub rdi, r12
movzx ecx, bpl
movd xmm0, ecx
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
mov rcx, rbx
shl rcx, 5
lea r14, [rcx + r9]
add r14, 0x11a
mov qword [rsp + 0x28], r12
add rbx, r12
sub rbx, rax
nop word [rax + rax]
movzx ecx, byte [r14 - 0xe0]
movzx r8d, byte [r14 - 0xc0]
movzx ebp, byte [r14 - 0xa0]
movzx r15d, byte [r14 - 0x60]
movzx r12d, byte [r14 - 0x20]
movzx r13d, byte [r14 - 0x40]
shl r13d, 8
or r13d, r15d
shl r8d, 8
or r8d, ecx
shl ebp, 0x10
or ebp, r8d
movzx ecx, byte [r14 - 0x80]
shl ecx, 0x18
or ecx, ebp
movd xmm1, ecx
pinsrw xmm1, r13d, 2
movzx ecx, byte [r14]
shl ecx, 8
or ecx, r12d
pinsrw xmm1, ecx, 3
pmaxub xmm0, xmm1
add r14, 0x100
add rbx, 8
jne 0x140114740
pshufd xmm1, xmm0, 0x55
pmaxub xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
pmaxub xmm0, xmm1
movdqa xmm1, xmm0
psrlw xmm1, 8
pmaxub xmm1, xmm0
movd ebp, xmm1
cmp qword [rsp + 0x28], 0
mov r8d, dword [rsp + 0x24]
je 0x140114816
sub rax, rdi
shl rdi, 5
lea rcx, [rdi + r9]
add rcx, 0x3a
nop word cs:[rax + rax]
movzx edi, bpl
movzx ebp, byte [rcx]
cmp dil, bpl
cmova ebp, edi
add rcx, 0x20
dec rax
jne 0x140114800
mov ebx, edx
test r10w, r10w
je 0x140114908
test bl, bl
je 0x140114908
movzx edi, bl
shl edi, 3
lea eax, [r10 - 1]
xor edx, edx
div di
test r8w, r8w
je 0x140114908
test bpl, bpl
je 0x140114908
mov ecx, eax
movzx ebx, r10w
inc ecx
movzx ebp, bpl
movzx r14d, r8w
shl ebp, 3
dec r8d
xor r15d, r15d
mov eax, r8d
xor edx, edx
div bp
mov r8d, eax
inc r8d
shl r11, 5
nop word [rax + rax]
movzx r12d, byte [r9 + r15 + 0x19]
mov eax, r12d
imul eax, ebx
mov r10d, dword [r9 + r15 + 8]
imul eax, r10d
test eax, eax
je 0x140114908
dec eax
xor edx, edx
div edi
inc eax
mov word [r9 + r15 + 0x10], ax
movzx r13d, byte [r9 + r15 + 0x1a]
imul r10d, r14d
imul r10d, r13d
test r10d, r10d
je 0x140114908
dec r10d
mov eax, r10d
xor edx, edx
div ebp
inc eax
mov word [r9 + r15 + 0x12], ax
movzx eax, r12w
imul eax, ecx
mov word [r9 + r15 + 0x14], ax
movzx eax, r13w
imul eax, r8d
mov word [r9 + r15 + 0x16], ax
add r15, 0x20
cmp r11, r15
jne 0x140114880
mov word [rsi + 8], cx
mov word [rsi + 0xa], r8w
movabs rax, 0x8000000000000003
mov qword [rsi], rax
jmp 0x14011495a
movzx eax, byte [0x140260201]
mov ecx, 0x12
mov edx, 1
call fcn.1400b4810
test rax, rax
je 0x14011497f
movdqu xmm0, xmmword [0x1402130c4]
movdqu xmmword [rax], xmm0
mov word [rax + 0x10], 0x736e
mov rcx, rax
shr rcx, 0x10
mov qword [rsi], 0x12
mov word [rsi + 8], ax
shr rax, 0x30
mov word [rsi + 0xe], ax
mov dword [rsi + 0xa], ecx
mov qword [rsi + 0x10], 0x12
mov rax, rsi
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x140213140]
call fcn.1401bffa0
mov ecx, 1
mov edx, 0x12
call fcn.1401bfe00
int3