Function at 0x40d490
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
push edi
mov eax, 0x439c
push esi
push ebx
call fcn.005e3260
xor ebp, ebp
sub esp, eax
mov ebx, ecx
mov dword [esp + 4], str.State::getsysinfo_fast_n
mov dword [esp], 0x849160
call fcn.0041f830
mov dword [esp + 4], str.State::getsysinfo_fast::GetSystemPowerStatus_n
mov dword [esp], 0x849160
call fcn.0041f830
lea eax, [ebx + 0x80c]
mov dword [esp], 0xc
mov ecx, eax
mov dword [esp + 0x2c], eax
call fcn.00403230
mov dword [ebx + 0x134], eax
add eax, dword [ebx + 0x828]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetSystemPowerStatus]
sub esp, 4
lea esi, [esp + 0x48]
mov dword [esp + 4], str.State::getsysinfo_fast::Monitors_n
mov dword [esp], 0x849160
call fcn.0041f830
mov edi, esi
mov ecx, 0xd2
xor eax, eax
rep stosd dword es:[edi], eax
xor edi, edi
mov dword [esp + 0x48], 0x348
mov word [esp + 0x390], di
lea edi, [esp + 0x44]
jmp 0x40d59a
lea eax, [esp + 0x2390]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
lea eax, [esp + 0x4c]
mov dword [esp], eax
call fcn.0040d050
mov eax, dword [esp + 0x44]
test eax, eax
je 0x40d597
mov edx, dword [esp + 0x2390]
test edx, edx
je 0x40d597
movzx ecx, word [esp + 0x390]
mov word [esp + ecx*4 + 0x392], ax
movzx eax, word [esp + 0x390]
mov word [esp + eax*4 + 0x394], dx
add word [esp + 0x390], 1
add ebp, 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], ebp
mov dword [esp], 0
call dword [sym.imp.USER32.dll_EnumDisplayDevicesW]
sub esp, 0x10
test eax, eax
jne 0x40d540
movzx eax, word [esp + 0x390]
mov ecx, dword [esp + 0x2c]
lea esi, [esp + 0x390]
mov dword [esp], esi
lea eax, [eax*4 + 2]
mov dword [esp + 4], eax
call fcn.00402de0
sub esp, 8
mov dword [ebx + 0x130], eax
mov dword [esp + 4], str.State::getsysinfo_fast::Windows_n
mov dword [esp], 0x849160
call fcn.0041f830
mov dword [ebx], 0x11c
mov dword [esp], ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
call edi
sub esp, 4
test eax, eax
je 0x40d970
mov dword [esp + 4], str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov dword [esp], esi
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [esp + 0x3c]
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 0x80000002
mov dword [esp + 0x10], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x40d8d1
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebx + 0xc]
sub esp, 4
mov dword [esp + 4], str.Windows_v_d._d._d_n
mov dword [esp], 0x849160
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 4]
mov dword [esp + 8], eax
call fcn.0041f5d0
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [esp + 4], str.State::getsysinfo_fast::Environment_n
mov dword [ebx + 0x11c], eax
mov dword [esp], 0x849160
call fcn.0041f830
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], esi
mov dword [esp], str.windir
call ebp
sub esp, 0xc
mov dword [esp + 4], str.inf_
mov dword [esp], esi
call sub.msvcrt.dll_wcscat
mov ecx, dword [esp + 0x2c]
mov dword [esp], esi
call fcn.00402c30
sub esp, 4
mov dword [ebx + 0x138], eax
mov ecx, 0x800
lea edi, [esp + 0x2390]
xor eax, eax
rep stosd dword es:[edi], eax
lea edi, [esp + 0x2390]
mov dword [esp + 8], 0x1000
mov dword [esp], 0x72fa3c
mov dword [esp + 4], edi
call ebp
sub esp, 0xc
mov dword [esp + 4], 0x72fa54
mov dword [esp], edi
call sub.msvcrt.dll_wcscat
mov dword [esp + 8], 0x1000
mov dword [esp + 4], esi
mov dword [esp], 0x72fa60
call ebp
sub esp, 0xc
mov dword [esp], esi
call sub.msvcrt.dll_wcslen
test eax, eax
je 0x40d8c0
mov ecx, dword [esp + 0x2c]
mov dword [esp], esi
call fcn.00402c30
sub esp, 4
mov dword [ebx + 0x13c], eax
mov dword [esp + 4], str.State::getsysinfo_fast::Architecture_n
mov dword [esp], 0x849160
call fcn.0041f830
xor edx, edx
mov dword [ebx + 0x120], 0
mov dword [esp + 8], 0x1000
mov word [esp + 0x390], dx
mov dword [esp + 4], esi
mov dword [esp], str.PROCESSOR_ARCHITECTURE
call ebp
sub esp, 0xc
mov dword [esp + 4], str.AMD64
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x40d7dc
mov dword [ebx + 0x120], 1
xor eax, eax
mov dword [esp + 8], 0x1000
mov dword [esp + 4], esi
mov word [esp + 0x390], ax
mov dword [esp], str.PROCESSOR_ARCHITEW6432
call ebp
sub esp, 0xc
cmp word [esp + 0x390], 0
je 0x40d813
mov dword [ebx + 0x120], 1
mov eax, dword [0x8671d0]
cmp eax, 0x20
jne 0x40d82c
mov dword [ebx + 0x120], 0
mov eax, dword [0x8671d0]
cmp eax, 0x40
jne 0x40d83b
mov dword [ebx + 0x120], 1
mov eax, dword [0x8671cc]
test eax, eax
je 0x40d88e
sub eax, 0x3e8
cmp eax, 0x10
ja 0x40d8a0
lea eax, [eax + eax*2]
mov edx, 0x66666667
shl eax, 2
mov ecx, dword [eax + 0x730060]
movzx esi, byte [eax + 0x730064]
mov eax, ecx
imul edx
mov eax, ecx
sar eax, 0x1f
sar edx, 2
sub edx, eax
lea eax, [edx + edx*4]
mov dword [ebx + 4], edx
add eax, eax
sub ecx, eax
mov eax, esi
test al, al
mov dword [ebx + 8], ecx
je 0x40d8ae
mov byte [ebx + 0x11a], 3
add esp, 0x439c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0xffffffff
mov byte [ebx + 0x11a], 1
add esp, 0x439c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll_wcscpy
jmp 0x40d765
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0x104
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.CurrentBuild
mov dword [esp + 0x14], eax
lea eax, [esp + 0x2390]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
sub esp, 0x18
lea eax, [esp + 0x44]
mov dword [esp + 8], 0xa
mov dword [esp + 4], eax
lea eax, [esp + 0x2390]
mov dword [esp], eax
call sub.msvcrt.dll_wcstoul
cmp eax, 0x55ef
jbe 0x40d662
mov ecx, dword [0x8671ac]
test ecx, ecx
je 0x40d662
mov dword [ebx + 0xc], eax
mov dword [ebx + 4], 0xb
mov dword [ebx + 8], 0
mov dword [0x8671cc], 0x3f7
jmp 0x40d662
mov dword [ebx], 0x114
mov dword [esp], ebx
call edi
sub esp, 4
test eax, eax
jne 0x40d61d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.GetVersionEx__
mov dword [esp], eax
mov ecx, 0x849160
call fcn.0041f8f0
sub esp, 8
jmp 0x40d61d