Function at 0x1803e87d0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x2f8
mov qword [rsp + 0x50], rcx
cmp rdx, 2
jb 0x1803e8e6e
mov rdi, r8
mov r8, rdx
movabs rax, 0x3fffffffffffffff
add rax, rdx
mov rcx, rax
or rcx, rdx
shr rcx, 0x20
je 0x1803e8818
xor edx, edx
div r8
jmp 0x1803e881d
xor edx, edx
div r8d
mov qword [rsp + 0x70], rax
cmp r8, 0x1001
mov qword [rsp + 0x40], r9
mov qword [rsp + 0x60], r8
jae 0x1803e884d
mov rax, r8
shr rax, 1
sub r8, rax
cmp r8, 0x40
mov eax, 0x40
cmovb rax, r8
jmp 0x1803e885a
mov rcx, r8
call fcn.18044c800
mov r9, qword [rsp + 0x40]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
lea rcx, [rax + 0xc]
mov qword [rsp + 0x90], rcx
add rax, 0xfffffffffffffff8
mov qword [rsp + 0x78], rax
mov r13d, 1
xor r15d, r15d
movabs r10, 0x1ffffffffffffffe
xor r14d, r14d
nop
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x50]
lea rcx, [rax + r15*8]
mov rax, rdx
sub rax, r15
mov qword [rsp + 0x88], r15
mov qword [rsp + 0x58], rcx
jbe 0x1803e8940
mov rsi, rax
cmp rax, qword [rsp + 0x48]
jb 0x1803e88dc
mov rax, rsi
cmp rsi, 2
jae 0x1803e896b
xor r11d, r11d
cmp rax, qword [rsp + 0x48]
jae 0x1803e89aa
cmp byte [rsp + 0x360], 0
je 0x1803e8957
cmp rsi, 0x20
mov eax, 0x20
cmovae rsi, rax
mov rax, qword [rsp + 0x368]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rdx, rsi
mov r8, rdi
mov r9, qword [rsp + 0x40]
call fcn.1803e9510
movabs r10, 0x1ffffffffffffffe
mov r9, qword [rsp + 0x40]
lea rsi, [rsi*2 + 1]
jmp 0x1803e8af9
xor edx, edx
mov r8d, 1
cmp r14, 2
jae 0x1803e8b50
jmp 0x1803e8dfe
mov rax, qword [rsp + 0x48]
cmp rax, rsi
cmovb rsi, rax
add rsi, rsi
jmp 0x1803e8af9
movzx edx, byte [rcx + 8]
cmp dl, byte [rcx]
jae 0x1803e89e6
mov r8, rax
mov eax, 2
mov r11b, 1
cmp r8, 2
je 0x1803e88d1
nop dword [rax + rax]
mov r8d, edx
movzx edx, byte [rcx + rax*8]
cmp dl, r8b
jae 0x1803e88d1
inc rax
cmp rsi, rax
jne 0x1803e8990
jmp 0x1803e8a1b
test r11b, r11b
je 0x1803e8af1
cmp rax, 2
jb 0x1803e8af1
mov r8, rax
shr r8, 1
lea rdx, [rcx + rax*8]
mov rcx, r8
lea r8, [r8*8]
sub rdx, r8
cmp rcx, 1
jne 0x1803e8a23
xor r8d, r8d
mov r12, r10
jmp 0x1803e8a9a
cmp rax, 2
jne 0x1803e89f6
mov eax, 2
jmp 0x1803e88ce
mov eax, 2
nop dword [rax + rax]
mov r8d, edx
movzx edx, byte [rcx + rax*8]
cmp dl, r8b
jb 0x1803e88ce
inc rax
cmp rsi, rax
jne 0x1803e8a00
xor r11d, r11d
mov rax, rsi
jmp 0x1803e88d1
mov r9, rcx
and r9, 0xfffffffffffffffe
mov r8, qword [rsp + 0x90]
mov r12, r10
lea r10, [r8 + r15*8]
lea r8, [rax + r15]
mov r11, qword [rsp + 0x78]
lea r11, [r11 + r8*8]
xor r8d, r8d
nop dword [rax]
movzx ebx, byte [r10 + r8*8 - 0xc]
mov esi, dword [r10 + r8*8 - 8]
mov r15, qword [r11]
mov qword [r10 + r8*8 - 0xc], r15
mov byte [r11], bl
mov dword [r11 + 4], esi
mov rsi, r8
xor rsi, r12
add rsi, rcx
movzx ebx, byte [r10 + r8*8 - 4]
mov ebp, dword [r10 + r8*8]
mov r15, qword [rdx + rsi*8]
mov qword [r10 + r8*8 - 4], r15
mov byte [rdx + rsi*8], bl
mov dword [rdx + rsi*8 + 4], ebp
add r8, 2
add r11, 0xfffffffffffffff0
cmp r9, r8
jne 0x1803e8a50
mov r11, rcx
test al, 2
mov r9, qword [rsp + 0x40]
mov r15, qword [rsp + 0x88]
mov r10, r12
mov rcx, qword [rsp + 0x58]
je 0x1803e8af1
mov r9, r8
not r9
mov rsi, r11
add rsi, r9
movzx r9d, byte [rcx + r8*8]
mov r10d, dword [rcx + r8*8 + 4]
mov r11, qword [rdx + rsi*8]
mov rcx, qword [rsp + 0x58]
mov qword [rcx + r8*8], r11
mov byte [rdx + rsi*8], r9b
mov r9, qword [rsp + 0x40]
mov dword [rdx + rsi*8 + 4], r10d
movabs r10, 0x1ffffffffffffffe
lea rsi, [rax*2 + 1]
mov rax, r13
shr rax, 1
mov r8, rsi
shr rsi, 1
lea rdx, [r15 + r15]
sub rdx, rax
lea rax, [rsi + r15*2]
mov rcx, qword [rsp + 0x70]
imul rdx, rcx
imul rax, rcx
xor rax, rdx
je 0x1803e8b35
bsr rdx, rax
xor rdx, 0x3f
cmp r14, 2
jae 0x1803e8b50
jmp 0x1803e8dfe
mov edx, 0x40
cmp r14, 2
jb 0x1803e8dfe
nop word cs:[rax + rax]
mov qword [rsp + 0x80], r8
mov rax, qword [rsp + 0x78]
lea rax, [rax + r15*8]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x68], rdx
jmp 0x1803e8baf
mov rdx, rdi
mov r15, r13
sub r8, rdx
mov rcx, r15
call fcn.180468b10
mov r9, qword [rsp + 0x40]
movabs r10, 0x1ffffffffffffffe
mov rdx, qword [rsp + 0x68]
lea r13, [rbp*2 + 1]
mov r15, qword [rsp + 0x88]
cmp r14, 1
jbe 0x1803e8df0
cmp byte [rsp + r14 + 0xa5], dl
jb 0x1803e8df6
dec r14
mov rsi, qword [rsp + r14*8 + 0xe8]
mov r12, rsi
shr r12, 1
mov rbx, r13
shr rbx, 1
lea rbp, [r12 + rbx]
cmp rbp, r9
ja 0x1803e8c00
mov eax, esi
or eax, r13d
and eax, 1
jne 0x1803e8c00
add rbp, rbp
mov r13, rbp
cmp r14, 1
ja 0x1803e8baf
jmp 0x1803e8df0
mov rax, r15
sub rax, rbp
mov rcx, qword [rsp + 0x50]
lea r15, [rcx + rax*8]
test sil, 1
jne 0x1803e8c80
mov rax, r12
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov rcx, qword [rsp + 0x368]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rcx, r15
mov rdx, r12
mov r8, rdi
mov r9, qword [rsp + 0x40]
call fcn.1803e9510
mov rdx, qword [rsp + 0x68]
movabs r10, 0x1ffffffffffffffe
mov r9, qword [rsp + 0x40]
test r13b, 1
je 0x1803e8c86
cmp r13, 2
jae 0x1803e8ce5
jmp 0x1803e8b95
test r13b, 1
jne 0x1803e8c6f
lea rcx, [r15 + r12*8]
mov rax, rbx
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov rdx, qword [rsp + 0x368]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rdx, rbx
mov r8, rdi
mov r9, qword [rsp + 0x40]
call fcn.1803e9510
mov rdx, qword [rsp + 0x68]
movabs r10, 0x1ffffffffffffffe
mov r9, qword [rsp + 0x40]
cmp r13, 2
jb 0x1803e8b95
cmp rsi, 2
jb 0x1803e8b95
cmp rbx, r12
mov rsi, r12
cmovb rsi, rbx
cmp rsi, r9
ja 0x1803e8b95
lea r13, [r15 + r12*8]
cmp rbx, r12
mov rdx, r15
cmovb rdx, r13
lea r8, [rsi*8]
mov rcx, rdi
call fcn.180468b10
lea r8, [rdi + rsi*8]
cmp rbx, r12
jae 0x1803e8d87
mov rax, qword [rsp + 0x98]
nop word cs:[rax + rax]
movzx ecx, byte [r8 - 8]
xor edx, edx
xor r9d, r9d
cmp cl, byte [r13 - 8]
setb dl
setae r9b
mov rcx, r8
cmovb rcx, r13
mov rcx, qword [rcx - 8]
mov qword [rax], rcx
lea r13, [r13 + r9*8 - 8]
lea r8, [r8 + rdx*8]
add r8, 0xfffffffffffffff8
cmp r13, r15
je 0x1803e8b70
add rax, 0xfffffffffffffff8
cmp r8, rdi
jne 0x1803e8d40
jmp 0x1803e8b70
mov rdx, rdi
test rsi, rsi
je 0x1803e8b76
mov r11, qword [rsp + 0x58]
nop dword [rax + rax]
movzx ecx, byte [r13]
xor eax, eax
xor r9d, r9d
cmp cl, byte [rdx]
setb cl
setae r9b
mov r10, rdx
cmovb r10, r13
mov r10, qword [r10]
mov qword [r15], r10
lea rdx, [rdx + r9*8]
add r15, 8
cmp rdx, r8
je 0x1803e8b76
mov al, cl
lea r13, [r13 + rax*8]
cmp r13, r11
jne 0x1803e8da0
jmp 0x1803e8b76
mov r14d, 1
mov r8, qword [rsp + 0x80]
mov qword [rsp + r14*8 + 0xe8], r13
mov byte [rsp + r14 + 0xa6], dl
cmp qword [rsp + 0x60], r15
jbe 0x1803e8e29
inc r14
mov r13, r8
mov rax, r8
shr rax, 1
add r15, rax
jmp 0x1803e8890
test r13b, 1
jne 0x1803e8e6e
mov rdx, qword [rsp + 0x60]
mov rax, rdx
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov rcx, qword [rsp + 0x368]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rcx, qword [rsp + 0x50]
mov r8, rdi
call fcn.1803e9510
nop
add rsp, 0x2f8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret