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

Disassembly:
push rbx
sub rsp, 0x270
mov rax, qword [0x1400420e0]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov eax, dword [0x1400437c0]
xor ebx, ebx
cmp eax, 0xffffffff
jne 0x1400194bc
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 0x1400194b6
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400194b6
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 [0x1400437c0], ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400194ab
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x1400194ab
sub eax, 2
mov qword [rsp + 0x280], rsi
je 0x14001932e
dec eax
je 0x140019315
dec eax
je 0x140019309
mov dword [0x1400437c0], 1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140045d28], rax
jmp 0x14001933f
mov dword [0x1400437c0], 4
jmp 0x140019338
mov dword [0x1400437c0], 3
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140045d28], rax
jmp 0x14001933f
mov dword [0x1400437c0], 2
mov qword [0x140045d28], rbx
lea rsi, [0x140045f90]
xor edx, edx
mov r8d, 0x104
mov rcx, rsi
mov dword [rsp + 0x40], 0x104
call fcn.14001d640
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 0x140019464
cmp byte [0x140045f90], bl
je 0x14001939d
cmp byte [0x140045f91], bl
jne 0x14001940d
lea rcx, [rsp + 0x50]
mov rdx, rsi
mov r8d, 0x104
mov qword [rsp + 0x288], rdi
call fcn.14001b6d0
mov r8d, dword [rsp + 0x40]
xor edx, edx
mov rcx, rsi
call fcn.14001d640
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, [0x140039868]
mov edx, 0x104
mov rcx, rsi
call fcn.14001d318
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x140019464
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x140019464
mov rdx, rsi
mov ecx, 0x103
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x140019464
mov r8d, dword [rsp + 0x40]
xor edx, edx
mov rcx, rsi
call fcn.14001d640
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 0x1400194ab
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x1400194ab
mov qword [0x140045d80], rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x1400437c0]
cmp eax, 1
je 0x1400194c6
cmp eax, 3
jne 0x1400194e2
cmp qword [0x140045d28], rbx
jne 0x1400194e2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140045d28], rax
mov eax, dword [0x1400437c0]
cmp eax, 1
setge al
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14001b510
add rsp, 0x270
pop rbx
ret