Function at 0x14003c1e0
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 0x14003cadb
mov r10d, edx
mov rsi, rcx
movzx ebx, byte [r9 + 0x19]
cmp r11, 1
jne 0x14003c22c
movzx ebp, byte [r9 + 0x1a]
test r10w, r10w
jne 0x14003c992
jmp 0x14003ca76
movabs rax, 0x7ffffffffffffff
lea r12, [r11 + rax]
and rax, r12
cmp rax, 8
jae 0x14003c24a
xor edi, edi
jmp 0x14003c59d
cmp rax, 0x20
jae 0x14003c257
xor edi, edi
jmp 0x14003c4b7
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 0x14003c290
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 0x14003c5d8
cmp edx, 8
jb 0x14003c59d
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 word cs:[rax + rax]
movzx ebp, byte [rbx - 0xe0]
movzx r15d, byte [rbx - 0xa0]
movzx r12d, byte [rbx - 0x60]
movzx r13d, byte [rbx - 0x20]
movzx ecx, byte [rbx - 0x80]
shl ecx, 8
or ecx, r15d
movzx r15d, byte [rbx - 0xc0]
shl r15d, 8
or r15d, ebp
movd xmm1, r15d
pinsrw xmm1, ecx, 1
movzx ecx, byte [rbx - 0x40]
shl ecx, 8
or ecx, r12d
pinsrw xmm1, ecx, 2
movzx ecx, byte [rbx]
shl ecx, 8
or ecx, r13d
pinsrw xmm1, ecx, 3
pmaxub xmm0, xmm1
add rbx, 0x100
add rdx, 8
jne 0x14003c500
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 r12, qword [rsp + 0x28]
je 0x14003c5c6
mov r14, rax
sub r14, rdi
shl rdi, 5
add rdi, r9
add rdi, 0x39
nop
movzx edx, byte [rdi]
movzx ecx, bl
cmp cl, dl
cmova edx, ecx
add rdi, 0x20
mov ebx, edx
dec r14
jne 0x14003c5b0
movzx ebp, byte [r9 + 0x1a]
cmp rax, 8
jae 0x14003c5e5
xor edi, edi
jmp 0x14003c95e
mov edx, ebx
movzx ebp, byte [r9 + 0x1a]
cmp rax, 8
jb 0x14003c5d1
cmp rax, 0x20
jae 0x14003c5f2
xor edi, edi
jmp 0x14003c877
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 0x14003c630
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 0x14003c986
cmp ebx, 8
jb 0x14003c95e
mov dword [rsp + 0x28], 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 r8, r12
add rbx, r12
sub rbx, rax
nop word cs:[rax + rax]
movzx ecx, byte [r14 - 0xe0]
movzx ebp, byte [r14 - 0xa0]
movzx r15d, byte [r14 - 0x60]
movzx r12d, byte [r14 - 0x20]
movzx r13d, byte [r14 - 0x80]
shl r13d, 8
or r13d, ebp
movzx ebp, byte [r14 - 0xc0]
shl ebp, 8
or ebp, ecx
movd xmm1, ebp
pinsrw xmm1, r13d, 1
movzx ecx, byte [r14 - 0x40]
shl ecx, 8
or ecx, r15d
pinsrw xmm1, ecx, 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 0x14003c8c0
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
test r8, r8
mov r8d, dword [rsp + 0x28]
je 0x14003c986
sub rax, rdi
shl rdi, 5
lea rcx, [rdi + r9]
add rcx, 0x3a
nop dword [rax]
movzx edi, bpl
movzx ebp, byte [rcx]
cmp dil, bpl
cmova ebp, edi
add rcx, 0x20
dec rax
jne 0x14003c970
mov ebx, edx
test r10w, r10w
je 0x14003ca76
test bl, bl
je 0x14003ca76
movzx edi, bl
shl edi, 3
lea eax, [r10 - 1]
xor edx, edx
div di
test r8w, r8w
je 0x14003ca76
test bpl, bpl
je 0x14003ca76
mov ecx, eax
movzx r10d, r10w
movzx ebx, bpl
inc ecx
movzx ebp, r8w
shl ebx, 3
dec r8d
xor r14d, r14d
mov eax, r8d
xor edx, edx
div bx
mov r8d, eax
inc r8d
shl r11, 5
nop word [rax + rax]
movzx r15d, byte [r9 + r14 + 0x19]
mov eax, r15d
imul eax, r10d
mov r13d, dword [r9 + r14 + 8]
imul eax, r13d
test eax, eax
je 0x14003ca76
dec eax
xor edx, edx
div edi
inc eax
mov word [r9 + r14 + 0x10], ax
movzx r12d, byte [r9 + r14 + 0x1a]
mov eax, r12d
imul eax, ebp
imul eax, r13d
test eax, eax
je 0x14003ca76
dec eax
xor edx, edx
div ebx
inc eax
mov word [r9 + r14 + 0x12], ax
movzx eax, r15w
imul eax, ecx
mov word [r9 + r14 + 0x14], ax
movzx eax, r12w
imul eax, r8d
mov word [r9 + r14 + 0x16], ax
add r14, 0x20
cmp r11, r14
jne 0x14003c9f0
mov word [rsi + 8], cx
mov word [rsi + 0xa], r8w
movabs rax, 0x8000000000000003
mov qword [rsi], rax
jmp 0x14003cac5
movzx eax, byte [0x14019b098]
mov edx, 0x12
xor ecx, ecx
call fcn.1400a8e60
test rax, rax
je 0x14003cae7
movdqu xmm0, xmmword [str.invalid_dimensions]
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
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, str.F:Compilers_Stuff.cargo_registry_srcindex.crates.io_6f17d22bba15001fjpeg_decoder_0.3.1_srcparser.rsencountered__with_invalid_length
call fcn.1400db650
mov ecx, 1
mov edx, 0x12
call fcn.1400daf80
int3