Function at 0x14003cb00
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, 0x88
movdqa xmmword [rsp + 0x70], xmm6
mov word [rsp + 0x26], r9w
test r8, r8
je 0x14003d82c
mov r15, r8
mov rbp, rdx
movzx edi, byte [rdx + 0x19]
cmp r8, 1
mov qword [rsp + 0x50], rdx
jne 0x14003cb47
movzx r12d, byte [rbp + 0x1a]
jmp 0x14003d33e
movabs rax, 0x7ffffffffffffff
lea r14, [r15 + rax]
and rax, r14
cmp rax, 8
jae 0x14003cb68
xor edx, edx
mov r10d, edi
jmp 0x14003cf04
cmp rax, 0x20
jae 0x14003cb78
xor edx, edx
mov r10d, edi
jmp 0x14003ce19
mov r8d, r14d
and r8d, 0x1f
mov rdx, rax
sub rdx, r8
movzx r9d, dil
movd xmm0, r9d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea r9, [rbp + 0x419]
mov r10, rdx
movdqa xmm1, xmm0
nop word [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 0x14003cbb0
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 r8, r8
je 0x14003cf4c
cmp r8d, 8
jb 0x14003cf04
mov r9, rdx
mov r8d, r14d
and r8d, 7
mov rdx, rax
sub rdx, r8
movzx r10d, r10b
movd xmm0, r10d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
mov r10, r9
shl r10, 5
add r10, rbp
add r10, 0x119
add r9, r8
sub r9, rax
nop word cs:[rax + rax]
movzx r11d, byte [r10 - 0xe0]
movzx esi, byte [r10 - 0xa0]
movzx edi, byte [r10 - 0x60]
movzx ebx, byte [r10 - 0x20]
movzx ebp, byte [r10 - 0x80]
shl ebp, 8
or ebp, esi
movzx esi, byte [r10 - 0xc0]
shl esi, 8
or esi, r11d
movd xmm1, esi
pinsrw xmm1, ebp, 1
movzx r11d, byte [r10 - 0x40]
shl r11d, 8
or r11d, edi
pinsrw xmm1, r11d, 2
movzx r11d, byte [r10]
shl r11d, 8
or r11d, ebx
pinsrw xmm1, r11d, 3
pmaxub xmm0, xmm1
add r10, 0x100
add r9, 8
jne 0x14003ce60
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 edi, r10d
test r8, r8
mov rbp, qword [rsp + 0x50]
je 0x14003cf3a
mov r8, rax
sub r8, rdx
shl rdx, 5
add rdx, rbp
add rdx, 0x39
nop word cs:[rax + rax]
movzx edi, byte [rdx]
movzx r9d, r10b
cmp r9b, dil
cmova edi, r9d
add rdx, 0x20
mov r10d, edi
dec r8
jne 0x14003cf20
movzx r9d, byte [rbp + 0x1a]
cmp rax, 8
jae 0x14003cf5a
xor edx, edx
jmp 0x14003d2f5
mov edi, r10d
movzx r9d, byte [rbp + 0x1a]
cmp rax, 8
jb 0x14003cf45
cmp rax, 0x20
jae 0x14003cf67
xor edx, edx
jmp 0x14003d209
mov r8d, r14d
and r8d, 0x1f
mov rdx, rax
sub rdx, r8
movzx r9d, r9b
movd xmm0, r9d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea r9, [rbp + 0x41a]
mov r10, rdx
movdqa xmm1, xmm0
nop dword [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 0x14003cfa0
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 r9d, xmm0
test r8, r8
je 0x14003d7d2
cmp r8d, 8
jb 0x14003d2f5
mov r13d, edi
mov r8, rdx
and r14d, 7
mov rdx, rax
sub rdx, r14
movzx r9d, r9b
movd xmm0, r9d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
mov r9, r8
shl r9, 5
add r9, rbp
add r9, 0x11a
add r8, r14
sub r8, rax
nop word cs:[rax + rax]
movzx r10d, byte [r9 - 0xe0]
movzx r11d, byte [r9 - 0xa0]
movzx esi, byte [r9 - 0x60]
movzx edi, byte [r9 - 0x20]
movzx ebx, byte [r9 - 0x80]
shl ebx, 8
or ebx, r11d
movzx r11d, byte [r9 - 0xc0]
shl r11d, 8
or r11d, r10d
movd xmm1, r11d
pinsrw xmm1, ebx, 1
movzx r10d, byte [r9 - 0x40]
shl r10d, 8
or r10d, esi
pinsrw xmm1, r10d, 2
movzx r10d, byte [r9]
shl r10d, 8
or r10d, edi
pinsrw xmm1, r10d, 3
pmaxub xmm0, xmm1
add r9, 0x100
add r8, 8
jne 0x14003d250
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 r9d, xmm1
mov r12d, r9d
test r14, r14
mov edi, r13d
je 0x14003d32b
sub rax, rdx
shl rdx, 5
lea r8, [rdx + rbp]
add r8, 0x3a
nop word cs:[rax + rax]
movzx r12d, byte [r8]
movzx edx, r9b
cmp dl, r12b
cmova r12d, edx
add r8, 0x20
mov r9d, r12d
dec rax
jne 0x14003d310
movabs rax, 0x333333333333333
cmp r15, rax
ja 0x14003d7e8
mov qword [rsp + 0x40], rcx
lea rax, [r15*8]
lea rsi, [rax + rax*4]
movzx eax, byte [0x14019b098]
xor ecx, ecx
mov rdx, rsi
call fcn.1400a8e60
test rax, rax
je 0x14003d838
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x60], r15
shl r15, 5
mov qword [rsp + 0x68], r15
xor ebx, ebx
xor r15d, r15d
mov dword [rsp + 0x4c], r12d
jmp 0x14003d3ff
lea rcx, [rsp + 0x28]
mov rdx, r15
call fcn.140039970
mov rax, qword [rsp + 0x30]
mov r15, qword [rsp + 0x38]
lea rcx, [r15 + r15*4]
mov qword [rax + rcx*8], r13
mov qword [rax + rcx*8 + 8], rsi
mov qword [rax + rcx*8 + 0x10], rdi
mov qword [rax + rcx*8 + 0x18], rbp
mov qword [rax + rcx*8 + 0x20], r14
mov r15, qword [rsp + 0x38]
inc r15
mov qword [rsp + 0x38], r15
add rbx, 0x20
mov rcx, rsi
cmp qword [rsp + 0x68], rbx
mov rbp, qword [rsp + 0x50]
mov edi, r12d
mov r12d, dword [rsp + 0x4c]
je 0x14003d554
mov qword [rsp + 0x58], rax
cmp word [rsp + 0xf0], 1
setne r10b
cmp word [rsp + 0x26], 1
setne r11b
movzx r9d, byte [rbp + rbx + 0x19]
movzx r8d, byte [rbp + rbx + 0x1a]
cmp r9b, dil
setne r14b
and r14b, r11b
cmp r8b, r12b
setne r11b
and r11b, r10b
mov eax, 1
test r14b, r14b
jne 0x14003d460
test r11b, r11b
jne 0x14003d460
lea rsi, [0x1400ecef0]
jmp 0x14003d520
lea r10d, [r9 + r9]
cmp r10b, dil
sete sil
xor r11b, 1
test sil, r11b
jne 0x14003d510
lea r11d, [r8 + r8]
cmp r11b, r12b
sete sil
not r14b
test r14b, sil
jne 0x14003d519
cmp r10b, dil
jne 0x14003d4a4
lea rsi, [0x1400ece90]
cmp r11b, r12b
je 0x14003d520
test r9b, r9b
je 0x14003d7ed
movzx eax, dil
div r9b
mov esi, eax
movzx eax, ah
test al, al
jne 0x14003d730
test r8b, r8b
je 0x14003d805
movzx eax, r12b
div r8b
mov r14d, eax
movzx eax, ah
test al, al
jne 0x14003d730
movzx eax, byte [0x14019b098]
mov edx, 2
xor ecx, ecx
call fcn.1400a8e60
test rax, rax
je 0x14003d81d
mov byte [rax], sil
mov byte [rax + 1], r14b
lea rsi, [0x1400ece70]
jmp 0x14003d520
lea rsi, [0x1400eced0]
jmp 0x14003d520
lea rsi, [0x1400eceb0]
mov r13, rax
mov r12d, edi
movzx edi, word [rbp + rbx + 0x10]
mov rax, rbp
movzx ebp, word [rbp + rbx + 0x12]
movzx r14d, word [rax + rbx + 0x14]
imul r14, qword [rax + rbx + 8]
cmp r15, qword [rsp + 0x28]
je 0x14003d3a0
mov rax, qword [rsp + 0x58]
jmp 0x14003d3b7
movzx edx, word [rbp + 0x10]
mov r10, qword [rsp + 0x60]
cmp r10, 1
jne 0x14003d56d
mov r9, qword [rsp + 0x40]
jmp 0x14003d6f4
movabs rax, 0x7ffffffffffffff
add r10, rax
and rax, r10
cmp rax, 0x10
mov r9, qword [rsp + 0x40]
jae 0x14003d58f
xor ecx, ecx
jmp 0x14003d6cd
and r10d, 0xf
mov rcx, rax
sub rcx, r10
movd xmm0, edx
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea rdx, [rbp + 0x210]
mov r8, rcx
movdqa xmm3, xmm0
nop word cs:[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 0x14003d5c0
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 r10, r10
je 0x14003d6f4
sub rax, rcx
shl rcx, 5
add rcx, rbp
add rcx, 0x30
nop dword [rax + rax]
mov r8d, dword [rcx]
cmp dx, r8w
cmovbe edx, r8d
add rcx, 0x20
dec rax
jne 0x14003d6e0
movzx eax, dx
movzx ecx, dil
imul rcx, rax
mov rax, qword [rsp + 0x38]
mov qword [r9 + 0x10], rax
movdqu xmm0, xmmword [rsp + 0x28]
movdqu xmmword [r9], xmm0
mov qword [r9 + 0x18], rcx
movaps xmm6, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
and r13, 0xffffffffffffff00
or r13, 6
movabs rax, 0x8000000000000000
mov r8, qword [rsp + 0x40]
mov qword [r8 + 8], rax
mov qword [r8 + 0x10], r13
mov qword [r8 + 0x18], rcx
mov qword [r8], rax
test r15, r15
mov rax, qword [rsp + 0x58]
je 0x14003d7ad
add rax, 8
mov rdi, qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14003d78a
mov rcx, qword [0x14019b1c8]
xor edx, edx
mov r8, rsi
call rdi
mov rax, r14
add rax, 0x28
dec r15
je 0x14003d7ad
mov rsi, qword [rax - 8]
mov r14, rax
mov rbx, qword [rax]
mov rcx, rsi
call qword [rbx]
cmp qword [rbx + 8], 0
je 0x14003d77e
cmp qword [rbx + 0x10], 0x11
jb 0x14003d770
mov rsi, qword [rsi - 8]
jmp 0x14003d770
cmp qword [rsp + 0x28], 0
je 0x14003d717
mov r8, qword [rsp + 0x30]
mov rcx, qword [0x14019b1c8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14003d717
mov r12d, r9d
movabs rax, 0x333333333333333
cmp r15, rax
jbe 0x14003d33e
call fcn.140002630
lea rcx, str.attempt_to_calculate_the_remainder_with_a_divisor_of_zero
lea r8, str.F:Compilers_Stuff.cargo_registry_srcindex.crates.io_6f17d22bba15001fjpeg_decoder_0.3.1_srcupsampler.rs
mov edx, 0x39
call fcn.1400db290
lea rcx, str.attempt_to_calculate_the_remainder_with_a_divisor_of_zero
lea r8, str.F:Compilers_Stuff.cargo_registry_srcindex.crates.io_6f17d22bba15001fjpeg_decoder_0.3.1_srcupsampler.rs
mov edx, 0x39
call fcn.1400db290
mov ecx, 1
mov edx, 2
call fcn.1400daf80
lea rcx, str.F:Compilers_Stuff.cargo_registry_srcindex.crates.io_6f17d22bba15001fjpeg_decoder_0.3.1_srcupsampler.rs
call fcn.1400db650
mov ecx, 8
mov rdx, rsi
call fcn.1400daf80
int3