Function at 0x140004080
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
movaps xmmword [rsp + 0x30], xmm7
movdqa xmmword [rsp + 0x20], xmm6
mov rsi, rcx
mov r15d, dword [rcx + 0x44]
mov eax, dword [rcx + 0x9c]
lea r12d, [r15 - 0x106]
pxor xmm6, xmm6
movdqa xmm7, xmmword [0x14000e210]
mov ecx, r15d
add ecx, r12d
mov r13d, dword [rsi + 0x58]
sub r13d, eax
mov eax, dword [rsi + 0x94]
sub r13d, eax
cmp eax, ecx
jae 0x140004204
mov rbp, qword [rsi]
mov ecx, dword [rbp + 8]
test ecx, ecx
je 0x140004438
mov ebx, dword [rsi + 0x94]
mov eax, dword [rsi + 0x9c]
add rbx, qword [rsi + 0x50]
cmp ecx, r13d
ja 0x1400040ff
mov r13d, ecx
test r13d, r13d
je 0x140004146
add rbx, rax
sub ecx, r13d
mov dword [rbp + 8], ecx
mov rdx, qword [rbp]
mov r14d, r13d
mov rcx, rbx
mov r8, r14
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbp + 0x28]
mov eax, dword [rax + 0x2c]
cmp eax, 1
je 0x1400044c4
cmp eax, 2
je 0x140004559
add qword [rbp], r14
add dword [rbp + 0xc], r13d
mov eax, dword [rsi + 0x9c]
add eax, r13d
mov dword [rsi + 0x9c], eax
mov ebx, dword [rsi + 0x170c]
lea ecx, [rbx + rax]
cmp ecx, 3
jb 0x140004199
mov r8d, dword [rsi + 0x94]
mov edx, r8d
sub edx, ebx
mov r10, qword [rsi + 0x50]
movzx ebp, byte [r10 + rdx]
mov dword [rsi + 0x70], ebp
mov ecx, dword [rsi + 0x80]
shl ebp, cl
lea edi, [rdx + 1]
movzx edi, byte [r10 + rdi]
xor edi, ebp
mov r9d, dword [rsi + 0x7c]
and edi, r9d
mov dword [rsi + 0x70], edi
test ebx, ebx
jne 0x1400044d7
cmp eax, 0x105
ja 0x140004438
jmp 0x14000442b
movzx edi, word [rdx + rbp*2 - 2]
mov ebx, eax
cmp eax, edi
ja 0x1400041bd
mov ebx, edi
sub ebx, eax
mov word [rdx + rbp*2 - 2], bx
add rbp, 0xffffffffffffffff
cmp ecx, ebp
jne 0x1400041b0
jmp 0x14000432a
movzx edi, word [rcx + rbp*2 - 2]
mov ebx, eax
cmp eax, edi
ja 0x1400041ed
mov ebx, edi
sub ebx, eax
mov word [rcx + rbp*2 - 2], bx
add rbp, 0xffffffffffffffff
cmp edx, ebp
jne 0x1400041e0
add r13d, r15d
jmp 0x1400040d9
mov rcx, qword [rsi + 0x50]
mov r8d, r15d
sub r8d, r13d
lea rdx, [rcx + r15]
call sub.VCRUNTIME140.dll_memcpy
sub dword [rsi + 0x98], r15d
sub dword [rsi + 0x94], r15d
sub dword [rsi + 0x84], r15d
mov ecx, dword [rsi + 0x74]
lea rbx, [rcx + rcx]
add rbx, qword [rsi + 0x68]
mov eax, dword [rsi + 0x44]
lea r9d, [rcx - 1]
lea rbp, [r9 + 1]
cmp rbp, 8
jae 0x140004254
mov rdx, rbx
neg ecx
xor ebp, ebp
jmp 0x1400041b0
mov r8d, ecx
and r8d, 7
sub rbp, r8
mov rdi, rbp
add rdi, rbp
mov rdx, rbx
sub rdx, rdi
sub ecx, ebp
movd xmm0, eax
pshufd xmm0, xmm0, 0
add rbx, 0xfffffffffffffff0
neg r9
add r9, r8
add r9, 0xffffffffffffffff
xor ebp, ebp
movdqu xmm1, xmmword [rbx + rbp*2]
pshufd xmm1, xmm1, 0x4e
pshuflw xmm2, xmm1, 0x1b
pshufhw xmm3, xmm2, 0x1b
punpckhwd xmm3, xmm6
punpcklwd xmm2, xmm6
movdqa xmm1, xmm0
pxor xmm1, xmm7
movdqa xmm4, xmm2
por xmm4, xmm7
movdqa xmm5, xmm1
pcmpgtd xmm5, xmm4
movdqa xmm4, xmm0
pand xmm4, xmm5
pandn xmm5, xmm2
por xmm5, xmm4
movdqa xmm2, xmm3
por xmm2, xmm7
pcmpgtd xmm1, xmm2
movdqa xmm2, xmm0
pand xmm2, xmm1
pandn xmm1, xmm3
por xmm1, xmm2
psubd xmm1, xmm0
psubd xmm5, xmm0
pslld xmm5, 0x10
psrad xmm5, 0x10
pslld xmm1, 0x10
psrad xmm1, 0x10
packssdw xmm1, xmm5
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
movdqu xmmword [rbx + rbp*2], xmm1
add rbp, 0xfffffffffffffff8
cmp r9, rbp
jne 0x140004285
test r8d, r8d
jne 0x14000424b
lea rbx, [rax + rax]
add rbx, qword [rsi + 0x60]
lea r9d, [rax - 1]
lea rbp, [r9 + 1]
cmp rbp, 8
jae 0x14000434e
mov rcx, rbx
mov edx, eax
neg edx
xor ebp, ebp
jmp 0x1400041e0
mov r8d, eax
and r8d, 7
sub rbp, r8
mov rdx, rbp
add rdx, rbp
mov rcx, rbx
sub rcx, rdx
mov edx, eax
sub edx, ebp
movd xmm0, eax
pshufd xmm0, xmm0, 0
add rbx, 0xfffffffffffffff0
neg r9
add r9, r8
add r9, 0xffffffffffffffff
xor ebp, ebp
movdqu xmm1, xmmword [rbx + rbp*2]
pshufd xmm1, xmm1, 0x4e
pshuflw xmm2, xmm1, 0x1b
pshufhw xmm3, xmm2, 0x1b
punpckhwd xmm3, xmm6
punpcklwd xmm2, xmm6
movdqa xmm1, xmm0
pxor xmm1, xmm7
movdqa xmm4, xmm2
por xmm4, xmm7
movdqa xmm5, xmm1
pcmpgtd xmm5, xmm4
movdqa xmm4, xmm0
pand xmm4, xmm5
pandn xmm5, xmm2
por xmm5, xmm4
movdqa xmm2, xmm3
por xmm2, xmm7
pcmpgtd xmm1, xmm2
movdqa xmm2, xmm0
pand xmm2, xmm1
pandn xmm1, xmm3
por xmm1, xmm2
psubd xmm1, xmm0
psubd xmm5, xmm0
pslld xmm5, 0x10
psrad xmm5, 0x10
pslld xmm1, 0x10
psrad xmm1, 0x10
packssdw xmm1, xmm5
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
movdqu xmmword [rbx + rbp*2], xmm1
add rbp, 0xfffffffffffffff8
cmp r9, rbp
jne 0x140004381
test r8d, r8d
jne 0x140004345
jmp 0x1400041fc
mov rcx, qword [rsi]
cmp dword [rcx + 8], 0
jne 0x14000456f
mov ecx, dword [rsi + 0x1718]
mov ebx, dword [rsi + 0x58]
cmp ebx, ecx
ja 0x140004460
movaps xmm6, xmmword [rsp + 0x20]
movaps xmm7, xmmword [rsp + 0x30]
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ebp, dword [rsi + 0x9c]
add ebp, dword [rsi + 0x94]
cmp ecx, ebp
jb 0x14000449a
add ebp, 0x102
cmp ebp, ecx
jbe 0x140004445
sub ebp, ecx
sub ebx, ecx
cmp ebp, ebx
ja 0x140004484
mov ebx, ebp
add rcx, qword [rsi + 0x50]
mov r8d, ebx
xor edx, edx
call sub.VCRUNTIME140.dll_memset
add dword [rsi + 0x1718], ebx
jmp 0x140004445
sub ebx, ebp
cmp ebx, 0x102
mov edi, 0x102
cmovb edi, ebx
mov ecx, ebp
add rcx, qword [rsi + 0x50]
xor edx, edx
mov r8, rdi
call sub.VCRUNTIME140.dll_memset
add edi, ebp
mov dword [rsi + 0x1718], edi
jmp 0x140004445
mov ecx, dword [rbp + 0x4c]
mov rdx, rbx
mov r8, r14
call fcn.140003370
jmp 0x140004567
add r8d, 2
sub r8d, ebx
lea eax, [r8 - 2]
shl edi, cl
mov ecx, r8d
movzx ecx, byte [r10 + rcx]
xor ecx, edi
and ecx, r9d
mov dword [rsi + 0x70], ecx
mov rbp, qword [rsi + 0x60]
mov rbx, qword [rsi + 0x68]
movzx ecx, word [rbx + rcx*2]
and eax, dword [rsi + 0x4c]
mov word [rbp + rax*2], cx
mov rax, qword [rsi + 0x68]
mov ecx, dword [rsi + 0x70]
mov word [rax + rcx*2], dx
mov ebp, dword [rsi + 0x170c]
lea ecx, [rbp - 1]
mov dword [rsi + 0x170c], ecx
mov eax, dword [rsi + 0x9c]
lea ebp, [rax + rbp]
add ebp, 0xffffffff
cmp ebp, 3
jb 0x140004199
test ecx, ecx
je 0x140004199
mov edi, dword [rsi + 0x70]
mov ecx, dword [rsi + 0x80]
mov r10, qword [rsi + 0x50]
mov r9d, dword [rsi + 0x7c]
add r8d, 1
add edx, 1
jmp 0x1400044de
mov ecx, dword [rbp + 0x4c]
mov rdx, rbx
mov r8d, r13d
call fcn.140003760
mov dword [rbp + 0x4c], eax
jmp 0x140004138
mov ecx, dword [rsi + 0x44]
jmp 0x1400040be