Function at 0x1800d3f80
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x308
mov qword [rsp + 0x40], rcx
cmp rdx, 2
jb 0x1800d46d0
mov r13, r8
mov r14, rdx
movabs rax, 0x3fffffffffffffff
add rax, rdx
mov rcx, rax
or rcx, rdx
shr rcx, 0x20
je 0x1800d3ff4
xor edx, edx
div r14
mov qword [rsp + 0x78], rax
cmp r14, 0x1001
mov qword [rsp + 0x38], r9
jae 0x1800d400c
mov rax, r14
shr rax, 1
mov rcx, r14
sub rcx, rax
cmp rcx, 0x40
mov eax, 0x40
cmovb rax, rcx
jmp 0x1800d4019
xor edx, edx
div r14d
mov qword [rsp + 0x78], rax
cmp r14, 0x1001
mov qword [rsp + 0x38], r9
jb 0x1800d3fd9
mov rcx, r14
call fcn.18021dd90
mov r9, qword [rsp + 0x38]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x40]
lea rcx, [rax + 0x28]
mov qword [rsp + 0x70], rcx
lea rcx, [rax + 0x10]
mov qword [rsp + 0x88], rcx
add rax, 0xfffffffffffffff0
mov qword [rsp + 0x90], rax
mov r12d, 1
xor ebp, ebp
xor r11d, r11d
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x58], r14
mov rdx, r14
sub rdx, rbp
jbe 0x1800d40f0
nop word cs:[rax + rax]
mov rax, rbp
shl rax, 4
mov rcx, qword [rsp + 0x40]
add rcx, rax
cmp rdx, qword [rsp + 0x50]
jae 0x1800d4110
cmp byte [rsp + 0x370], 0
je 0x1800d4160
mov rdi, rdx
cmp rdx, 0x20
mov eax, 0x20
cmovae rdi, rax
mov rax, qword [rsp + 0x378]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rdx, rdi
mov r8, r13
mov rsi, r11
call fcn.1800d46f0
mov r11, rsi
mov r9, qword [rsp + 0x38]
mov eax, edi
lea rcx, [rax*2 + 1]
jmp 0x1800d42f8
xor ecx, ecx
mov eax, 1
mov qword [rsp + 0x80], rax
cmp r11, 2
jae 0x1800d4350
jmp 0x1800d4646
cmp rdx, 2
jb 0x1800d42f0
mov r15, rdx
mov rdx, qword [rcx + 8]
mov r8, qword [rcx + 0x18]
mov r8d, dword [r8]
mov edi, dword [rdx]
cmp r8d, edi
jge 0x1800d4177
cmp r15, 2
jne 0x1800d41bc
lea r8, [rcx + 0x10]
mov edx, 2
mov r9d, 1
mov r15, r11
cmp r9, 1
jne 0x1800d4255
xor r10d, r10d
jmp 0x1800d42bc
mov rax, qword [rsp + 0x50]
mov rcx, rdx
cmp rax, rdx
cmovb rcx, rax
add rcx, rcx
jmp 0x1800d42f8
mov edx, 2
cmp r15, 2
je 0x1800d42f0
mov rbx, r11
mov rdx, qword [rsp + 0x70]
add rdx, rax
mov r10d, 2
mov r11d, r8d
mov r9, r15
nop dword [rax]
mov esi, r11d
mov r11, qword [rdx]
mov r11d, dword [r11]
cmp r11d, esi
jl 0x1800d41fd
inc r10
add rdx, 0x10
cmp r9, r10
jne 0x1800d41a0
jmp 0x1800d41fa
mov r9, r15
mov rbx, r11
mov rdx, qword [rsp + 0x70]
add rdx, rax
mov r10d, 2
mov r11d, r8d
nop word cs:[rax + rax]
mov esi, r11d
mov r11, qword [rdx]
mov r11d, dword [r11]
cmp r11d, esi
jge 0x1800d41fd
inc r10
add rdx, 0x10
cmp r9, r10
jne 0x1800d41e0
mov r10, r9
cmp r10, qword [rsp + 0x50]
mov r9, qword [rsp + 0x38]
mov r11, rbx
mov rdx, r15
jb 0x1800d408a
cmp r8d, edi
jge 0x1800d4680
mov edx, 1
cmp r10, 2
jb 0x1800d42f0
mov r9, r10
shr r9, 1
mov r8, r10
shl r8, 4
add r8, rcx
mov rdx, r9
shl rdx, 4
sub r8, rdx
mov rdx, r10
mov r15, r11
cmp r9, 1
je 0x1800d4155
mov r11, r9
and r11, 0xfffffffffffffffe
add rax, qword [rsp + 0x88]
mov r10, r9
shl r10, 4
lea rsi, [r8 + r10]
add rsi, 0xfffffffffffffff0
xor r10d, r10d
movabs rbx, 0xffffffffffffffe
movups xmm0, xmmword [rax - 0x10]
movups xmm1, xmmword [rsi]
movups xmmword [rax - 0x10], xmm1
movups xmmword [rsi], xmm0
mov rdi, r10
xor rdi, rbx
add rdi, r9
shl rdi, 4
movups xmm0, xmmword [rax]
movups xmm1, xmmword [r8 + rdi]
movups xmmword [rax], xmm1
movups xmmword [r8 + rdi], xmm0
add r10, 2
add rax, 0x20
add rsi, 0xffffffffffffffe0
cmp r11, r10
jne 0x1800d4280
test r9b, 1
je 0x1800d42e7
mov rax, r10
not rax
add r9, rax
shl r10, 4
shl r9, 4
movups xmm0, xmmword [rcx + r10]
movups xmm1, xmmword [r8 + r9]
movups xmmword [rcx + r10], xmm1
movups xmmword [r8 + r9], xmm0
mov r9, qword [rsp + 0x38]
mov r11, r15
nop
lea rcx, [rdx*2 + 1]
mov rax, r12
shr rax, 1
mov qword [rsp + 0x80], rcx
shr rcx, 1
lea rdx, [rbp*2]
sub rdx, rax
lea rax, [rcx + rbp*2]
mov rcx, qword [rsp + 0x78]
imul rdx, rcx
imul rax, rcx
xor rax, rdx
je 0x1800d4340
bsr rcx, rax
xor rcx, 0x3f
cmp r11, 2
jae 0x1800d4350
jmp 0x1800d4646
mov ecx, 0x40
cmp r11, 2
jb 0x1800d4646
nop
mov rdx, rbp
shl rdx, 4
mov rax, qword [rsp + 0x40]
add rax, rdx
mov qword [rsp + 0x98], rax
add rdx, qword [rsp + 0x90]
mov qword [rsp + 0xa0], rdx
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0xa8], rbp
jmp 0x1800d43c8
mov rbp, r15
mov rdx, r11
sub r12, rdx
mov rcx, rbp
mov r8, r12
call sub.VCRUNTIME140.dll_memcpy
mov r9, qword [rsp + 0x38]
mov r11, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
lea r12, [rdi*2 + 1]
mov r13, qword [rsp + 0x48]
mov rbp, qword [rsp + 0xa8]
cmp r11, 1
jbe 0x1800d4640
cmp byte [rsp + r11 + 0xb5], cl
jb 0x1800d4646
dec r11
mov r15, qword [rsp + r11*8 + 0xf8]
mov rsi, r15
shr rsi, 1
mov rbx, r12
shr rbx, 1
lea rdi, [rsi + rbx]
cmp rdi, r9
ja 0x1800d4420
mov eax, r15d
or eax, r12d
and eax, 1
jne 0x1800d4420
add rdi, rdi
mov r12, rdi
cmp r11, 1
ja 0x1800d43c8
jmp 0x1800d4640
sub rbp, rdi
shl rbp, 4
add rbp, qword [rsp + 0x40]
test r15b, 1
mov qword [rsp + 0x68], r11
je 0x1800d4450
test r12b, 1
je 0x1800d44a0
cmp r12, 2
jae 0x1800d44fb
jmp 0x1800d43a9
mov rax, rsi
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov rcx, qword [rsp + 0x378]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rcx, rbp
mov rdx, rsi
mov r8, r13
call fcn.1800d46f0
mov rcx, qword [rsp + 0x60]
mov r11, qword [rsp + 0x68]
mov r9, qword [rsp + 0x38]
test r12b, 1
jne 0x1800d443d
mov rcx, rsi
shl rcx, 4
add rcx, rbp
mov rax, rbx
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov rdx, qword [rsp + 0x378]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rdx, rbx
mov r8, r13
call fcn.1800d46f0
mov rcx, qword [rsp + 0x60]
mov r11, qword [rsp + 0x68]
mov r9, qword [rsp + 0x38]
cmp r12, 2
jb 0x1800d43a9
cmp r15, 2
jb 0x1800d43a9
cmp rsi, rbx
mov r13, rbx
cmovb r13, rsi
cmp r13, r9
ja 0x1800d43a9
mov r15, rsi
shl r15, 4
add r15, rbp
cmp rbx, rsi
mov rdx, rbp
cmovb rdx, r15
mov r12, r13
shl r12, 4
mov r14, qword [rsp + 0x48]
mov rcx, r14
mov r8, r12
call sub.VCRUNTIME140.dll_memcpy
add r12, r14
cmp rbx, rsi
jae 0x1800d45bc
mov rax, qword [rsp + 0xa0]
mov r11, qword [rsp + 0x48]
mov r14, qword [rsp + 0x58]
nop dword [rax]
lea rcx, [r15 - 0x10]
mov rdx, qword [r12 - 8]
mov r8, qword [r15 - 8]
mov edx, dword [rdx]
xor r9d, r9d
xor r10d, r10d
cmp edx, dword [r8]
lea rdx, [r12 - 0x10]
setl r9b
cmovl rdx, rcx
setge r10b
movups xmm0, xmmword [rdx]
movups xmmword [rax], xmm0
shl r10d, 4
add r15, r10
add r15, 0xfffffffffffffff0
shl r9d, 4
add r12, r9
add r12, 0xfffffffffffffff0
cmp r15, rbp
je 0x1800d4386
add rax, 0xfffffffffffffff0
cmp r12, r11
jne 0x1800d4560
jmp 0x1800d4386
test r13, r13
je 0x1800d462f
mov rdx, qword [rsp + 0x48]
mov r14, qword [rsp + 0x58]
mov r10, qword [rsp + 0x98]
nop word cs:[rax + rax]
mov r8, rdx
mov rax, qword [r15 + 8]
mov rcx, qword [rdx + 8]
mov r9d, dword [rax]
xor eax, eax
xor edx, edx
cmp r9d, dword [rcx]
setl cl
setge dl
mov r9, r8
cmovl r9, r15
movups xmm0, xmmword [r9]
movups xmmword [rbp], xmm0
shl edx, 4
add rdx, r8
add rbp, 0x10
cmp rdx, r12
je 0x1800d438c
mov al, cl
shl eax, 4
add r15, rax
cmp r15, r10
jne 0x1800d45e0
jmp 0x1800d438c
mov rdx, qword [rsp + 0x48]
mov r14, qword [rsp + 0x58]
jmp 0x1800d438c
mov r11d, 1
mov qword [rsp + r11*8 + 0xf8], r12
mov byte [rsp + r11 + 0xb6], cl
cmp r14, rbp
jbe 0x1800d468d
inc r11
mov r12, qword [rsp + 0x80]
mov rax, r12
shr rax, 1
add rbp, rax
mov rdx, r14
sub rdx, rbp
jbe 0x1800d40f0
jmp 0x1800d4070
lea rcx, [r10*2 + 1]
jmp 0x1800d42f8
test r12b, 1
jne 0x1800d46d0
mov rax, r14
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov rcx, qword [rsp + 0x378]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rcx, qword [rsp + 0x40]
mov rdx, r14
mov r8, r13
call fcn.1800d46f0
nop
add rsp, 0x308
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret