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

Disassembly:
push 0xffffffffffffffff
push 0x43bb97
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1bc
push ebx
push ebp
push esi
push edi
push 0x452ac0
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c], 0
call fcn.00431a55
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0x30]
mov ebp, 1
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x1d8], ebp
mov dword [esp + 0x34], 0x9c
call edi
mov esi, eax
test esi, esi
jne 0x4078aa
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], 0x94
push ecx
call edi
test eax, eax
jne 0x4078aa
push str.Unknown
lea ecx, [esp + 0x14]
call fcn.00431b70
mov eax, dword [esp + 0x40]
dec eax
je 0x407bf9
dec eax
jne 0x407c81
cmp dword [esp + 0x34], 4
ja 0x4078d1
push str.Microsoft_Windows_NT
lea ecx, [esp + 0x14]
call fcn.00431b70
mov eax, dword [esp + 0x34]
mov edi, 5
cmp eax, edi
jne 0x4078f4
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x4078f4
push str.Microsoft_Windows_2000
lea ecx, [esp + 0x14]
call fcn.00431b70
test esi, esi
mov ebx, 2
je 0x4079b0
mov al, byte [esp + 0xca]
cmp al, 1
jne 0x407946
cmp dword [esp + 0x34], edi
jne 0x407926
cmp dword [esp + 0x38], ebp
jne 0x407926
push str.Microsoft_Windows_XP
lea ecx, [esp + 0x14]
call fcn.00431b70
mov eax, dword [esp + 0xc8]
test ah, 2
je 0x40793c
push str.Home_Edition
jmp 0x407a8f
push str.Professional
jmp 0x407a8f
cmp al, 3
jne 0x407a98
cmp dword [esp + 0x34], edi
jne 0x407968
cmp dword [esp + 0x38], ebx
jne 0x407968
push str.Microsoft_Windows_.NET
lea ecx, [esp + 0x14]
call fcn.00431b70
mov eax, dword [esp + 0xc8]
test al, 0x80
je 0x40797d
push str.DataCenter_Server
jmp 0x407a8f
test bl, al
je 0x407996
cmp dword [esp + 0x34], 4
je 0x407a8a
push str.Enterprise_Server
jmp 0x407a8f
cmp ax, 0x400
jne 0x4079a6
push str.Web_Server
jmp 0x407a8f
push str.Server
jmp 0x407a8f
lea edx, [esp + 0x1c]
mov esi, pe_nt_image_headers32
push edx
push ebp
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4079f1
mov esi, dword [esp + 0x1dc]
push str.Unknown
mov ecx, esi
call fcn.00431a55
mov dword [esp + 0x18], ebp
jmp 0x407c98
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
lea ecx, [esp + 0xcc]
push eax
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407be1
cmp dword [esp + 0x14], esi
ja 0x407be1
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0xcc]
push ecx
push str.WINNT
call esi
test eax, eax
jne 0x407a56
push str.Professional
lea ecx, [esp + 0x14]
call fcn.00431dc3
lea edx, [esp + 0xcc]
push edx
push str.LANMANNT
call esi
test eax, eax
jne 0x407a77
push str.Server
lea ecx, [esp + 0x14]
call fcn.00431dc3
lea eax, [esp + 0xcc]
push eax
push str.SERVERNT
call esi
test eax, eax
jne 0x407a98
push str.Advanced_Server
lea ecx, [esp + 0x14]
call fcn.00431dc3
mov eax, dword [esp + 0x34]
mov ecx, dword [0x44ed90]
cmp eax, 4
ja 0x407b48
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x44]
push edx
push ecx
push eax
lea edx, [esp + 0x20]
push str._d._d__s_n
push edx
mov byte [esp + 0x1e8], bl
call fcn.0042ca77
add esp, 0x14
lea eax, [esp + 0x10]
lea ecx, [esp + 0x28]
push 0x44d8f0
push eax
push ecx
call fcn.00431c7c
lea edx, [esp + 0x14]
mov byte [esp + 0x1d4], 3
push edx
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00431c16
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x1d8], 4
call fcn.00431b20
lea ecx, [esp + 0x20]
mov byte [esp + 0x1d4], 3
call fcn.004319e7
lea ecx, [esp + 0x28]
mov byte [esp + 0x1d4], bl
call fcn.004319e7
lea ecx, [esp + 0x14]
mov byte [esp + 0x1d4], 1
call fcn.004319e7
jmp 0x407c81
mov dword [esp + 0x14], ecx
lea edx, [esp + 0x44]
lea eax, [esp + 0x14]
push edx
push 0x44d8ec
push eax
mov byte [esp + 0x1e0], 5
call fcn.0042ca77
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x24]
push 0x44d8f0
push ecx
push edx
call fcn.00431c7c
lea ecx, [esp + 0x14]
lea edx, [esp + 0x2c]
push ecx
mov bl, 6
push eax
push edx
mov byte [esp + 0x1e0], bl
call fcn.00431c16
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x1d8], 7
call fcn.00431b20
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1d4], bl
call fcn.004319e7
lea ecx, [esp + 0x24]
mov byte [esp + 0x1d4], 5
call fcn.004319e7
lea ecx, [esp + 0x14]
mov byte [esp + 0x1d4], 1
call fcn.004319e7
jmp 0x407c81
mov esi, dword [esp + 0x1dc]
push str.Unknown
mov ecx, esi
call fcn.00431a55
jmp 0x407c94
mov eax, dword [esp + 0x34]
mov esi, 4
cmp eax, esi
jne 0x407c81
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x407c3c
push str.Microsoft_Windows_95
lea ecx, [esp + 0x14]
call fcn.00431b70
mov al, byte [esp + 0x45]
cmp al, 0x43
je 0x407c28
cmp al, 0x42
jne 0x407c36
push str.OSR2
lea ecx, [esp + 0x14]
call fcn.00431dc3
cmp dword [esp + 0x34], esi
jne 0x407c81
cmp dword [esp + 0x38], 0xa
jne 0x407c6c
push str.Microsoft_Windows_98
lea ecx, [esp + 0x14]
call fcn.00431b70
cmp byte [esp + 0x45], 0x41
jne 0x407c66
push 0x44d8b0
lea ecx, [esp + 0x14]
call fcn.00431dc3
cmp dword [esp + 0x34], esi
jne 0x407c81
cmp dword [esp + 0x38], 0x5a
jne 0x407c81
push str.Microsoft_Windows_Millennium_Edition
lea ecx, [esp + 0x14]
call fcn.00431b70
mov esi, dword [esp + 0x1dc]
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.0043175c
mov dword [esp + 0x18], ebp
lea ecx, [esp + 0x10]
mov byte [esp + 0x1d4], 0
call fcn.004319e7
mov ecx, dword [esp + 0x1cc]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c8
ret 4