Function at 0x1400d8440
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
mov rax, qword [rcx + 8]
mov qword [rsp + 0x28], rcx
mov r14, qword [rcx + 0x10]
mov qword [rsp + 0x30], rax
add rax, 3
mov rcx, r14
jmp 0x1400d84ae
movzx r9d, byte [rax - 2]
movzx r10d, byte [rax]
movzx r11d, dl
movzx esi, r8b
cmp dl, r8b
cmova esi, r11d
movzx edx, sil
movzx r8d, r9b
movzx r9d, r10b
cmp r8b, r9b
cmovb r9d, r8d
movzx r8d, r9b
inc r8d
add rax, 2
dec rcx
cmp r8d, edx
jae 0x1400d84d6
cmp rcx, 2
jb 0x1400d8cdf
movzx edx, byte [rax - 3]
movzx r8d, byte [rax - 1]
cmp dl, r8b
jb 0x1400d8470
jne 0x1400d84d6
movzx r9d, byte [rax - 2]
movzx r10d, byte [rax]
cmp r9b, r10b
jb 0x1400d8479
cmp r14, 0x15
jae 0x1400d84fe
cmp r14, 1
jbe 0x1400d8ba0
mov r8d, 1
mov rcx, qword [rsp + 0x30]
mov rdx, r14
call fcn.1400d2fb0
jmp 0x1400d8ba9
movabs r12, 0x7ffffffffffffffe
mov rdx, r14
and rdx, r12
movzx eax, byte [0x14017a148]
xor ecx, ecx
call fcn.1400dbb10
test rax, rax
je 0x1400d8cf3
mov r15, rax
movzx eax, byte [0x14017a148]
mov edx, 0x100
xor ecx, ecx
call fcn.1400dbb10
test rax, rax
je 0x1400d8cf3
mov rbp, rax
mov rax, qword [rsp + 0x30]
lea rcx, [rax + 3]
mov qword [rsp + 0x60], rcx
lea rcx, [rax - 1]
mov qword [rsp + 0x58], rcx
add rax, 0xfffffffffffffffe
mov qword [rsp + 0x70], rax
mov eax, 0x10
mov qword [rsp + 0x50], rax
xor ebx, ebx
xor edi, edi
mov qword [rsp + 0x40], r14
jmp 0x1400d8593
mov edi, 1
mov rbx, qword [rsp + 0x68]
cmp rbx, r14
jae 0x1400d8b7e
mov rax, r14
sub rax, rbx
mov rcx, qword [rsp + 0x30]
lea rcx, [rcx + rbx*2]
cmp rax, 2
jae 0x1400d85c0
mov r8, rax
lea rax, [r8 + rbx]
jmp 0x1400d8760
movzx edx, byte [rcx + 2]
cmp dl, byte [rcx]
jb 0x1400d85d5
jne 0x1400d8616
movzx r8d, byte [rcx + 1]
cmp byte [rcx + 3], r8b
jae 0x1400d8616
mov r8d, 2
cmp rax, 2
jne 0x1400d85f8
jmp 0x1400d8664
inc r8
cmp rax, r8
je 0x1400d8661
mov r9d, edx
movzx edx, byte [rcx + r8*2]
cmp dl, r9b
jb 0x1400d85f0
jne 0x1400d8664
movzx r9d, byte [rcx + r8*2 - 1]
cmp byte [rcx + r8*2 + 1], r9b
jb 0x1400d85f0
jmp 0x1400d8664
mov r8d, 2
cmp rax, 2
jne 0x1400d863c
jmp 0x1400d85ab
inc r8
cmp rax, r8
je 0x1400d85a8
mov r9d, edx
movzx edx, byte [rcx + r8*2]
cmp dl, r9b
jb 0x1400d85ab
jne 0x1400d8630
movzx r9d, byte [rcx + r8*2 - 1]
cmp byte [rcx + r8*2 + 1], r9b
jae 0x1400d8630
jmp 0x1400d85ab
mov r8, rax
mov rax, r8
add rax, rbx
jb 0x1400d8cf3
cmp rax, r14
ja 0x1400d8cf3
cmp r8, 2
jae 0x1400d868a
mov r8d, 1
jmp 0x1400d8760
mov r13, rax
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x38], rbp
mov rax, r8
shr rax, 1
lea rdx, [rcx + r8*2]
mov r9, r8
and r9, 0xfffffffffffffffe
sub rdx, r9
cmp rax, 1
jne 0x1400d86b6
xor r9d, r9d
jmp 0x1400d871f
mov r10, rax
and r10, r12
mov r9, qword [rsp + 0x60]
lea r11, [r9 + rbx*2]
mov r9, qword [rsp + 0x58]
lea rsi, [r9 + r13*2]
xor r9d, r9d
nop word cs:[rax + rax]
movzx edi, word [r11 + r9*2 - 3]
movzx ebp, word [rsi - 1]
mov word [r11 + r9*2 - 3], bp
mov word [rsi - 1], di
mov rdi, r9
xor rdi, r12
add rdi, rax
movzx ebp, word [r11 + r9*2 - 1]
movzx r14d, word [rdx + rdi*2]
mov word [r11 + r9*2 - 1], r14w
mov word [rdx + rdi*2], bp
add r9, 2
add rsi, 0xfffffffffffffffc
cmp r10, r9
jne 0x1400d86e0
test r8b, 2
je 0x1400d8742
mov r10, r9
not r10
add rax, r10
movzx r10d, word [rcx + r9*2]
movzx r11d, word [rdx + rax*2]
mov word [rcx + r9*2], r11w
mov word [rdx + rax*2], r10w
mov r14, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x20]
mov rax, r13
nop word cs:[rax + rax]
mov rsi, rax
sub rsi, rbx
jb 0x1400d8cf3
cmp rax, r14
ja 0x1400d8cf3
jae 0x1400d87b5
cmp r8, 0xa
jae 0x1400d87b5
cmp rbx, 0xfffffffffffffff6
jae 0x1400d8cf3
mov r13, rdi
lea rdi, [rbx + 0xa]
cmp rdi, r14
cmovae rdi, r14
cmp rax, rbx
mov eax, 1
cmove r8, rax
mov rsi, rdi
sub rsi, rbx
mov rdx, rsi
call fcn.1400d2fb0
mov rax, rdi
mov rdi, r13
mov qword [rsp + 0x68], rax
cmp rdi, qword [rsp + 0x50]
jne 0x1400d8811
mov rdx, rdi
shl rdx, 5
movzx eax, byte [0x14017a148]
xor ecx, ecx
call fcn.1400dbb10
test rax, rax
je 0x1400d8cf3
mov r13, rax
lea rax, [rdi + rdi]
mov qword [rsp + 0x50], rax
mov r8, rdi
shl r8, 4
mov rcx, r13
mov rdx, rbp
call sub.msvcrt.dll_memcpy
mov rcx, qword [0x14017a0c0]
xor edx, edx
mov r8, rbp
call sub.KERNEL32.dll_HeapFree
mov rbp, r13
mov rax, rdi
shl rax, 4
mov qword [rbp + rax], rsi
mov qword [rbp + rax + 8], rbx
inc rdi
mov rax, rdi
cmp rdi, 2
mov qword [rsp + 0x38], rbp
jae 0x1400d88aa
jmp 0x1400d8585
mov rsi, rbp
mov rdx, r15
mov rbp, qword [rsp + 0x38]
add rbx, rbp
sub r8, rdx
mov rcx, rsi
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x78]
add rax, qword [rsp + 0x48]
mov qword [rbx], rax
mov rax, qword [rsp + 0x80]
mov qword [rbx + 8], rax
lea rdx, [r13 + 0x10]
mov rax, qword [rsp + 0x88]
not rax
add rdi, rax
shl rdi, 4
mov rcx, r13
mov r8, rdi
call sub.msvcrt.dll_memmove
mov rax, qword [rsp + 0x90]
cmp rax, 1
mov r14, qword [rsp + 0x40]
jbe 0x1400d8580
mov rdi, rax
lea r10, [rax - 1]
mov rcx, r10
shl rcx, 4
mov rax, qword [rbp + rcx]
mov rcx, qword [rbp + rcx + 8]
add rcx, rax
cmp rcx, r14
je 0x1400d8920
mov rdx, rdi
shl rdx, 4
mov r8, qword [rdx + rbp - 0x20]
cmp r8, rax
jbe 0x1400d8920
cmp rdi, 2
je 0x1400d8b6a
lea r11, [rdi - 3]
mov rcx, r11
shl rcx, 4
mov rcx, qword [rbp + rcx]
lea r9, [r8 + rax]
cmp rcx, r9
jbe 0x1400d8936
cmp rdi, 3
jbe 0x1400d8b74
add r8, rcx
cmp qword [rdx + rbp - 0x40], r8
jbe 0x1400d8936
jmp 0x1400d8585
cmp rdi, 2
je 0x1400d893b
lea r11, [rdi - 3]
mov rcx, r11
shl rcx, 4
mov rcx, qword [rbp + rcx]
cmp rcx, rax
jb 0x1400d893f
lea r11, [rdi - 2]
cmp r11, rdi
jae 0x1400d8cf3
lea rbx, [r11 + 1]
mov qword [rsp + 0x20], rdi
cmp rbx, rdi
jae 0x1400d8cf3
mov r12, r15
mov r13, r11
shl r13, 4
mov rcx, qword [rbp + r13 + 8]
shl rbx, 4
mov rax, qword [rbp + rbx]
mov rdi, qword [rbp + rbx + 8]
add rdi, rax
mov r15, rdi
sub r15, rcx
jb 0x1400d8cf3
cmp rdi, r14
ja 0x1400d8cf3
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x88], r11
mov qword [rsp + 0x90], r10
add r13, rbp
mov rdx, qword [r13]
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x80], rcx
lea rsi, [rax + rcx*2]
lea rbp, [rsi + rdx*2]
mov r14, r15
sub r14, rdx
cmp r14, rdx
mov qword [rsp + 0x48], rdx
jae 0x1400d8a90
lea r8, [r14 + r14]
mov r15, r12
mov rcx, r12
mov rdx, rbp
call sub.msvcrt.dll_memcpy
lea r8, [r12 + r14*2]
cmp qword [rsp + 0x48], 0
jle 0x1400d8b50
test r14, r14
movabs r12, 0x7ffffffffffffffe
jle 0x1400d8b48
mov rax, qword [rsp + 0x70]
lea rax, [rax + rdi*2]
mov rdi, qword [rsp + 0x20]
jmp 0x1400d8a66
movzx ecx, byte [r8 - 1]
sete dl
cmp cl, byte [rbp - 1]
setb cl
and cl, dl
movzx ecx, cl
sub rbp, rcx
sub rbp, rcx
lea r8, [r8 + rcx*2]
add r8, 0xfffffffffffffffe
test cl, cl
mov rcx, r8
cmovne rcx, rbp
movzx ecx, word [rcx]
mov word [rax], cx
cmp rbp, rsi
jbe 0x1400d8840
add rax, 0xfffffffffffffffe
cmp r8, r15
jbe 0x1400d8840
movzx ecx, byte [rbp - 2]
cmp byte [r8 - 2], cl
jae 0x1400d8a20
add rbp, 0xfffffffffffffffe
mov rcx, rbp
movzx ecx, word [rcx]
mov word [rax], cx
cmp rbp, rsi
ja 0x1400d8a59
jmp 0x1400d8840
lea r8, [rdx + rdx]
mov r14, r12
mov rcx, r12
mov rdx, rsi
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x48]
lea r8, [r12 + rax*2]
test rax, rax
jle 0x1400d8b40
cmp r15, rax
jle 0x1400d8b40
mov rax, qword [rsp + 0x30]
lea rax, [rax + rdi*2]
mov r15, r12
mov rdx, r12
movabs r12, 0x7ffffffffffffffe
mov rdi, qword [rsp + 0x20]
nop dword [rax + rax]
movzx r10d, byte [rdx]
mov cl, 1
mov r9, rbp
cmp byte [rbp], r10b
jb 0x1400d8b08
movzx ecx, byte [rbp + 1]
sete r10b
cmp cl, byte [rdx + 1]
setb cl
mov r9, rbp
and cl, r10b
jne 0x1400d8b08
mov r9, rdx
movzx r9d, word [r9]
mov word [rsi], r9w
add rsi, 2
mov r9d, ecx
xor r9b, 1
movzx r9d, r9b
lea rdx, [rdx + r9*2]
cmp rdx, r8
jae 0x1400d8846
movzx ecx, cl
lea rbp, [rbp + rcx*2]
cmp rbp, rax
jb 0x1400d8ae0
jmp 0x1400d8846
mov r15, r12
mov rdx, r12
jmp 0x1400d8b56
mov rsi, rbp
mov rdx, r15
jmp 0x1400d8b60
mov rsi, rbp
mov rdx, r15
movabs r12, 0x7ffffffffffffffe
mov rdi, qword [rsp + 0x20]
jmp 0x1400d8846
mov edi, 2
jmp 0x1400d8585
mov edi, 3
jmp 0x1400d8585
mov rcx, qword [0x14017a0c0]
xor edx, edx
mov r8, rbp
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x14017a0c0]
xor edx, edx
mov r8, r15
call sub.KERNEL32.dll_HeapFree
test r14, r14
je 0x1400d8cf3
mov rax, qword [rsp + 0x28]
mov rdx, qword [rax + 0x10]
xor eax, eax
jmp 0x1400d8bdb
mov byte [rcx + rdx*2], bl
mov byte [rcx + rdx*2 + 1], dil
inc rdx
mov qword [r8 + 0x10], rdx
mov rax, rsi
cmp r14, rsi
je 0x1400d8cb4
lea rsi, [rax + 1]
cmp rdx, r14
jbe 0x1400d8c25
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 8]
movzx r9d, byte [rcx + rdx*2 - 2]
movzx r8d, byte [rcx + rdx*2 - 1]
movzx r11d, byte [rcx + rax*2]
movzx r10d, byte [rcx + rsi*2 - 1]
cmp r9b, r11b
mov edi, r11d
cmova edi, r9d
cmp r8b, r10b
mov ebx, r10d
cmovb ebx, r8d
movzx edi, dil
movzx ebx, bl
inc ebx
cmp ebx, edi
jae 0x1400d8c70
cmp rax, rdx
jae 0x1400d8cf3
mov r8, qword [rsp + 0x28]
mov rcx, qword [r8 + 8]
movzx ebx, byte [rcx + rax*2]
movzx edi, byte [rcx + rsi*2 - 1]
cmp rdx, qword [r8]
jne 0x1400d8bc0
mov rcx, r8
call fcn.1400d3500
mov r8, qword [rsp + 0x28]
mov rcx, qword [r8 + 8]
mov rdx, qword [r8 + 0x10]
jmp 0x1400d8bc0
movzx eax, r9b
movzx edi, r11b
cmp r9b, r11b
cmovb edi, eax
movzx eax, r8b
movzx r9d, r10b
cmp r8b, r10b
cmova r9d, eax
cmp dil, r9b
mov eax, r9d
cmova r9d, edi
cmovb eax, edi
mov byte [rcx + rdx*2 - 2], al
mov byte [rcx + rdx*2 - 1], r9b
mov r8, qword [rsp + 0x28]
mov rax, rsi
cmp r14, rsi
jne 0x1400d8bdb
sub rdx, r14
jb 0x1400d8cf3
mov qword [r8 + 0x10], 0
je 0x1400d8cdf
lea rax, [rcx + r14*2]
lea r8, [rdx + rdx]
mov rsi, rdx
mov rdx, rax
call sub.msvcrt.dll_memmove
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x10], rsi
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2