Function at 0x411e70
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x425bd1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5e8
mov eax, dword [0x42f180]
mov dword [esp + 0x5e0], eax
xor eax, eax
push ebx
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], eax
push esi
push edi
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov ecx, 0x47
lea edi, [esp + 0xc8]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea ecx, [esp + 0xc8]
push ecx
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], 0x11c
call edi
mov esi, eax
cmp esi, ebx
jne 0x411f43
lea edx, [esp + 0xc8]
push edx
mov dword [esp + 0xcc], 0x114
call edi
test eax, eax
jne 0x411f43
mov esi, dword [ebp + 8]
push 0x427740
mov ecx, esi
call fcn.0040da00
jmp 0x412a5e
push 0x427740
lea ecx, [esp + 0x14]
call fcn.0040da00
mov eax, dword [esp + 0xd8]
sub eax, ebx
mov dword [esp + 0x5fc], ebx
je 0x4129d8
dec eax
je 0x41285f
dec eax
jne 0x412a1d
mov eax, dword [esp + 0xcc]
cmp eax, 6
mov edi, 9
jne 0x411ff5
cmp dword [esp + 0xd0], ebx
jne 0x41215b
cmp byte [esp + 0x1e2], 1
jne 0x411fc6
push str.Microsoft_Windows_Vista
lea ecx, [esp + 0x68]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 1
call fcn.0040a2d0
lea ecx, [esp + 0x64]
jmp 0x41214f
push str.Windows_Server_Longhorn
lea ecx, [esp + 0x94]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 2
call fcn.0040a2d0
lea ecx, [esp + 0x90]
jmp 0x41214f
cmp eax, 5
jne 0x412126
mov eax, dword [esp + 0xd0]
cmp eax, 2
jne 0x4120d1
push str.GetNativeSystemInfo
push 0x429118
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x412033
lea ecx, [esp + 0xa4]
push ecx
call eax
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x412068
push str.Microsoft_Windows_Server_2003_R2
lea ecx, [esp + 0x70]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 3
call fcn.0040a2d0
lea ecx, [esp + 0x6c]
jmp 0x41214f
cmp byte [esp + 0x1e2], 1
jne 0x4120a5
cmp word [esp + 0xa4], di
jne 0x4120a5
push str.Microsoft_Windows_XP_Professional_x64_Edition
lea ecx, [esp + 0x30]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 4
call fcn.0040a2d0
lea ecx, [esp + 0x2c]
jmp 0x41214f
push str.Microsoft_Windows_Server_2003_
lea ecx, [esp + 0x9c]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 5
call fcn.0040a2d0
lea ecx, [esp + 0x98]
jmp 0x41214f
cmp eax, 1
jne 0x4120fc
push str.Microsoft_Windows_XP
lea ecx, [esp + 0x38]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 6
call fcn.0040a2d0
lea ecx, [esp + 0x34]
jmp 0x41214f
cmp eax, ebx
jne 0x41215b
push str.Microsoft_Windows_2000
lea ecx, [esp + 0x78]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 7
call fcn.0040a2d0
lea ecx, [esp + 0x74]
jmp 0x41214f
cmp eax, 4
ja 0x41215b
push str.Microsoft_Windows_NT
lea ecx, [esp + 0x40]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 8
call fcn.0040a2d0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x5fc], bl
call fcn.00402430
cmp esi, ebx
je 0x4125d8
mov al, byte [esp + 0x1e2]
cmp al, 1
jne 0x41223e
cmp word [esp + 0xa4], di
je 0x412744
cmp dword [esp + 0xcc], 4
jne 0x4121c5
push str.Workstation_4.0
lea ecx, [esp + 0x98]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 9
call fcn.0040bed0
lea ecx, [esp + 0x94]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
mov eax, dword [esp + 0x1e0]
test ah, 2
je 0x412206
push str.Home_Edition
lea ecx, [esp + 0x48]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0xa
call fcn.0040bed0
lea ecx, [esp + 0x44]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
push str.Professional
lea ecx, [esp + 0x80]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0xb
call fcn.0040bed0
lea ecx, [esp + 0x7c]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
cmp al, 3
je 0x41224a
cmp al, 2
jne 0x412744
cmp dword [esp + 0xcc], 5
jne 0x412564
mov eax, dword [esp + 0xd0]
cmp eax, 2
jne 0x4124ae
mov eax, dword [esp + 0xa4]
cmp ax, 6
jne 0x4122fc
mov al, byte [esp + 0x1e0]
test al, al
jns 0x4122b9
push str.Datacenter_Edition_for_Itanium_based_Systems
lea ecx, [esp + 0x50]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0xc
call fcn.0040bed0
lea ecx, [esp + 0x4c]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
test al, 2
je 0x412802
push str.Enterprise_Edition_for_Itanium_based_Systems
lea ecx, [esp + 0xa4]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0xd
call fcn.0040bed0
lea ecx, [esp + 0xa0]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
cmp ax, di
jne 0x4123b9
mov al, byte [esp + 0x1e0]
test al, al
jns 0x412345
push str.Datacenter_x64_Edition
lea ecx, [esp + 0x58]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0xe
call fcn.0040bed0
lea ecx, [esp + 0x54]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
test al, 2
je 0x412384
push str.Enterprise_x64_Edition
lea ecx, [esp + 0x88]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0xf
call fcn.0040bed0
lea ecx, [esp + 0x84]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
push str.Standard_x64_Edition
lea ecx, [esp + 0x60]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x10
call fcn.0040bed0
lea ecx, [esp + 0x5c]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
mov eax, dword [esp + 0x1e0]
test al, al
jns 0x4123ff
push str.Datacenter_Edition
lea ecx, [esp + 0xa0]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x11
call fcn.0040bed0
lea ecx, [esp + 0x9c]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
test al, 2
je 0x412438
push str.Enterprise_Edition
lea ecx, [esp + 0x24]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x12
call fcn.0040bed0
lea ecx, [esp + 0x20]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
cmp ax, 0x400
jne 0x412479
push str.Web_Edition
lea ecx, [esp + 0x90]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x13
call fcn.0040bed0
lea ecx, [esp + 0x8c]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
push str.Standard_Edition
lea ecx, [esp + 0x28]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x14
call fcn.0040bed0
lea ecx, [esp + 0x24]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
cmp eax, ebx
jne 0x412564
mov al, byte [esp + 0x1e0]
test al, al
jns 0x4124f6
push str.Datacenter_Server
lea ecx, [esp + 0x2c]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x15
call fcn.0040bed0
lea ecx, [esp + 0x28]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
test al, 2
je 0x41252f
push str.Advanced_Server
lea ecx, [esp + 0x34]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x16
call fcn.0040bed0
lea ecx, [esp + 0x30]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
push str.Server
lea ecx, [esp + 0x3c]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x17
call fcn.0040bed0
lea ecx, [esp + 0x38]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
test byte [esp + 0x1e0], 2
je 0x4125a3
push str.Server_4.0__Enterprise_Edition
lea ecx, [esp + 0x44]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x18
call fcn.0040bed0
lea ecx, [esp + 0x40]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
push str.Server_4.0
lea ecx, [esp + 0x4c]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x19
call fcn.0040bed0
lea ecx, [esp + 0x48]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412744
lea edx, [esp + 0x18]
push edx
push 1
push ebx
push str.SYSTEMCurrentControlSetControlProductOptions
mov esi, 0xff
push 0x80000002
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x412842
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x3ec]
push ecx
push ebx
push ebx
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
jne 0x412842
cmp dword [esp + 0x14], esi
ja 0x412842
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea ecx, [esp + 0x3e8]
push ecx
push str.WINNT
call esi
test eax, eax
jne 0x412688
push str.Workstation
lea ecx, [esp + 0x54]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x1a
call fcn.0040a2d0
lea ecx, [esp + 0x50]
mov byte [esp + 0x5fc], bl
call fcn.00402430
lea edx, [esp + 0x3e8]
push edx
push str.LANMANNT
call esi
test eax, eax
jne 0x4126cb
push str.Server
lea ecx, [esp + 0x5c]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x1b
call fcn.0040bed0
lea ecx, [esp + 0x58]
mov byte [esp + 0x5fc], bl
call fcn.00402430
lea eax, [esp + 0x3e8]
push eax
push str.SERVERNT
call esi
test eax, eax
jne 0x41270e
push str.Advanced_Server
lea ecx, [esp + 0x64]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x1c
call fcn.0040bed0
lea ecx, [esp + 0x60]
mov byte [esp + 0x5fc], bl
call fcn.00402430
mov ecx, dword [esp + 0xd0]
mov edx, dword [esp + 0xcc]
push ecx
push edx
lea eax, [esp + 0x1f0]
push str._d._d
push eax
call fcn.0041ab14
add esp, 0x10
lea ecx, [esp + 0x1e8]
push ecx
lea ecx, [esp + 0x14]
call fcn.0040bef0
cmp dword [esp + 0xcc], 4
jne 0x412802
push str.Service_Pack_6
lea edx, [esp + 0xe0]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x412802
lea eax, [esp + 0x14]
push eax
push 1
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0x14]
push ecx
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0xd4]
and edx, 0xffff
cmp edi, ebx
push edx
jne 0x4127cf
lea eax, [esp + 0x1ec]
push str.Service_Pack_6a__Build__d_
push eax
call fcn.0041ab14
add esp, 0xc
lea ecx, [esp + 0x1e8]
push ecx
lea ecx, [esp + 0x14]
call fcn.0040bef0
jmp 0x412a1d
lea eax, [esp + 0xe0]
push eax
lea ecx, [esp + 0x1f0]
push str._s__Build__d_
push ecx
call fcn.0041ab14
add esp, 0x10
lea edx, [esp + 0x1e8]
push edx
lea ecx, [esp + 0x14]
call fcn.0040bef0
jmp 0x412a1d
mov eax, dword [esp + 0xd4]
and eax, 0xffff
push eax
lea ecx, [esp + 0xe0]
push ecx
lea edx, [esp + 0x1f0]
push str._s__Build__d_
push edx
call fcn.0041ab14
add esp, 0x10
lea eax, [esp + 0x1e8]
push eax
lea ecx, [esp + 0x14]
call fcn.0040bef0
jmp 0x412a1d
mov esi, dword [ebp + 8]
push 0x427740
mov ecx, esi
call fcn.0040da00
lea ecx, [esp + 0x10]
call fcn.00402430
jmp 0x412a5e
mov eax, dword [esp + 0xcc]
mov edi, 4
cmp eax, edi
jne 0x412a1d
cmp dword [esp + 0xd0], ebx
jne 0x412901
push str.Microsoft_Windows_95
lea ecx, [esp + 0x6c]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x1d
call fcn.0040a2d0
lea ecx, [esp + 0x68]
mov byte [esp + 0x5fc], bl
call fcn.00402430
mov ax, word [esp + 0xde]
cmp ax, 0x43
je 0x4128c4
cmp ax, 0x42
jne 0x4128f4
push str.OSR2
lea ecx, [esp + 0x74]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x1e
call fcn.0040bed0
lea ecx, [esp + 0x70]
mov byte [esp + 0x5fc], bl
call fcn.00402430
cmp dword [esp + 0xcc], edi
jne 0x412a1d
cmp dword [esp + 0xd0], 0xa
jne 0x412996
push str.Microsoft_Windows_98
lea ecx, [esp + 0x7c]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x1f
call fcn.0040a2d0
lea ecx, [esp + 0x78]
mov byte [esp + 0x5fc], bl
call fcn.00402430
mov ax, word [esp + 0xde]
cmp ax, 0x41
je 0x412953
cmp ax, 0x42
jne 0x412989
push 0x428ce0
lea ecx, [esp + 0x84]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x20
call fcn.0040bed0
lea ecx, [esp + 0x80]
mov byte [esp + 0x5fc], bl
call fcn.00402430
cmp dword [esp + 0xcc], edi
jne 0x412a1d
cmp dword [esp + 0xd0], 0x5a
jne 0x412a1d
push str.Microsoft_Windows_Millennium_Edition
lea ecx, [esp + 0x8c]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x21
call fcn.0040a2d0
lea ecx, [esp + 0x88]
mov byte [esp + 0x5fc], bl
call fcn.00402430
jmp 0x412a1d
push str.Microsoft_Win32s
lea ecx, [esp + 0x20]
call fcn.0040bdf0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x600], 0x22
call fcn.0040a2d0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x5fc], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412a1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
push eax
call fcn.00407f70
mov esi, dword [ebp + 8]
add eax, 0x10
mov dword [esi], eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add esp, 4
mov dword [esp + 0x5fc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412a5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x5f4]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x5ec]
mov eax, esi
call fcn.00419d15
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret