Function at 0x140018220
Capabilities:
Create directory
Get common file path
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x270
mov rax, qword [0x1400410e0]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov eax, dword [0x1400427c0]
xor ebx, ebx
cmp eax, 0xffffffff
jne 0x1400184bc
lea rax, [rsp + 0x48]
lea rdx, str.SOFTWAREHewlett_PackardHPProfiler
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400184b6
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400184b6
lea rax, [rsp + 0x40]
lea rdx, str.TrackMemoryAllocation
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x44]
xor r8d, r8d
mov dword [rsp + 0x44], ebx
mov dword [rsp + 0x40], 4
mov dword [0x1400427c0], ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400184ab
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x1400184ab
sub eax, 2
mov qword [rsp + 0x280], rsi
je 0x14001832e
dec eax
je 0x140018315
dec eax
je 0x140018309
mov dword [0x1400427c0], 1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140044d28], rax
jmp 0x14001833f
mov dword [0x1400427c0], 4
jmp 0x140018338
mov dword [0x1400427c0], 3
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140044d28], rax
jmp 0x14001833f
mov dword [0x1400427c0], 2
mov qword [0x140044d28], rbx
lea rsi, [0x140044f90]
xor edx, edx
mov r8d, 0x104
mov rcx, rsi
mov dword [rsp + 0x40], 0x104
call fcn.14001c640
mov rcx, qword [rsp + 0x48]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x28], rdx
lea rdx, str.TrackMemoryLogLocation
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140018464
cmp byte [0x140044f90], bl
je 0x14001839d
cmp byte [0x140044f91], bl
jne 0x14001840d
lea rcx, [rsp + 0x50]
mov rdx, rsi
mov r8d, 0x104
mov qword [rsp + 0x288], rdi
call fcn.14001a6d0
mov r8d, dword [rsp + 0x40]
xor edx, edx
mov rcx, rsi
call fcn.14001c640
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x38], rbx
xor eax, eax
mov qword [rsp + 0x30], rbx
lea rdi, [rsp + 0x50]
repne scasw ax, word [rdi]
lea r8, [rsp + 0x50]
mov edx, 0x200
not rcx
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], rsi
lea r9, [rcx - 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rdi, qword [rsp + 0x288]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r8, [0x140038868]
mov edx, 0x104
mov rcx, rsi
call fcn.14001c318
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x140018464
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x140018464
mov rdx, rsi
mov ecx, 0x103
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x140018464
mov r8d, dword [rsp + 0x40]
xor edx, edx
mov rcx, rsi
call fcn.14001c640
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
lea rdx, str.TrackMemoryFailSize
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x44]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rsi, qword [rsp + 0x280]
test eax, eax
jne 0x1400184ab
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x1400184ab
mov qword [0x140044d80], rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x1400427c0]
cmp eax, 1
je 0x1400184c6
cmp eax, 3
jne 0x1400184e2
cmp qword [0x140044d28], rbx
jne 0x1400184e2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140044d28], rax
mov eax, dword [0x1400427c0]
cmp eax, 1
setge al
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14001a510
add rsp, 0x270
pop rbx
ret