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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov rax, qword [0x140053010]
xor rax, rsp
mov qword [rbp + 0x190], rax
xor ebx, ebx
cmp dword [0x140054920], 0xffffffff
jne 0x14002169b
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 0x14002169b
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14002169b
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 [0x140054920], ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021690
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x140021690
mov qword [rsp + 0x2b0], rdi
sub eax, 2
je 0x140021467
dec eax
je 0x14002144e
dec eax
je 0x140021442
mov dword [0x140054920], 1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140057778], rax
jmp 0x140021478
mov dword [0x140054920], 4
jmp 0x140021471
mov dword [0x140054920], 3
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140057778], rax
jmp 0x140021478
mov dword [0x140054920], 2
mov qword [0x140057778], rbx
lea rdi, [0x140057610]
xor edx, edx
mov r8d, 0x104
mov rcx, rdi
mov dword [rsp + 0x40], 0x104
call fcn.140027190
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rdx, str.TrackMemoryLogLocation
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021649
cmp byte [0x140057610], bl
je 0x1400214da
cmp byte [0x140057611], bl
jne 0x140021592
lea rcx, [rbp - 0x80]
mov rax, rdi
mov edx, 2
nop word [rax + rax]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
lea rcx, [rcx + 0x80]
lea rax, [rax + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rcx - 0x70], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rcx - 0x60], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rcx - 0x50], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rcx - 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rcx - 0x30], xmm1
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rcx - 0x20], xmm0
movups xmmword [rcx - 0x10], xmm1
dec rdx
jne 0x1400214f0
mov eax, dword [rax]
mov r8d, dword [rsp + 0x40]
mov dword [rcx], eax
mov rcx, rdi
call fcn.140027190
lea rax, [rbp - 0x80]
or r9, 0xffffffffffffffff
nop dword [rax + rax]
inc r9
cmp word [rax + r9*2], bx
jne 0x140021560
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
lea r8, [rbp - 0x80]
mov edx, 0x200
xor ecx, ecx
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r8, [0x1400477f0]
mov edx, 0x104
mov rcx, rdi
call fcn.140026534
lea rcx, [rsp + 0x58]
mov rdx, rdi
call fcn.14000c550
lea rcx, [rsp + 0x58]
mov r9d, 2
call fcn.1400228d0
cmp rax, 0xffffffffffffffff
jne 0x14002160c
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x14002160c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x14002160c
mov rdx, rdi
mov ecx, 0x103
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x14002160c
mov r8d, dword [rsp + 0x40]
xor edx, edx
mov rcx, rdi
call fcn.140027190
cmp qword [rsp + 0x70], 0x10
jb 0x140021649
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140021649
mov rax, qword [0x1400575e8]
test rax, rax
jne 0x140021640
call fcn.140021810
mov qword [0x1400575e8], rax
test rax, rax
je 0x140021649
lea rcx, [rsp + 0x50]
xor edx, edx
call rax
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 rdi, qword [rsp + 0x2b0]
test eax, eax
jne 0x140021690
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x140021690
mov qword [0x140057780], rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [0x140054920]
dec ecx
test ecx, 0xfffffffd
jne 0x1400216c1
cmp qword [0x140057778], rbx
jne 0x1400216c1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov qword [0x140057778], rax
cmp dword [0x140054920], 1
setge al
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.140023790
mov rbx, qword [rsp + 0x2b8]
add rsp, 0x2a0
pop rbp
ret