Function at 0x140138d60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x80]
movdqa xmmword [rbp], xmm6
mov qword [rbp - 8], 0xfffffffffffffffe
mov word [rbp - 0xc], r9w
test r8, r8
je 0x140139a44
mov r14, r8
mov rdi, rdx
movzx esi, byte [rdx + 0x19]
cmp r8, 1
mov qword [rbp - 0x18], rdx
mov qword [rbp - 0x38], rcx
jne 0x140138dbd
movzx ebx, byte [rdi + 0x1a]
mov r15d, 0x28
jmp 0x14013959c
movabs rax, 0x7ffffffffffffff
lea r12, [r14 + rax]
and rax, r12
cmp rax, 8
jae 0x140138ddc
xor r8d, r8d
jmp 0x140139177
cmp rax, 0x20
jae 0x140138dea
xor r8d, r8d
jmp 0x140139087
mov edx, r12d
and edx, 0x1f
mov r8, rax
sub r8, rdx
movzx r9d, sil
movd xmm0, r9d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea r9, [rdi + 0x419]
mov r10, r8
movdqa xmm1, xmm0
nop dword [rax + rax]
movzx r11d, byte [r9 - 0x200]
movd xmm2, r11d
movzx r11d, byte [r9 - 0x220]
movd xmm3, r11d
punpcklbw xmm3, xmm2
movzx r11d, byte [r9 - 0x240]
movd xmm2, r11d
movzx r11d, byte [r9 - 0x260]
movd xmm4, r11d
punpcklbw xmm4, xmm2
punpcklwd xmm4, xmm3
movzx r11d, byte [r9 - 0x280]
movd xmm2, r11d
movzx r11d, byte [r9 - 0x2a0]
movd xmm3, r11d
punpcklbw xmm3, xmm2
movzx r11d, byte [r9 - 0x2c0]
movd xmm5, r11d
movzx r11d, byte [r9 - 0x2e0]
movd xmm2, r11d
punpcklbw xmm2, xmm5
punpcklwd xmm2, xmm3
punpckldq xmm2, xmm4
movzx r11d, byte [r9 - 0x300]
movd xmm3, r11d
movzx r11d, byte [r9 - 0x320]
movd xmm4, r11d
punpcklbw xmm4, xmm3
movzx r11d, byte [r9 - 0x340]
movd xmm3, r11d
movzx r11d, byte [r9 - 0x360]
movd xmm5, r11d
punpcklbw xmm5, xmm3
punpcklwd xmm5, xmm4
movzx r11d, byte [r9 - 0x380]
movd xmm3, r11d
movzx r11d, byte [r9 - 0x3a0]
movd xmm4, r11d
punpcklbw xmm4, xmm3
movzx r11d, byte [r9 - 0x3c0]
movd xmm3, r11d
movzx r11d, byte [r9 - 0x3e0]
movd xmm6, r11d
punpcklbw xmm6, xmm3
punpcklwd xmm6, xmm4
punpckldq xmm6, xmm5
punpcklqdq xmm6, xmm2
pmaxub xmm0, xmm6
movzx r11d, byte [r9]
movd xmm2, r11d
movzx r11d, byte [r9 - 0x20]
movd xmm3, r11d
punpcklbw xmm3, xmm2
movzx r11d, byte [r9 - 0x40]
movd xmm2, r11d
movzx r11d, byte [r9 - 0x60]
movd xmm4, r11d
punpcklbw xmm4, xmm2
punpcklwd xmm4, xmm3
movzx r11d, byte [r9 - 0x80]
movd xmm2, r11d
movzx r11d, byte [r9 - 0xa0]
movd xmm3, r11d
punpcklbw xmm3, xmm2
movzx r11d, byte [r9 - 0xc0]
movd xmm5, r11d
movzx r11d, byte [r9 - 0xe0]
movd xmm2, r11d
punpcklbw xmm2, xmm5
punpcklwd xmm2, xmm3
punpckldq xmm2, xmm4
movzx r11d, byte [r9 - 0x100]
movd xmm3, r11d
movzx r11d, byte [r9 - 0x120]
movd xmm4, r11d
punpcklbw xmm4, xmm3
movzx r11d, byte [r9 - 0x140]
movd xmm3, r11d
movzx r11d, byte [r9 - 0x160]
movd xmm5, r11d
punpcklbw xmm5, xmm3
punpcklwd xmm5, xmm4
movzx r11d, byte [r9 - 0x180]
movd xmm3, r11d
movzx r11d, byte [r9 - 0x1a0]
movd xmm4, r11d
punpcklbw xmm4, xmm3
movzx r11d, byte [r9 - 0x1c0]
movd xmm3, r11d
movzx r11d, byte [r9 - 0x1e0]
movd xmm6, r11d
punpcklbw xmm6, xmm3
punpcklwd xmm6, xmm4
punpckldq xmm6, xmm5
punpcklqdq xmm6, xmm2
pmaxub xmm1, xmm6
add r9, 0x400
add r10, 0xffffffffffffffe0
jne 0x140138e20
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 esi, xmm0
test rdx, rdx
je 0x1401391bd
cmp edx, 8
jb 0x140139177
mov r13, r14
mov rdx, r8
mov r9d, r12d
and r9d, 7
mov r8, rax
sub r8, r9
movzx r10d, sil
movd xmm0, r10d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
mov r10, rdx
shl r10, 5
add r10, rdi
add r10, 0x119
add rdx, r9
sub rdx, rax
nop word cs:[rax + rax]
movzx r11d, byte [r10 - 0xe0]
movzx esi, byte [r10 - 0xc0]
movzx edi, byte [r10 - 0xa0]
movzx ebx, byte [r10 - 0x60]
movzx r14d, byte [r10 - 0x20]
movzx r15d, byte [r10 - 0x40]
shl r15d, 8
or r15d, ebx
shl esi, 8
or esi, r11d
shl edi, 0x10
or edi, esi
movzx r11d, byte [r10 - 0x80]
shl r11d, 0x18
or r11d, edi
movd xmm1, r11d
pinsrw xmm1, r15d, 2
movzx r11d, byte [r10]
shl r11d, 8
or r11d, r14d
pinsrw xmm1, r11d, 3
pmaxub xmm0, xmm1
add r10, 0x100
add rdx, 8
jne 0x1401390d0
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 esi, xmm1
mov edx, esi
test r9, r9
mov rdi, qword [rbp - 0x18]
mov r14, r13
je 0x1401391aa
mov r9, rax
sub r9, r8
shl r8, 5
add r8, rdi
add r8, 0x39
nop dword [rax + rax]
movzx edx, byte [r8]
movzx r10d, sil
cmp r10b, dl
cmova edx, r10d
add r8, 0x20
mov esi, edx
dec r9
jne 0x140139190
movzx r10d, byte [rdi + 0x1a]
cmp rax, 8
jae 0x1401391ca
xor r8d, r8d
jmp 0x140139549
mov edx, esi
movzx r10d, byte [rdi + 0x1a]
cmp rax, 8
jb 0x1401391b5
cmp rax, 0x20
jae 0x1401391d8
xor r8d, r8d
jmp 0x140139459
mov r9d, r12d
and r9d, 0x1f
mov r8, rax
sub r8, r9
movzx r10d, r10b
movd xmm0, r10d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea r10, [rdi + 0x41a]
mov r11, r8
movdqa xmm1, xmm0
nop word [rax + rax]
movzx esi, byte [r10 - 0x200]
movd xmm2, esi
movzx esi, byte [r10 - 0x220]
movd xmm3, esi
punpcklbw xmm3, xmm2
movzx esi, byte [r10 - 0x240]
movd xmm2, esi
movzx esi, byte [r10 - 0x260]
movd xmm4, esi
punpcklbw xmm4, xmm2
punpcklwd xmm4, xmm3
movzx esi, byte [r10 - 0x280]
movd xmm2, esi
movzx esi, byte [r10 - 0x2a0]
movd xmm3, esi
punpcklbw xmm3, xmm2
movzx esi, byte [r10 - 0x2c0]
movd xmm5, esi
movzx esi, byte [r10 - 0x2e0]
movd xmm2, esi
punpcklbw xmm2, xmm5
punpcklwd xmm2, xmm3
punpckldq xmm2, xmm4
movzx esi, byte [r10 - 0x300]
movd xmm3, esi
movzx esi, byte [r10 - 0x320]
movd xmm4, esi
punpcklbw xmm4, xmm3
movzx esi, byte [r10 - 0x340]
movd xmm3, esi
movzx esi, byte [r10 - 0x360]
movd xmm5, esi
punpcklbw xmm5, xmm3
punpcklwd xmm5, xmm4
movzx esi, byte [r10 - 0x380]
movd xmm3, esi
movzx esi, byte [r10 - 0x3a0]
movd xmm4, esi
punpcklbw xmm4, xmm3
movzx esi, byte [r10 - 0x3c0]
movd xmm3, esi
movzx esi, byte [r10 - 0x3e0]
movd xmm6, esi
punpcklbw xmm6, xmm3
punpcklwd xmm6, xmm4
punpckldq xmm6, xmm5
punpcklqdq xmm6, xmm2
pmaxub xmm0, xmm6
movzx esi, byte [r10]
movd xmm2, esi
movzx esi, byte [r10 - 0x20]
movd xmm3, esi
punpcklbw xmm3, xmm2
movzx esi, byte [r10 - 0x40]
movd xmm2, esi
movzx esi, byte [r10 - 0x60]
movd xmm4, esi
punpcklbw xmm4, xmm2
punpcklwd xmm4, xmm3
movzx esi, byte [r10 - 0x80]
movd xmm2, esi
movzx esi, byte [r10 - 0xa0]
movd xmm3, esi
punpcklbw xmm3, xmm2
movzx esi, byte [r10 - 0xc0]
movd xmm5, esi
movzx esi, byte [r10 - 0xe0]
movd xmm2, esi
punpcklbw xmm2, xmm5
punpcklwd xmm2, xmm3
punpckldq xmm2, xmm4
movzx esi, byte [r10 - 0x100]
movd xmm3, esi
movzx esi, byte [r10 - 0x120]
movd xmm4, esi
punpcklbw xmm4, xmm3
movzx esi, byte [r10 - 0x140]
movd xmm3, esi
movzx esi, byte [r10 - 0x160]
movd xmm5, esi
punpcklbw xmm5, xmm3
punpcklwd xmm5, xmm4
movzx esi, byte [r10 - 0x180]
movd xmm3, esi
movzx esi, byte [r10 - 0x1a0]
movd xmm4, esi
punpcklbw xmm4, xmm3
movzx esi, byte [r10 - 0x1c0]
movd xmm3, esi
movzx esi, byte [r10 - 0x1e0]
movd xmm6, esi
punpcklbw xmm6, xmm3
punpcklwd xmm6, xmm4
punpckldq xmm6, xmm5
punpcklqdq xmm6, xmm2
pmaxub xmm1, xmm6
add r10, 0x400
add r11, 0xffffffffffffffe0
jne 0x140139210
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 r10d, xmm0
test r9, r9
je 0x140139a0f
cmp r9d, 8
jb 0x140139549
mov r13, r14
mov r9, r8
and r12d, 7
mov r8, rax
sub r8, r12
movzx r10d, r10b
movd xmm0, r10d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
mov r10, r9
shl r10, 5
add r10, rdi
add r10, 0x11a
add r9, r12
sub r9, rax
nop word cs:[rax + rax]
movzx r11d, byte [r10 - 0xe0]
movzx esi, byte [r10 - 0xc0]
movzx edi, byte [r10 - 0xa0]
movzx ebx, byte [r10 - 0x60]
movzx r14d, byte [r10 - 0x20]
movzx r15d, byte [r10 - 0x40]
shl r15d, 8
or r15d, ebx
shl esi, 8
or esi, r11d
shl edi, 0x10
or edi, esi
movzx r11d, byte [r10 - 0x80]
shl r11d, 0x18
or r11d, edi
movd xmm1, r11d
pinsrw xmm1, r15d, 2
movzx r11d, byte [r10]
shl r11d, 8
or r11d, r14d
pinsrw xmm1, r11d, 3
pmaxub xmm0, xmm1
add r10, 0x100
add r9, 8
jne 0x1401394a0
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 r10d, xmm1
mov ebx, r10d
test r12, r12
mov rdi, qword [rbp - 0x18]
mov r14, r13
je 0x14013957b
sub rax, r8
shl r8, 5
lea r9, [r8 + rdi]
add r9, 0x3a
nop dword [rax + rax]
movzx ebx, byte [r9]
movzx r8d, r10b
cmp r8b, bl
cmova ebx, r8d
add r9, 0x20
mov r10d, ebx
dec rax
jne 0x140139560
lea rax, [r14*8]
movabs r8, 0x333333333333333
lea r15, [rax + rax*4]
cmp r14, r8
ja 0x140139a50
mov esi, edx
movzx eax, byte [0x1402f4241]
mov r12d, 8
mov edx, 8
mov rcx, r15
call fcn.1400cc190
test rax, rax
je 0x140139a53
mov qword [rbp - 0x30], r14
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], 0
cmp word [rbp + 0x80], 1
sete byte [rbp - 9]
test bl, bl
sete byte [rbp - 0xa]
mov qword [rbp - 0x50], r14
shl r14, 5
mov qword [rbp - 0x58], r14
xor r14d, r14d
xor r12d, r12d
jmp 0x140139644
mov rax, qword [rbp - 0x28]
lea rcx, [r12 + r12*4]
mov rdx, qword [rbp - 0x48]
mov qword [rax + rcx*8], rdx
mov r8, qword [rbp - 0x40]
mov qword [rax + rcx*8 + 8], r8
mov qword [rax + rcx*8 + 0x10], r13
mov qword [rax + rcx*8 + 0x18], r15
mov qword [rax + rcx*8 + 0x20], rdi
inc r12
mov qword [rbp - 0x20], r12
add r14, 0x20
mov rcx, r8
cmp qword [rbp - 0x58], r14
mov rdi, qword [rbp - 0x18]
je 0x1401397db
movzx r9d, byte [rdi + r14 + 0x19]
movzx r8d, byte [rdi + r14 + 0x1a]
cmp r9b, sil
jne 0x140139680
mov r15d, 1
cmp r8b, bl
je 0x1401396d0
lea eax, [r8 + r8]
cmp al, bl
sete al
cmp word [rbp + 0x80], 1
je 0x1401396d0
jmp 0x1401396dc
cmp r8b, bl
jne 0x1401396b0
mov r10b, 1
mov r15d, 1
movzx eax, byte [rbp - 0xa]
cmp word [rbp - 0xc], 1
je 0x1401396d0
lea r11d, [r9 + r9]
mov r15d, 1
cmp r11b, sil
je 0x140139700
jmp 0x140139711
lea eax, [r8 + r8]
cmp al, bl
sete al
cmp word [rbp - 0xc], 1
jne 0x1401396ec
mov r15d, 1
cmp word [rbp + 0x80], 1
jne 0x1401396dc
lea r11, [0x14029e018]
jmp 0x1401397a0
lea r11, [0x14029dfd8]
test al, al
je 0x140139724
jmp 0x1401397a0
movzx r10d, byte [rbp - 9]
lea r11d, [r9 + r9]
mov r15d, 1
cmp r11b, sil
jne 0x140139711
test r10b, r10b
je 0x140139711
lea r11, [0x14029dff8]
jmp 0x1401397a0
cmp r11b, sil
sete r10b
lea r11, [0x14029dfb8]
test r10b, al
jne 0x1401397a0
test r9b, r9b
je 0x140139a17
movzx eax, sil
div r9b
mov r12d, eax
movzx eax, ah
test al, al
jne 0x140139813
test r8b, r8b
je 0x140139a25
movzx eax, bl
div r8b
mov r13d, eax
movzx eax, ah
test al, al
jne 0x140139813
movzx eax, byte [0x1402f4241]
mov ecx, 2
mov edx, 1
call fcn.1400cc190
test rax, rax
je 0x140139a33
mov r15, rax
mov byte [rax], r12b
mov byte [rax + 1], r13b
mov r12, qword [rbp - 0x20]
lea r11, [0x14029df98]
nop word cs:[rax + rax]
mov qword [rbp - 0x40], r11
mov qword [rbp - 0x48], r15
movzx r13d, word [rdi + r14 + 0x10]
movzx r15d, word [rdi + r14 + 0x12]
mov rax, rdi
movzx edi, word [rdi + r14 + 0x14]
imul rdi, qword [rax + r14 + 8]
cmp r12, qword [rbp - 0x30]
jne 0x140139600
lea rcx, [rbp - 0x30]
call fcn.14005d0f0
jmp 0x140139600
movzx edx, word [rdi + 0x10]
mov r9, qword [rbp - 0x50]
cmp r9, 1
jne 0x1401397f2
mov rdi, qword [rbp - 0x38]
jmp 0x1401399d4
movabs rax, 0x7ffffffffffffff
add r9, rax
and rax, r9
cmp rax, 0x10
mov rdi, qword [rbp - 0x38]
jae 0x14013986d
xor ecx, ecx
jmp 0x1401399ad
and rdx, 0xffffffffffffff00
or rdx, 6
movabs rax, 0x8000000000000000
mov rdi, qword [rbp - 0x38]
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], rdx
mov qword [rdi + 0x18], rcx
mov qword [rdi], rax
lea rcx, [rbp - 0x30]
call fcn.1400c9660
mov rax, qword [rbp - 0x30]
test rax, rax
je 0x1401399f4
mov rcx, qword [rbp - 0x28]
shl rax, 3
lea rdx, [rax + rax*4]
mov r8d, 8
call fcn.1400cc1a0
jmp 0x1401399f4
and r9d, 0xf
mov rcx, rax
sub rcx, r9
movd xmm0, edx
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
mov rdx, qword [rbp - 0x18]
add rdx, 0x210
mov r8, rcx
movdqa xmm3, xmm0
nop word [rax + rax]
movdqa xmm1, xmm3
movdqa xmm2, xmm0
movd xmm0, dword [rdx - 0x100]
movd xmm3, dword [rdx - 0x120]
punpcklwd xmm3, xmm0
movd xmm0, dword [rdx - 0x140]
movd xmm4, dword [rdx - 0x160]
punpcklwd xmm4, xmm0
punpckldq xmm4, xmm3
movd xmm0, dword [rdx - 0x180]
movd xmm3, dword [rdx - 0x1a0]
punpcklwd xmm3, xmm0
movd xmm5, dword [rdx - 0x1c0]
movd xmm0, dword [rdx - 0x1e0]
punpcklwd xmm0, xmm5
punpckldq xmm0, xmm3
punpcklqdq xmm0, xmm4
movd xmm3, dword [rdx]
movd xmm4, dword [rdx - 0x20]
punpcklwd xmm4, xmm3
movd xmm3, dword [rdx - 0x40]
movd xmm5, dword [rdx - 0x60]
punpcklwd xmm5, xmm3
punpckldq xmm5, xmm4
movd xmm3, dword [rdx - 0x80]
movd xmm4, dword [rdx - 0xa0]
punpcklwd xmm4, xmm3
movd xmm6, dword [rdx - 0xc0]
movd xmm3, dword [rdx - 0xe0]
punpcklwd xmm3, xmm6
punpckldq xmm3, xmm4
punpcklqdq xmm3, xmm5
psubusw xmm0, xmm2
paddw xmm0, xmm2
psubusw xmm3, xmm1
paddw xmm3, xmm1
add rdx, 0x200
add r8, 0xfffffffffffffff0
jne 0x1401398a0
psubusw xmm3, xmm0
paddw xmm3, xmm0
pshufd xmm0, xmm3, 0xee
psubusw xmm0, xmm3
paddw xmm0, xmm3
pshufd xmm1, xmm0, 0x55
psubusw xmm1, xmm0
paddw xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
psubusw xmm0, xmm1
paddw xmm0, xmm1
movd edx, xmm0
test r9, r9
je 0x1401399d4
sub rax, rcx
shl rcx, 5
mov r8, qword [rbp - 0x18]
add rcx, r8
add rcx, 0x30
nop
mov r8d, dword [rcx]
cmp dx, r8w
cmovbe edx, r8d
add rcx, 0x20
dec rax
jne 0x1401399c0
movzx eax, dx
movzx ecx, sil
imul rcx, rax
mov rax, qword [rbp - 0x20]
mov qword [rdi + 0x10], rax
movdqu xmm0, xmmword [rbp - 0x30]
movdqu xmmword [rdi], xmm0
mov qword [rdi + 0x18], rcx
mov rax, rdi
movaps xmm6, xmmword [rbp]
add rsp, 0x98
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov ebx, r10d
jmp 0x14013957b
lea rcx, str.C:Userskernel.cargo_registry_srcindex.crates.io_6f17d22bba15001fjpeg_decoder_0.3.1_srcupsampler.rs
call fcn.1401e0600
jmp 0x140139a42
lea rcx, str.C:Userskernel.cargo_registry_srcindex.crates.io_6f17d22bba15001fjpeg_decoder_0.3.1_srcupsampler.rs
call fcn.1401e0600
jmp 0x140139a42
mov ecx, 1
mov edx, 2
call fcn.1401dfc40
ud2
lea rcx, str.C:Userskernel.cargo_registry_srcindex.crates.io_6f17d22bba15001fjpeg_decoder_0.3.1_srcupsampler.rs
call fcn.1401dfdc0
xor r12d, r12d
mov rcx, r12
mov rdx, r15
call fcn.1401dfc20
int3