Function at 0x409f80
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x4ce724]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x128], 0
push 0x118
push 0
lea eax, [ebp - 0x124]
push eax
call fcn.00467d60
add esp, 0xc
push 0x11c
push 0
lea ecx, [ebp - 0x128]
push ecx
call fcn.00467d60
add esp, 0xc
mov dword [ebp - 0x128], 0x11c
lea edx, [ebp - 0x128]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40a018
push str.GetOSVersion____OSVERSIONINFOEX_failed
call fcn.004573f0
add esp, 4
mov dword [ebp - 0x128], 0x114
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40a018
xor eax, eax
jmp 0x40a83a
mov ecx, dword [ebp - 0x120]
push ecx
mov edx, dword [ebp - 0x124]
push edx
push str.GetOSVersion____MajorVersion_d_MinorVersion_d
call fcn.004573f0
add esp, 0xc
mov eax, dword [ebp - 0x124]
mov dword [0x4d0834], eax
mov ecx, dword [ebp - 0x120]
mov dword [0x4d0838], ecx
mov edx, dword [ebp - 0x118]
mov dword [ebp - 0x134], edx
cmp dword [ebp - 0x134], 0
je 0x40a828
cmp dword [ebp - 0x134], 1
je 0x40a604
cmp dword [ebp - 0x134], 2
je 0x40a07e
jmp 0x40a835
mov dword [0x4d080c], 1
cmp dword [ebp - 0x124], 4
ja 0x40a146
mov dword [0x4d0810], 1
push 0x4ae214
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_NT4
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae234
call fcn.00456fc0
add esp, 8
cmp dword [ebp - 0x124], 4
jne 0x40a0f1
push str.GetOSVersion____Workstation_4.0
call fcn.004573f0
add esp, 4
jmp 0x40a118
movzx eax, word [ebp - 0x10]
and eax, 0x200
je 0x40a10b
push str.GetOSVersion____Home_Edition
call fcn.004573f0
add esp, 4
jmp 0x40a118
push str.GetOSVersion____Professional
call fcn.004573f0
add esp, 4
movzx ecx, byte [ebp - 0xe]
cmp ecx, 3
jne 0x40a146
movzx edx, word [ebp - 0x10]
and edx, 2
je 0x40a139
push str.GetOSVersion____Server_4.0__Enterprise_Edition
call fcn.004573f0
add esp, 4
jmp 0x40a146
push str.GetOSVersion____Server_4.0
call fcn.004573f0
add esp, 4
cmp dword [ebp - 0x124], 5
jne 0x40a1e3
cmp dword [ebp - 0x120], 0
jne 0x40a1e3
mov dword [0x4d0814], 1
push 0x4ae308
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_2000
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae32c
call fcn.00456fc0
add esp, 8
movzx eax, word [ebp - 0x10]
and eax, 0x80
je 0x40a1be
push str.GetOSVersion____Datacenter_Server
call fcn.004573f0
add esp, 4
jmp 0x40a1e3
movzx ecx, word [ebp - 0x10]
and ecx, 2
je 0x40a1d6
push str.GetOSVersion____Advanced_Server
call fcn.004573f0
add esp, 4
jmp 0x40a1e3
push str.GetOSVersion____Server
call fcn.004573f0
add esp, 4
cmp dword [ebp - 0x124], 5
jne 0x40a239
cmp dword [ebp - 0x120], 1
jne 0x40a239
mov dword [0x4d0818], 1
push 0x4ae3b4
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_XP
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae3d4
call fcn.00456fc0
add esp, 8
cmp dword [ebp - 0x124], 5
jne 0x40a2fc
cmp dword [ebp - 0x120], 2
jne 0x40a2fc
mov dword [0x4d0814], 1
mov dword [0x4d081c], 1
push 0x4ae3fc
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_Server_2003
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae42c
call fcn.00456fc0
add esp, 8
movzx edx, word [ebp - 0x10]
and edx, 0x80
je 0x40a2bc
push str.GetOSVersion____Datacenter_Edition
call fcn.004573f0
add esp, 4
jmp 0x40a2fc
movzx eax, word [ebp - 0x10]
and eax, 2
je 0x40a2d4
push str.GetOSVersion____Enterprise_Edition
call fcn.004573f0
add esp, 4
jmp 0x40a2fc
movzx ecx, word [ebp - 0x10]
cmp ecx, 0x400
jne 0x40a2ef
push str.GetOSVersion____Web_Edition
call fcn.004573f0
add esp, 4
jmp 0x40a2fc
push str.GetOSVersion____Standard_Edition
call fcn.004573f0
add esp, 4
cmp dword [ebp - 0x124], 6
jne 0x40a352
cmp dword [ebp - 0x120], 0
jne 0x40a352
mov dword [0x4d0820], 1
push 0x4ae4e0
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_Vista
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae504
call fcn.00456fc0
add esp, 8
cmp dword [ebp - 0x124], 6
jne 0x40a3a8
cmp dword [ebp - 0x120], 1
jne 0x40a3a8
mov dword [0x4d0824], 1
push 0x4ae52c
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_Seven
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae550
call fcn.00456fc0
add esp, 8
cmp dword [ebp - 0x124], 6
jne 0x40a3fe
cmp dword [ebp - 0x120], 2
jne 0x40a3fe
mov dword [0x4d0828], 1
push str.10B0
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_8
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae598
call fcn.00456fc0
add esp, 8
cmp dword [ebp - 0x124], 6
ja 0x40a419
cmp dword [ebp - 0x124], 6
jne 0x40a45d
cmp dword [ebp - 0x120], 2
jbe 0x40a45d
mov dword [0x4d082c], 1
push str.11B0
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_8.1
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae5e4
call fcn.00456fc0
add esp, 8
cmp dword [ebp - 0x124], 4
jne 0x40a4cd
push str.Service_Pack_6
lea edx, [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40a4cd
lea eax, [ebp - 0x12c]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
jne 0x40a4c0
mov ecx, dword [ebp - 0x11c]
and ecx, 0xffff
push ecx
push str.GetOSVersion____Service_Pack_6a__Build__d_
call fcn.004573f0
add esp, 8
mov edx, dword [ebp - 0x12c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx eax, word [ebp - 0x14]
mov dword [0x4d083c], eax
mov ecx, dword [0x4d083c]
push ecx
push 0x4ae6d4
push 4
push 0x4d0918
call fcn.00468336
add esp, 0x10
movzx edx, word [ebp - 0x12]
mov dword [0x4d0840], edx
mov eax, dword [0x4d0840]
push eax
push 0x4ae6dc
push 4
push 0x4d0920
call fcn.00468336
add esp, 0x10
mov ecx, dword [ebp - 0x11c]
and ecx, 0xffff
push ecx
mov edx, dword [0x4d0840]
push edx
mov eax, dword [0x4d083c]
push eax
push str.GetOSVersion____Service_Pack_d._d__Build__d_
call fcn.00456fc0
add esp, 0x10
call fcn.00409d10
mov dword [0x4d0830], eax
cmp dword [0x4d0830], 0
je 0x40a5f2
push str.GetOSVersion____Windows_64_bits
call fcn.004573f0
add esp, 4
cmp dword [0x4d081c], 0
je 0x40a5af
mov dword [0x4d0818], 1
push 0x4ae764
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_XP_64
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae788
call fcn.00456fc0
add esp, 8
jmp 0x40a5f0
push 0x4ae7b0
push 0x20
push 0x4d0928
call fcn.00468221
add esp, 0xc
push 1
push 0x4ae7b8
push 0x4ae7bc
push 5
push 0x4d0844
call fcn.0040e710
add esp, 0x14
push 0x4d0928
push 0x4ae7c0
call fcn.00456fc0
add esp, 8
jmp 0x40a5ff
push str.GetOSVersion____Windows_32_bits
call fcn.004573f0
add esp, 4
jmp 0x40a835
cmp dword [ebp - 0x124], 4
jne 0x40a70e
cmp dword [ebp - 0x120], 0
jne 0x40a70e
mov dword [0x4d0800], 1
push 0x4ae808
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_95
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae828
call fcn.00456fc0
add esp, 8
movzx ecx, word [ebp - 0x112]
cmp ecx, 0x43
jne 0x40a6a0
push 0x4ae850
push 4
push 0x4d0918
call fcn.0046a6ad
add esp, 0xc
mov dword [0x4d083c], 2
push 0x4d0918
push 0x4ae854
call fcn.00456fc0
add esp, 8
jmp 0x40a70e
movzx edx, word [ebp - 0x112]
cmp edx, 0x42
jne 0x40a6de
push 0x4ae88c
push 4
push 0x4d0918
call fcn.0046a6ad
add esp, 0xc
mov dword [0x4d083c], 1
push 0x4d0918
push 0x4ae890
call fcn.00456fc0
add esp, 8
jmp 0x40a70e
push 0x4ae8c8
push 4
push 0x4d0918
call fcn.0046a6ad
add esp, 0xc
mov dword [0x4d083c], 0
push 0x4d0918
push 0x4ae8cc
call fcn.00456fc0
add esp, 8
cmp dword [ebp - 0x124], 4
jne 0x40a7d0
cmp dword [ebp - 0x120], 0xa
jne 0x40a7d0
mov dword [0x4d0804], 1
push 0x4ae904
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_98
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push 0x4ae924
call fcn.00456fc0
add esp, 8
movzx eax, word [ebp - 0x112]
cmp eax, 0x41
jne 0x40a7a5
push 0x4ae94c
push 4
push 0x4d0918
call fcn.0046a6ad
add esp, 0xc
mov dword [0x4d083c], 1
push str.GetOSVersion____Version_SE
call fcn.004573f0
add esp, 4
jmp 0x40a7d0
push 0x4ae96c
push 4
push 0x4d0918
call fcn.0046a6ad
add esp, 0xc
mov dword [0x4d083c], 0
push str.GetOSVersion____Version_FE
call fcn.004573f0
add esp, 4
cmp dword [ebp - 0x124], 4
jne 0x40a826
cmp dword [ebp - 0x120], 0x5a
jne 0x40a826
mov dword [0x4d0808], 1
push 0x4ae98c
push 5
push 0x4d0844
call fcn.0046a6ad
add esp, 0xc
push str.Windows_Millennium
push 0x20
push 0x4d0928
call fcn.0046a6ad
add esp, 0xc
push 0x4d0928
push str.GetOSVersion_____s
call fcn.00456fc0
add esp, 8
jmp 0x40a835
push str.GetOSVersion____Microsoft_Win32s
call fcn.004573f0
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00467d4f
mov esp, ebp
pop ebp
ret