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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x234
mov eax, dword [0x43b010]
xor eax, esp
mov dword [esp + 0x230], eax
mov ecx, dword [0x43c300]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push edi
cmp ecx, 0xffffffff
jne 0x415593
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
push eax
push 0x20019
push 0
push str.SOFTWAREHewlett_PackardHPProfiler
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41558d
mov eax, dword [esp + 0x10]
test eax, eax
je 0x41558d
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0
push ecx
push 0
push 0
push str.TrackMemoryAllocation
push eax
mov dword [esp + 0x24], 4
mov dword [0x43c300], 0
call esi
test eax, eax
jne 0x415583
mov eax, dword [esp + 0x14]
test eax, eax
je 0x415583
sub eax, 2
je 0x415401
dec eax
je 0x4153ee
dec eax
je 0x4153e2
mov dword [0x43c300], 1
call ebx
mov dword [0x43e6f0], eax
jmp 0x415415
mov dword [0x43c300], 4
jmp 0x41540b
mov dword [0x43c300], 3
call ebx
mov dword [0x43e6f0], eax
jmp 0x415415
mov dword [0x43c300], 2
mov dword [0x43e6f0], 0
push 0x104
push 0
push 0x43e5e0
mov dword [esp + 0x18], 0x104
call fcn.0041a7b0
add esp, 0xc
lea eax, [esp + 0xc]
push eax
push 0x43e5e0
push 0
push 0
push str.TrackMemoryLogLocation
push dword [esp + 0x24]
call esi
test eax, eax
jne 0x415551
cmp byte [0x43e5e0], al
je 0x415462
cmp byte [0x43e5e1], al
jne 0x4154c6
push dword [esp + 0xc]
mov ecx, 0x41
lea edi, [esp + 0x34]
mov esi, 0x43e5e0
push 0
rep movsd dword es:[edi], dword [esi]
push 0x43e5e0
call fcn.0041a7b0
lea ecx, [esp + 0x3c]
add esp, 0xc
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415490
push 0
push 0
push 0x104
push 0x43e5e0
sub ecx, edx
lea eax, [esp + 0x40]
sar ecx, 1
push ecx
push eax
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x4367ac
push 0x104
push 0x43e5e0
call fcn.004198e7
add esp, 0xc
lea ecx, [esp + 0x18]
push 0x43e5e0
call fcn.0040a0e0
push 2
sub esp, 8
lea ecx, [esp + 0x24]
call fcn.004165c0
cmp eax, 0xffffffff
jne 0x415548
push 0
push 0x43e5e0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x415548
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x415548
push 0x43e5e0
push 0x103
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x415548
push dword [esp + 0xc]
push eax
push 0x43e5e0
call fcn.0041a7b0
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.0040a140
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x18]
push eax
push 0
push 0
push str.TrackMemoryFailSize
push dword [esp + 0x24]
call esi
test eax, eax
jne 0x415583
mov eax, dword [esp + 0x14]
test eax, eax
mov ecx, dword [0x43e6f8]
cmovne ecx, eax
mov dword [0x43e6f8], ecx
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [0x43c300]
cmp ecx, 1
je 0x41559d
cmp ecx, 3
jne 0x4155b3
cmp dword [0x43e6f0], 0
jne 0x4155b3
call ebx
mov ecx, dword [0x43c300]
mov dword [0x43e6f0], eax
xor eax, eax
cmp ecx, 1
mov ecx, dword [esp + 0x23c]
pop edi
pop esi
setge al
pop ebx
xor ecx, esp
call fcn.0041729b
mov esp, ebp
pop ebp
ret