Function at 0x18032a2b0
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 + 0x60], rcx
cmp rdx, 2
jb 0x18032a9fc
mov r10, r8
mov rsi, rdx
movabs rax, 0x3fffffffffffffff
add rax, rdx
mov rcx, rax
or rcx, rdx
shr rcx, 0x20
je 0x18032a2f8
xor edx, edx
div rsi
jmp 0x18032a2fc
xor edx, edx
div esi
mov qword [rsp + 0x68], rax
cmp rsi, 0x1001
mov qword [rsp + 0x48], r9
mov qword [rsp + 0x40], r10
jae 0x18032a32f
mov rax, rsi
shr rax, 1
mov rcx, rsi
sub rcx, rax
cmp rcx, 0x40
mov eax, 0x40
cmovb rax, rcx
jmp 0x18032a341
mov rcx, rsi
call fcn.18044c800
mov r10, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x60]
lea rcx, [rax + 3]
mov qword [rsp + 0x80], rcx
add rax, 0xfffffffffffffffe
mov qword [rsp + 0x70], rax
mov r13d, 1
xor r15d, r15d
movabs r11, 0x7ffffffffffffffe
xor r14d, r14d
mov qword [rsp + 0x90], rsi
nop
mov rax, qword [rsp + 0x60]
lea rax, [rax + r15*2]
mov qword [rsp + 0x50], rax
sub rsi, r15
jbe 0x18032a3c0
cmp rsi, qword [rsp + 0x58]
jb 0x18032a48b
cmp rsi, 2
jae 0x18032a3db
xor r8d, r8d
mov rax, rsi
cmp rax, qword [rsp + 0x58]
jb 0x18032a48b
jmp 0x18032a572
xor esi, esi
mov eax, 1
mov qword [rsp + 0x78], rax
cmp r14, 2
jae 0x18032a6c0
jmp 0x18032a986
mov rdi, rsi
mov rsi, qword [rsp + 0x50]
movzx ecx, byte [rsi + 2]
movzx edx, byte [rsi + 3]
xor eax, eax
cmp dl, byte [rsi + 1]
setb al
xor r8d, r8d
cmp cl, byte [rsi]
setb r8b
cmove r8d, eax
test r8b, r8b
je 0x18032a467
mov eax, 2
mov r8b, 1
mov rsi, rdi
cmp rdi, 2
je 0x18032a480
nop word cs:[rax + rax]
mov r9d, ecx
mov r10d, edx
mov rdx, qword [rsp + 0x50]
movzx ecx, byte [rdx + rax*2]
movzx edx, byte [rdx + rax*2 + 1]
xor r11d, r11d
cmp dl, r10b
setb r11b
xor r10d, r10d
cmp cl, r9b
setb r10b
cmove r10d, r11d
cmp r10b, 1
jne 0x18032a45d
inc rax
cmp rsi, rax
jne 0x18032a420
mov rax, rsi
mov r9, qword [rsp + 0x48]
jmp 0x18032a558
mov rsi, rdi
mov eax, 2
cmp rdi, 2
jne 0x18032a500
xor r8d, r8d
nop dword [rax]
cmp rax, qword [rsp + 0x58]
jae 0x18032a572
cmp byte [rsp + 0x360], 0
je 0x18032a541
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 rcx, qword [rsp + 0x50]
mov rdx, rsi
mov r8, r10
call fcn.18031d570
movabs r11, 0x7ffffffffffffffe
mov r10, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
lea rsi, [rsi*2 + 1]
jmp 0x18032a668
mov r8d, ecx
mov r11d, edx
mov rdx, qword [rsp + 0x50]
movzx ecx, byte [rdx + rax*2]
movzx edx, byte [rdx + rax*2 + 1]
xor r10d, r10d
cmp dl, r11b
setb r10b
xor r11d, r11d
cmp cl, r8b
setb r11b
cmove r11d, r10d
test r11b, r11b
jne 0x18032a555
inc rax
cmp rsi, rax
jne 0x18032a500
xor r8d, r8d
mov rax, rsi
jmp 0x18032a558
mov rax, qword [rsp + 0x58]
cmp rax, rsi
cmovb rsi, rax
add rsi, rsi
jmp 0x18032a668
xor r8d, r8d
mov r10, qword [rsp + 0x40]
movabs r11, 0x7ffffffffffffffe
cmp rax, qword [rsp + 0x58]
jb 0x18032a48b
test r8b, r8b
je 0x18032a660
cmp rax, 2
jb 0x18032a660
mov rcx, rax
shr rcx, 1
mov rdx, qword [rsp + 0x50]
lea rdx, [rdx + rax*2]
mov r8, rax
and r8, 0xfffffffffffffffe
sub rdx, r8
cmp rcx, 1
jne 0x18032a5ac
xor r8d, r8d
mov r12, r11
jmp 0x18032a61e
mov r9, rcx
and r9, 0xfffffffffffffffe
mov r8, qword [rsp + 0x80]
lea r10, [r8 + r15*2]
lea r8, [rax + r15]
mov r12, r11
mov r11, qword [rsp + 0x70]
lea r11, [r11 + r8*2]
xor r8d, r8d
nop word cs:[rax + rax]
movzx esi, word [r10 + r8*2 - 3]
movzx edi, word [r11]
mov word [r10 + r8*2 - 3], di
mov word [r11], si
mov rsi, r8
xor rsi, r12
add rsi, rcx
movzx edi, word [r10 + r8*2 - 1]
movzx ebx, word [rdx + rsi*2]
mov word [r10 + r8*2 - 1], bx
mov word [rdx + rsi*2], di
add r8, 2
add r11, 0xfffffffffffffffc
cmp r9, r8
jne 0x18032a5e0
test al, 2
mov r9, qword [rsp + 0x48]
mov r10, qword [rsp + 0x40]
mov r11, r12
je 0x18032a660
mov r10, r8
not r10
add rcx, r10
mov rsi, qword [rsp + 0x50]
movzx r11d, word [rsi + r8*2]
movzx r10d, word [rdx + rcx*2]
mov word [rsi + r8*2], r10w
mov r10, qword [rsp + 0x40]
mov word [rdx + rcx*2], r11w
movabs r11, 0x7ffffffffffffffe
lea rsi, [rax*2 + 1]
mov rax, r13
shr rax, 1
mov qword [rsp + 0x78], rsi
shr rsi, 1
lea rdx, [r15 + r15]
sub rdx, rax
lea rax, [rsi + r15*2]
mov rcx, qword [rsp + 0x68]
imul rdx, rcx
imul rax, rcx
xor rax, rdx
je 0x18032a6a6
bsr rsi, rax
xor rsi, 0x3f
cmp r14, 2
jae 0x18032a6c0
jmp 0x18032a986
mov esi, 0x40
cmp r14, 2
jb 0x18032a986
nop word cs:[rax + rax]
mov rax, qword [rsp + 0x70]
lea rax, [rax + r15*2]
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x98], r15
jmp 0x18032a71a
mov rdx, r10
mov r15, r13
sub r8, rdx
mov rcx, r15
call fcn.180468b10
mov r9, qword [rsp + 0x48]
mov r10, qword [rsp + 0x40]
movabs r11, 0x7ffffffffffffffe
lea r13, [rbp*2 + 1]
mov r15, qword [rsp + 0x98]
cmp r14, 1
jbe 0x18032a980
cmp byte [rsp + r14 + 0xa5], sil
jb 0x18032a986
dec r14
mov rdi, qword [rsp + r14*8 + 0xe8]
mov r12, rdi
shr r12, 1
mov rbx, r13
shr rbx, 1
lea rbp, [r12 + rbx]
cmp rbp, r9
ja 0x18032a770
mov eax, edi
or eax, r13d
and eax, 1
jne 0x18032a770
add rbp, rbp
mov r13, rbp
cmp r14, 1
ja 0x18032a71a
jmp 0x18032a980
mov rax, r15
sub rax, rbp
mov rcx, qword [rsp + 0x60]
lea r15, [rcx + rax*2]
test dil, 1
je 0x18032a7a0
test r13b, 1
je 0x18032a7f5
cmp r13, 2
jae 0x18032a84f
jmp 0x18032a700
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, r10
call fcn.18031d570
movabs r11, 0x7ffffffffffffffe
mov r10, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
test r13b, 1
jne 0x18032a78b
lea rcx, [r15 + r12*2]
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, r10
call fcn.18031d570
movabs r11, 0x7ffffffffffffffe
mov r10, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
cmp r13, 2
jb 0x18032a700
cmp rdi, 2
jb 0x18032a700
cmp rbx, r12
mov rdi, r12
cmovb rdi, rbx
cmp rdi, r9
ja 0x18032a700
lea r13, [r15 + r12*2]
cmp rbx, r12
mov rdx, r15
cmovb rdx, r13
lea r8, [rdi + rdi]
mov rcx, r10
call fcn.180468b10
mov r10, qword [rsp + 0x40]
lea r8, [r10 + rdi*2]
cmp rbx, r12
jae 0x18032a900
mov rax, qword [rsp + 0x88]
nop dword [rax]
movzx edx, byte [r8 - 2]
movzx ecx, byte [r8 - 1]
xor r9d, r9d
cmp cl, byte [r13 - 1]
setb r9b
xor ecx, ecx
cmp dl, byte [r13 - 2]
setb cl
cmove ecx, r9d
mov rdx, r13
test cl, cl
jne 0x18032a8cc
mov rdx, r8
movzx edx, word [rdx - 2]
mov word [rax], dx
movzx edx, cl
xor cl, 1
movzx ecx, cl
lea r13, [r13 + rcx*2 - 2]
lea r8, [r8 + rdx*2]
add r8, 0xfffffffffffffffe
cmp r13, r15
je 0x18032a6db
add rax, 0xfffffffffffffffe
cmp r8, r10
jne 0x18032a8a0
jmp 0x18032a6db
mov rdx, r10
test rdi, rdi
je 0x18032a6e1
mov r10, qword [rsp + 0x50]
nop word cs:[rax + rax]
movzx ecx, byte [r13]
movzx eax, byte [r13 + 1]
xor r9d, r9d
cmp al, byte [rdx + 1]
setb r9b
xor eax, eax
cmp cl, byte [rdx]
setb al
cmove eax, r9d
mov rcx, r13
test al, al
jne 0x18032a949
mov rcx, rdx
mov r9d, eax
xor r9b, 1
movzx ecx, word [rcx]
mov word [r15], cx
movzx ecx, r9b
lea rdx, [rdx + rcx*2]
add r15, 2
cmp rdx, r8
je 0x18032a6e1
movzx eax, al
lea r13, [r13 + rax*2]
cmp r13, r10
jne 0x18032a920
jmp 0x18032a6e1
mov r14d, 1
mov qword [rsp + r14*8 + 0xe8], r13
mov byte [rsp + r14 + 0xa6], sil
mov rsi, qword [rsp + 0x90]
cmp rsi, r15
jbe 0x18032a9b9
inc r14
mov r13, qword [rsp + 0x78]
mov rax, r13
shr rax, 1
add r15, rax
jmp 0x18032a380
test r13b, 1
jne 0x18032a9fc
mov rax, rsi
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 + 0x60]
mov rdx, rsi
mov r8, r10
call fcn.18031d570
nop
add rsp, 0x2f8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret