Function at 0x180040360
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor esi, esi
lea eax, [rdx + 0x5fa]
mov qword [rsp + 0x30], rsi
mov r13d, edx
mov qword [rsp + 0x38], rsi
mov r12, rcx
mov dword [rsp + 0x88], eax
cmp edx, eax
jae 0x1800406a3
mov r14, qword [rsp + 0x90]
lea rbx, section..data
movzx r15d, word [rsp + 0x88]
mov rdi, qword [rsp + 0x98]
nop dword [rax + rax]
cmp r13d, 0x10b
ja 0x180040625
je 0x18004060c
mov eax, r13d
sub eax, 0x15
je 0x1800405e1
sub eax, 0x11
je 0x180040400
sub eax, 0x99
je 0x1800406a3
cmp eax, 0x11
jne 0x1800404ec
mov rax, r14
jmp 0x1800406ab
xor r9d, r9d
mov r8d, 0x127
mov rdx, r12
xor ecx, ecx
call fcn.18002b880
test eax, eax
jne 0x180040678
mov rbp, rsi
mov r14d, 0x89
mov eax, r14d
sub eax, 0x19
je 0x180040566
sub eax, 0x70
je 0x18004051c
sub eax, 0x3e
je 0x180040506
cmp eax, 0x10e6
jne 0x1800405bd
rol r15w, 8
mov word [rsp + 0x98], r15w
mov rdi, qword [rsp + 0x98]
xor r9d, r9d
mov dword [rsp + 0x20], 0x84
xor r8d, r8d
xor edx, edx
mov rcx, r12
mov r14, rdi
call fcn.18001f700
cmp eax, 0x70
jne 0x18004066f
xor r9d, r9d
lea ecx, [rax + 0x2c]
xor r8d, r8d
mov rdx, r12
call fcn.180023760
mov rbx, rax
test eax, eax
jle 0x1800404e5
nop
xor r9d, r9d
xor r8d, r8d
mov edx, 0xa4
mov rcx, r12
call fcn.18002cc00
mov edx, 0x7b
mov rcx, r12
mov rbp, rax
call fcn.1800209e0
test eax, eax
jne 0x1800405d6
test rbp, rbp
je 0x1800404df
lea r8d, [rax + 3]
mov rdx, rdi
mov rcx, rbp
call fcn.180038ca0
dec ebx
test ebx, ebx
jg 0x1800404a0
lea rbx, section..data
add r13d, 0xaa
cmp r13d, dword [rsp + 0x88]
jb 0x1800403c0
jmp 0x1800406a3
test rbp, rbp
je 0x1800405bd
mov rcx, rbp
call fcn.18004c3dc
jmp 0x1800405bd
mov ebx, 0x53
cmp ebx, 0x53
je 0x180040534
cmp ebx, 0xff
je 0x180040463
jmp 0x18004054f
mov ecx, reloc.SHELL32.dll_ILFindLastID
call fcn.18004c3e4
xorps xmm0, xmm0
mov qword [rsp + 0x98], rax
mov rdi, rax
movups xmmword [rax], xmm0
add ebx, 0xac
cmp ebx, 0x1ab
jb 0x180040521
lea rbx, section..data
jmp 0x1800405bd
mov edx, dword [pe_dos_header]
mov r15d, 0xffff
test edx, edx
je 0x1800405af
nop word [rax + rax]
dec edx
mov eax, edx
movabs dword [0], eax
movzx ecx, byte [rbp]
inc rbp
movzx eax, r15w
xor rcx, rax
shr r15w, 8
movzx eax, cl
movzx eax, word [rbx + rax*2]
xor r15w, ax
test edx, edx
jne 0x180040580
lea eax, [rdx - 1]
not r15w
mov dword [0], eax
add r14d, 0x6054
cmp r14d, 0x18150
jbe 0x180040424
jmp 0x180040463
mov r13d, 0xd0
jmp 0x1800404e5
mov ecx, 0x38
call fcn.18004c3e4
xorps xmm0, xmm0
mov qword [rsp + 0x90], rax
xor ecx, ecx
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
mov qword [rax + 0x30], rcx
jmp 0x1800404ec
cmp qword [r12 + 0x18], 0x10
mov rax, r12
jb 0x18004061b
mov rax, qword [r12]
mov qword [rsp + 0x30], rax
jmp 0x1800404ec
mov eax, r13d
sub eax, 0x17a
je 0x180040652
sub eax, 0x3b
je 0x18004067d
sub eax, 0x6f
je 0x180040645
cmp eax, 0xaa
je 0x1800406a3
jmp 0x1800404ec
mov qword [rsp + 0x90], rsi
jmp 0x1800404ec
xor r8d, r8d
mov dword [r12 + 0x14], 1
mov rdx, r14
lea ecx, [r8 + 0x18]
call fcn.1800235d0
jmp 0x1800404ec
mov dword [r12 + 0x14], 1
mov rax, rsi
jmp 0x1800406ab
mov rax, qword [r12 + 0x10]
lea rcx, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor edx, edx
mov r8d, 0xcb
call fcn.18000ea00
mov byte [rsp + 0x90], al
mov rax, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret