Function at 0x40b770
Capabilities:
Check os version
Get system information on windows

Disassembly:
push 0x48
mov eax, 0x44d2f0
call fcn.00436c36
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
test byte [0x4b20e4], 1
jne 0x40b7ba
or dword [0x4b20e4], 1
mov edi, 0x4b20e0
push 0x4912d0
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.004015ca
push 0x476451
call fcn.0043288d
pop ecx
mov byte [ebp - 4], 0
jmp 0x40b7bf
mov edi, 0x4b20e0
push 0x4912d0
mov ecx, edi
call fcn.00406c2c
test eax, eax
je 0x40b7dd
mov ecx, dword [ebp + 0xc]
push edi
call fcn.004017a3
jmp 0x40baf1
xor eax, eax
mov dword [ebp - 0x30], vtable.CRegistry.0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 2
call fcn.0041c12a
push eax
lea ecx, [ebp - 0x14]
call fcn.0040177e
mov ebx, reloc.OLEAUT32.dll_SysReAllocString
push ebx
push ecx
mov byte [ebp - 4], 3
mov ecx, esp
mov dword [ebp - 0x18], esp
mov esi, str.SoftwareMicrosoftWindowsCurrentVersion
push esi
call fcn.004015ca
lea eax, [ebp - 0x30]
push eax
call fcn.0040eae6
test al, al
je 0x40b892
push ebx
lea eax, [ebp - 0x14]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push str.Version
call fcn.004015ca
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push esi
mov byte [ebp - 4], 4
call fcn.004015ca
lea eax, [ebp - 0x30]
push eax
mov byte [ebp - 4], 3
call fcn.0040e87d
push 0x4956fc
lea esi, [ebp - 0x14]
call fcn.004069a0
cmp eax, 0xffffffff
je 0x40b892
mov ecx, dword [ebp + 0xc]
push str.Windows_98
call fcn.004015ca
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00401109
lea ecx, [ebp - 0x30]
call fcn.0040e76b
jmp 0x40baf1
push 0x24
lea eax, [ebp - 0x54]
push 0
push eax
call fcn.00432ca0
mov esi, 0x11c
push esi
call fcn.00414792
mov ebx, dword [ebp + 8]
add esp, 0x10
push esi
push 0
push eax
mov dword [ebx], eax
call fcn.00432ca0
mov eax, dword [ebx]
add esp, 0xc
mov dword [eax], esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40b8e1
push dword [ebx]
call fcn.004147c2
pop ecx
push edi
mov ecx, dword [ebp + 0xc]
call fcn.004017a3
jmp 0x40b87a
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40b908
push str.GetNativeSystemInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40b908
lea ecx, [ebp - 0x54]
push ecx
call eax
jmp 0x40b912
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x10]
push 2
pop edx
cmp ecx, edx
jne 0x40ba7e
mov cl, byte [eax + 0x11a]
cmp cl, 1
jne 0x40b9cb
mov ecx, dword [eax + 4]
cmp ecx, 6
jne 0x40b965
mov eax, dword [eax + 8]
test eax, eax
je 0x40b9e6
cmp eax, 1
jne 0x40b953
push str.Windows_7
jmp 0x40b9eb
cmp eax, edx
jne 0x40ba69
push str.Windows_8
jmp 0x40b9eb
cmp ecx, 5
jne 0x40b9c1
mov eax, dword [eax + 8]
cmp eax, edx
jne 0x40b97b
push str.Windows_XP_64_bit
jmp 0x40baa3
cmp eax, 1
jne 0x40b9af
push str.Windows_XP
mov ecx, edi
call fcn.0040189e
mov eax, dword [ebx]
test word [eax + 0x118], 0x200
mov ecx, edi
je 0x40b9a5
push str._Home_Edition
jmp 0x40ba77
push str._Professional_Edition
jmp 0x40ba77
test eax, eax
jne 0x40baaa
push str.Windows_2000
jmp 0x40baa3
push str.Windows_NT_4.0
jmp 0x40baa3
cmp cl, 3
jne 0x40baaa
mov ecx, dword [eax + 4]
cmp ecx, 6
jb 0x40b9f4
cmp dword [eax + 8], 0
jne 0x40ba69
push str.Windows_Vista
mov ecx, edi
call fcn.0040189e
jmp 0x40ba69
cmp ecx, 5
mov ecx, edi
jb 0x40ba53
cmp dword [eax + 8], edx
jne 0x40ba07
push str.Windows_.Net
jmp 0x40ba0c
push str.Windows_2000
call fcn.0040189e
mov ebx, dword [ebx]
movzx eax, word [ebx + 0x118]
test al, al
jns 0x40ba25
push str._DataCenter_Server
jmp 0x40ba62
test al, 2
mov ecx, edi
je 0x40ba3f
cmp dword [ebx + 4], 4
jne 0x40ba38
push str._Advanced_Server
jmp 0x40ba64
push str._Enterprise_Server
jmp 0x40ba64
cmp ax, 0x400
jne 0x40ba4c
push str._Web_Server
jmp 0x40ba64
push str._Server
jmp 0x40ba64
push str.Windows_NT_4.0
call fcn.0040189e
push str._Server
mov ecx, edi
call fcn.00406d16
cmp word [ebp - 0x54], 9
jne 0x40baaa
push str._64_bit
mov ecx, edi
call fcn.00406d16
jmp 0x40baaa
cmp ecx, 1
jne 0x40baaa
mov eax, dword [eax + 8]
cmp eax, 0xa
jae 0x40ba92
push str.Windows_95
jmp 0x40baa3
cmp eax, 0x5a
jae 0x40ba9e
push str.Windows_98
jmp 0x40baa3
push str.Windows_ME
mov ecx, edi
call fcn.0040189e
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.004147c2
pop ecx
mov ebx, edi
call fcn.00401eb3
mov edi, eax
call fcn.00401f00
push eax
jmp 0x40b8d7
mov eax, dword [ebp + 0xc]
call fcn.00436cdb
ret 8