Function at 0x409440
Capabilities:
Get session user name
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1018
call fcn.0041d300
mov eax, dword [0x42c008]
xor eax, esp
mov dword [esp + 0x1014], eax
push esi
push edi
mov ecx, 0x26
lea edi, [esp + 0xc30]
mov esi, str.SoftwareHewlett_PackardHP_OMEN_ControlProfilesCurrent_SettingsAdvanced_
lea eax, [esp + 0xcca]
rep movsd dword es:[edi], dword [esi]
push 0x34e
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.0040ce90
add esp, 0xc
lea eax, [esp + 0x430]
push 0x800
push 0
push eax
call fcn.0040ce90
add esp, 0xc
cmp dword [0x42d3bc], 0
je 0x4094d2
push str.ApplyOMENAdvancedCurrentSettingsRegistryToWMI___Start
lea eax, [esp + 0x434]
push 0x400
push eax
call fcn.00401120
add esp, 0xc
lea ecx, [esp + 0x430]
call fcn.004035d0
call fcn.00403c20
test eax, eax
je 0x409794
push 0x423938
lea eax, [esp + 0x22c]
push 0x104
push eax
call fcn.00401120
add esp, 0xc
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x40953b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x22c]
push eax
push str.GetUserName_fail__s__GetLastError__:_08X
lea eax, [esp + 0x43c]
push 0x400
push eax
call fcn.00401120
add esp, 0x14
jmp 0x40955d
lea eax, [esp + 0x228]
push eax
push str.GetUserName_pass__s
lea eax, [esp + 0x438]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x430]
call fcn.004035d0
lea eax, [esp + 0x10]
push eax
push 0x2001b
push 0
lea eax, [esp + 0xc3c]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
mov eax, dword [0x42d3bc]
test eax, eax
je 0x4095cb
push esi
lea eax, [esp + 0xc34]
push eax
push str.RegOpenKeyEx_HKEY_CURRENT_USER_szRegPath:_s_lRegResult:_08X_n
lea eax, [esp + 0x43c]
push 0x400
push eax
call fcn.00401120
add esp, 0x14
lea eax, [esp + 0x430]
push eax
call fcn.0040adb0
mov eax, dword [0x42d3bc]
add esp, 4
test esi, esi
jne 0x40976d
test eax, eax
je 0x4095fd
push str.lRegResult__ERROR_SUCCESS
lea eax, [esp + 0x434]
push 0x400
push eax
call fcn.00401120
add esp, 0xc
lea ecx, [esp + 0x430]
call fcn.004035d0
push str.Settings
lea eax, [esp + 0x24]
mov dword [esp + 0x10], 0
push 0x104
push eax
call fcn.00401120
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [esp + 0x20]
add esp, 0xc
push eax
push 0
lea eax, [esp + 0x20]
push eax
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x24]
call esi
test eax, eax
jne 0x40965b
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x24]
call esi
mov ecx, dword [esp + 0xc]
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x1c], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x1d], al
mov eax, ecx
shr eax, 8
mov byte [esp + 0x1f], cl
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1e], al
call fcn.004091e0
push str.SystemSettings
lea eax, [esp + 0x24]
mov dword [esp + 0x10], 0
push 0x104
push eax
call fcn.00401120
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0
lea eax, [esp + 0x20]
push eax
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x24]
call esi
test eax, eax
jne 0x4096df
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x24]
call esi
mov eax, dword [esp + 0xc]
shr eax, 0x18
test al, 1
je 0x4096f1
mov ecx, 1
jmp 0x4096f3
xor ecx, ecx
call fcn.00409f60
push str.ThermalControl
lea eax, [esp + 0x24]
mov dword [esp + 0x10], 0
push 0x104
push eax
call fcn.00401120
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0
lea eax, [esp + 0x20]
push eax
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x24]
call esi
test eax, eax
jne 0x409750
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x24]
call esi
mov ecx, dword [esp + 0xc]
call fcn.00409df0
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], 0
jmp 0x409794
push esi
push str.RegOpenKeyEx_fail_lRegResult:_08X
lea eax, [esp + 0x438]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x430]
call fcn.004035d0
call fcn.004040b0
cmp dword [0x42d3bc], 0
je 0x4097d0
lea eax, [esp + 0x228]
push eax
push str.ApplyOMENAdvancedCurrentSettingsRegistryToWMI_return___end
lea eax, [esp + 0x438]
push 0x400
push eax
call fcn.00401120
add esp, 0x10
lea ecx, [esp + 0x430]
call fcn.004035d0
mov ecx, dword [esp + 0x101c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0040aea4
mov esp, ebp
pop ebp
ret