Function at 0x18055dd80
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 0x18055e4cc
mov r10, r8
mov rsi, rdx
movabs rax, 0x3fffffffffffffff
add rax, rdx
mov rcx, rax
or rcx, rdx
shr rcx, 0x20
je 0x18055ddc8
xor edx, edx
div rsi
jmp 0x18055ddcc
xor edx, edx
div esi
mov qword [rsp + 0x68], rax
cmp rsi, 0x1001
mov qword [rsp + 0x48], r9
mov qword [rsp + 0x40], r10
jae 0x18055ddff
mov rax, rsi
shr rax, 1
mov rcx, rsi
sub rcx, rax
cmp rcx, 0x40
mov eax, 0x40
cmovb rax, rcx
jmp 0x18055de11
mov rcx, rsi
call fcn.18068abf0
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 0x18055de90
cmp rsi, qword [rsp + 0x58]
jb 0x18055df5b
cmp rsi, 2
jae 0x18055deab
xor r8d, r8d
mov rax, rsi
cmp rax, qword [rsp + 0x58]
jb 0x18055df5b
jmp 0x18055e042
xor esi, esi
mov eax, 1
mov qword [rsp + 0x78], rax
cmp r14, 2
jae 0x18055e190
jmp 0x18055e456
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 0x18055df37
mov eax, 2
mov r8b, 1
mov rsi, rdi
cmp rdi, 2
je 0x18055df50
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 0x18055df2d
inc rax
cmp rsi, rax
jne 0x18055def0
mov rax, rsi
mov r9, qword [rsp + 0x48]
jmp 0x18055e028
mov rsi, rdi
mov eax, 2
cmp rdi, 2
jne 0x18055dfd0
xor r8d, r8d
nop dword [rax]
cmp rax, qword [rsp + 0x58]
jae 0x18055e042
cmp byte [rsp + 0x360], 0
je 0x18055e011
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.1805511f0
movabs r11, 0x7ffffffffffffffe
mov r10, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
lea rsi, [rsi*2 + 1]
jmp 0x18055e138
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 0x18055e025
inc rax
cmp rsi, rax
jne 0x18055dfd0
xor r8d, r8d
mov rax, rsi
jmp 0x18055e028
mov rax, qword [rsp + 0x58]
cmp rax, rsi
cmovb rsi, rax
add rsi, rsi
jmp 0x18055e138
xor r8d, r8d
mov r10, qword [rsp + 0x40]
movabs r11, 0x7ffffffffffffffe
cmp rax, qword [rsp + 0x58]
jb 0x18055df5b
test r8b, r8b
je 0x18055e130
cmp rax, 2
jb 0x18055e130
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 0x18055e07c
xor r8d, r8d
mov r12, r11
jmp 0x18055e0ee
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 0x18055e0b0
test al, 2
mov r9, qword [rsp + 0x48]
mov r10, qword [rsp + 0x40]
mov r11, r12
je 0x18055e130
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 0x18055e176
bsr rsi, rax
xor rsi, 0x3f
cmp r14, 2
jae 0x18055e190
jmp 0x18055e456
mov esi, 0x40
cmp r14, 2
jb 0x18055e456
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 0x18055e1ea
mov rdx, r10
mov r15, r13
sub r8, rdx
mov rcx, r15
call fcn.1806a7400
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 0x18055e450
cmp byte [rsp + r14 + 0xa5], sil
jb 0x18055e456
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 0x18055e240
mov eax, edi
or eax, r13d
and eax, 1
jne 0x18055e240
add rbp, rbp
mov r13, rbp
cmp r14, 1
ja 0x18055e1ea
jmp 0x18055e450
mov rax, r15
sub rax, rbp
mov rcx, qword [rsp + 0x60]
lea r15, [rcx + rax*2]
test dil, 1
je 0x18055e270
test r13b, 1
je 0x18055e2c5
cmp r13, 2
jae 0x18055e31f
jmp 0x18055e1d0
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.1805511f0
movabs r11, 0x7ffffffffffffffe
mov r10, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
test r13b, 1
jne 0x18055e25b
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.1805511f0
movabs r11, 0x7ffffffffffffffe
mov r10, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
cmp r13, 2
jb 0x18055e1d0
cmp rdi, 2
jb 0x18055e1d0
cmp rbx, r12
mov rdi, r12
cmovb rdi, rbx
cmp rdi, r9
ja 0x18055e1d0
lea r13, [r15 + r12*2]
cmp rbx, r12
mov rdx, r15
cmovb rdx, r13
lea r8, [rdi + rdi]
mov rcx, r10
call fcn.1806a7400
mov r10, qword [rsp + 0x40]
lea r8, [r10 + rdi*2]
cmp rbx, r12
jae 0x18055e3d0
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 0x18055e39c
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 0x18055e1ab
add rax, 0xfffffffffffffffe
cmp r8, r10
jne 0x18055e370
jmp 0x18055e1ab
mov rdx, r10
test rdi, rdi
je 0x18055e1b1
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 0x18055e419
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 0x18055e1b1
movzx eax, al
lea r13, [r13 + rax*2]
cmp r13, r10
jne 0x18055e3f0
jmp 0x18055e1b1
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 0x18055e489
inc r14
mov r13, qword [rsp + 0x78]
mov rax, r13
shr rax, 1
add r15, rax
jmp 0x18055de50
test r13b, 1
jne 0x18055e4cc
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.1805511f0
nop
add rsp, 0x2f8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret