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

Disassembly:
push 0xffffffffffffffff
push 0x42f531
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x43e0a0]
xor eax, esp
mov dword [esp + 0x17c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43e0a0]
xor eax, esp
push eax
lea eax, [esp + 0x194]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1a4]
mov dword [esp + 0x20], eax
call fcn.00411dde
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x402e92
push 0x80004005
call fcn.004042b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
push 0x11c
lea ecx, [esp + 0x28]
push ebx
push ecx
mov dword [esp + 0x1a8], ebx
call fcn.004193c0
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x28], 0x11c
call esi
mov edi, eax
cmp edi, ebx
jne 0x402f18
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x28], 0x114
call esi
cmp eax, ebx
jne 0x402f18
lea eax, [ebp - 0x10]
mov dword [esp + 0x19c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402f11
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x403302
mov eax, dword [esp + 0x34]
sub eax, ebx
je 0x4032ac
sub eax, 1
je 0x40321c
sub eax, 1
je 0x402f3e
push 9
push str.UnKnow_OS
jmp 0x4032b3
mov ebp, 4
cmp dword [esp + 0x28], ebp
ja 0x402f57
push str.Microsoft_Windows_NT
lea ecx, [esp + 0x18]
call fcn.004049c0
mov esi, 5
cmp dword [esp + 0x28], esi
jne 0x402fbf
cmp dword [esp + 0x2c], ebx
jne 0x402f7c
push str.Microsoft_Windows_2000
lea ecx, [esp + 0x18]
call fcn.004049c0
cmp dword [esp + 0x28], esi
jne 0x402fbf
cmp dword [esp + 0x2c], 1
jne 0x402f97
push str.Microsoft_Windows_XP
lea ecx, [esp + 0x18]
call fcn.004049c0
cmp dword [esp + 0x28], esi
jne 0x402fbf
cmp dword [esp + 0x2c], 2
jne 0x402ffd
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
lea ecx, [esp + 0x14]
je 0x402fb5
push str.Microsoft_Windows_2003_RC2
jmp 0x402fba
push str.Microsoft_Windows_2003
call fcn.004049c0
cmp dword [esp + 0x28], 6
jne 0x402ffd
mov eax, dword [esp + 0x2c]
cmp eax, ebx
jne 0x402fea
cmp byte [esp + 0x13e], 1
lea ecx, [esp + 0x14]
jne 0x402fe3
push str.Microsoft_Windows_Vista
jmp 0x402ff8
push str.Microsoft_Windows_2008
jmp 0x402ff8
cmp eax, 1
jne 0x402ffd
push str.Windows_7
lea ecx, [esp + 0x18]
call fcn.004049c0
cmp edi, ebx
je 0x403040
cmp byte [esp + 0x13e], 3
jne 0x4030f7
mov al, byte [esp + 0x13c]
test al, al
jns 0x403024
push str.DataCenter_Server
jmp 0x4030ee
test al, 2
lea ecx, [esp + 0x14]
je 0x403036
push str.Advanced_Server
jmp 0x4030f2
push str.Server
jmp 0x4030f2
lea ecx, [esp + 0x18]
push ecx
push 1
push ebx
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x144]
push eax
push ebx
push ebx
push str.ProductType
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea eax, [esp + 0x140]
push eax
push str.WINNT
mov dword [esp + 0x20], ebx
call esi
test eax, eax
jne 0x4030b5
push str.Professional
lea ecx, [esp + 0x18]
call fcn.00403db0
lea ecx, [esp + 0x140]
push ecx
push str.LANMANNT
call esi
test eax, eax
jne 0x4030d6
push str.Server
lea ecx, [esp + 0x18]
call fcn.00403db0
lea edx, [esp + 0x140]
push edx
push str.SERVERNT
call esi
test eax, eax
jne 0x4030f7
push str.Advanced_Server
lea ecx, [esp + 0x18]
call fcn.00403db0
cmp dword [esp + 0x28], ebp
ja 0x40318a
call fcn.00411dde
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40311b
push 0x80004005
call fcn.004042b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x19c], 1
movzx ecx, word [esp + 0x30]
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x3c]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
lea eax, [esp + 0x2c]
push str._s_version__d._d__s__Build__u__n
push eax
call fcn.00404b00
add esp, 0x1c
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.004048a0
mov byte [esp + 0x19c], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x403207
call fcn.00411dde
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4031a4
push 0x80004005
call fcn.004042b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x19c], 2
movzx ecx, word [esp + 0x30]
mov eax, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x3c]
push edx
push eax
lea ecx, [esp + 0x24]
push str._s__s__Build__u__n
push ecx
call fcn.00404b00
add esp, 0x14
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
call fcn.004048a0
mov byte [esp + 0x19c], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4032bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4032bc
mov ebp, 4
cmp dword [esp + 0x28], ebp
jne 0x4032bc
cmp dword [esp + 0x2c], ebx
jne 0x403264
push str.Microsoft_Windows_95
lea ecx, [esp + 0x18]
call fcn.004049c0
mov ax, word [esp + 0x3a]
cmp ax, 0x43
je 0x403250
cmp ax, 0x42
jne 0x40325e
push str.OSR2
lea ecx, [esp + 0x18]
call fcn.00403db0
cmp dword [esp + 0x28], ebp
jne 0x4032bc
cmp dword [esp + 0x2c], 0xa
jne 0x403295
push str.Microsoft_Windows_98
lea ecx, [esp + 0x18]
call fcn.004049c0
cmp word [esp + 0x3a], 0x41
jne 0x40328f
push 0x436788
lea ecx, [esp + 0x18]
call fcn.00403db0
cmp dword [esp + 0x28], ebp
jne 0x4032bc
cmp dword [esp + 0x2c], 0x5a
jne 0x4032bc
push str.Microsoft_Windows_Me
lea ecx, [esp + 0x18]
call fcn.004049c0
jmp 0x4032bc
push 0x11
push str.Microsoft_Win32s
lea ecx, [esp + 0x1c]
call fcn.00404920
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
push esi
push 0x3fa
call fcn.0040b47c
mov ecx, eax
call fcn.0040b575
lea eax, [esi - 0x10]
mov dword [esp + 0x19c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4032fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x194]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x17c]
xor ecx, esp
call fcn.00416863
add esp, 0x18c
ret 4