Function at 0x40786f
Capabilities:
Check os version

Disassembly:
mov eax, 0x4117b6
call fcn.00410660
sub esp, 0x334
and dword [ebp - 0x2e4], 0
lea ecx, [ebp - 0x134]
call fcn.00405957
mov dword [ebp - 4], 1
push 0x11c
push 0
lea eax, [ebp - 0x128]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x128], 0x11c
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
mov dword [ebp - 0x138], eax
cmp dword [ebp - 0x138], 0
jne 0x40790b
mov dword [ebp - 0x128], 0x114
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
test eax, eax
jne 0x40790b
lea ecx, [ebp - 0x148]
call fcn.004068d8
push 0x4170c8
lea eax, [ebp - 0x148]
push eax
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0x2e8], eax
cmp dword [ebp - 0x2e8], 0
je 0x407c05
cmp dword [ebp - 0x2e8], 1
je 0x407af8
cmp dword [ebp - 0x2e8], 2
je 0x40793f
jmp 0x407c4c
cmp dword [ebp - 0x124], 6
jne 0x407998
cmp dword [ebp - 0x120], 0
jne 0x407998
push str.Windows_NT_6.0
lea ecx, [ebp - 0x154]
call fcn.004059c7
mov byte [ebp - 4], 2
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x160]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x160]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x154]
call fcn.00405f05
cmp dword [ebp - 0x124], 5
jne 0x4079f1
cmp dword [ebp - 0x120], 2
jne 0x4079f1
push str.Windows_NT_5.2
lea ecx, [ebp - 0x16c]
call fcn.004059c7
mov byte [ebp - 4], 3
lea eax, [ebp - 0x16c]
push eax
lea eax, [ebp - 0x178]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x178]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x16c]
call fcn.00405f05
cmp dword [ebp - 0x124], 5
jne 0x407a4a
cmp dword [ebp - 0x120], 1
jne 0x407a4a
push str.Windows_NT_5.1
lea ecx, [ebp - 0x184]
call fcn.004059c7
mov byte [ebp - 4], 4
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x190]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x190]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x184]
call fcn.00405f05
cmp dword [ebp - 0x124], 5
jne 0x407aa3
cmp dword [ebp - 0x120], 0
jne 0x407aa3
push str.Windows_NT_5.0
lea ecx, [ebp - 0x19c]
call fcn.004059c7
mov byte [ebp - 4], 5
lea eax, [ebp - 0x19c]
push eax
lea eax, [ebp - 0x1a8]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x1a8]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x19c]
call fcn.00405f05
cmp dword [ebp - 0x124], 4
ja 0x407af3
push str.Windows_NT
lea ecx, [ebp - 0x1b4]
call fcn.004059c7
mov byte [ebp - 4], 6
lea eax, [ebp - 0x1b4]
push eax
lea eax, [ebp - 0x1c0]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x1c0]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1b4]
call fcn.00405f05
jmp 0x407c4c
cmp dword [ebp - 0x124], 4
jne 0x407b51
cmp dword [ebp - 0x120], 0
jne 0x407b51
push str.Windows_95
lea ecx, [ebp - 0x1cc]
call fcn.004059c7
mov byte [ebp - 4], 7
lea eax, [ebp - 0x1cc]
push eax
lea eax, [ebp - 0x1d8]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x1d8]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1cc]
call fcn.00405f05
cmp dword [ebp - 0x124], 4
jne 0x407baa
cmp dword [ebp - 0x120], 0xa
jne 0x407baa
push str.Windows_98
lea ecx, [ebp - 0x1e4]
call fcn.004059c7
mov byte [ebp - 4], 8
lea eax, [ebp - 0x1e4]
push eax
lea eax, [ebp - 0x1f0]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x1f0]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1e4]
call fcn.00405f05
cmp dword [ebp - 0x124], 4
jne 0x407c03
cmp dword [ebp - 0x120], 0x5a
jne 0x407c03
push str.Windows_98
lea ecx, [ebp - 0x1fc]
call fcn.004059c7
mov byte [ebp - 4], 9
lea eax, [ebp - 0x1fc]
push eax
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x208]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1fc]
call fcn.00405f05
jmp 0x407c4c
push str.Win32s
lea ecx, [ebp - 0x214]
call fcn.004059c7
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f54
lea ecx, [ebp - 0x220]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x214]
call fcn.00405f05
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x407f9d
push 0x439cb8
lea ecx, [ebp - 0x238]
call fcn.004059c7
mov byte [ebp - 4], 0xb
push 0x439d08
lea ecx, [ebp - 0x250]
call fcn.004059c7
mov byte [ebp - 4], 0xc
movzx eax, word [ebp - 0x12]
push eax
lea eax, [ebp - 0x22c]
push eax
call fcn.00405b75
pop ecx
pop ecx
mov dword [ebp - 0x2ec], eax
mov eax, dword [ebp - 0x2ec]
mov dword [ebp - 0x2f0], eax
mov byte [ebp - 4], 0xd
push dword [ebp - 0x2f0]
lea eax, [ebp - 0x238]
push eax
movzx eax, word [ebp - 0x14]
push eax
lea eax, [ebp - 0x244]
push eax
call fcn.00405b75
pop ecx
pop ecx
mov dword [ebp - 0x2f4], eax
mov eax, dword [ebp - 0x2f4]
mov dword [ebp - 0x2f8], eax
mov byte [ebp - 4], 0xe
push dword [ebp - 0x2f8]
lea eax, [ebp - 0x250]
push eax
push 0x439aa0
lea ecx, [ebp - 0x25c]
call fcn.004059c7
mov dword [ebp - 0x2fc], eax
mov eax, dword [ebp - 0x2fc]
mov dword [ebp - 0x300], eax
mov byte [ebp - 4], 0xf
push dword [ebp - 0x300]
lea eax, [ebp - 0x268]
push eax
call fcn.00405f8b
add esp, 0xc
mov dword [ebp - 0x304], eax
mov eax, dword [ebp - 0x304]
mov dword [ebp - 0x308], eax
mov byte [ebp - 4], 0x10
push dword [ebp - 0x308]
lea eax, [ebp - 0x274]
push eax
call fcn.00405f8b
add esp, 0xc
mov dword [ebp - 0x30c], eax
mov eax, dword [ebp - 0x30c]
mov dword [ebp - 0x310], eax
mov byte [ebp - 4], 0x11
push dword [ebp - 0x310]
lea eax, [ebp - 0x280]
push eax
call fcn.00405f8b
add esp, 0xc
mov dword [ebp - 0x314], eax
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x318], eax
mov byte [ebp - 4], 0x12
push dword [ebp - 0x318]
lea eax, [ebp - 0x28c]
push eax
call fcn.00405f8b
add esp, 0xc
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x31c]
mov dword [ebp - 0x320], eax
mov byte [ebp - 4], 0x13
push dword [ebp - 0x320]
lea eax, [ebp - 0x298]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f1f
lea ecx, [ebp - 0x298]
call fcn.00405f05
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x28c]
call fcn.00405f05
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x280]
call fcn.00405f05
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x274]
call fcn.00405f05
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x268]
call fcn.00405f05
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x25c]
call fcn.00405f05
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x244]
call fcn.00405f05
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x22c]
call fcn.00405f05
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x250]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x238]
call fcn.00405f05
push str.Build
lea ecx, [ebp - 0x2b0]
call fcn.004059c7
mov byte [ebp - 4], 0x14
push dword [ebp - 0x11c]
lea eax, [ebp - 0x2a4]
push eax
call fcn.00405b75
pop ecx
pop ecx
mov dword [ebp - 0x324], eax
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x328], eax
mov byte [ebp - 4], 0x15
push dword [ebp - 0x328]
lea eax, [ebp - 0x2b0]
push eax
push 0x439aa0
lea ecx, [ebp - 0x2bc]
call fcn.004059c7
mov dword [ebp - 0x32c], eax
mov eax, dword [ebp - 0x32c]
mov dword [ebp - 0x330], eax
mov byte [ebp - 4], 0x16
push dword [ebp - 0x330]
lea eax, [ebp - 0x2c8]
push eax
call fcn.00405f8b
add esp, 0xc
mov dword [ebp - 0x334], eax
mov eax, dword [ebp - 0x334]
mov dword [ebp - 0x338], eax
mov byte [ebp - 4], 0x17
push dword [ebp - 0x338]
lea eax, [ebp - 0x2d4]
push eax
call fcn.00405f8b
add esp, 0xc
mov dword [ebp - 0x33c], eax
mov eax, dword [ebp - 0x33c]
mov dword [ebp - 0x340], eax
mov byte [ebp - 4], 0x18
push dword [ebp - 0x340]
lea eax, [ebp - 0x2e0]
push eax
lea ecx, [ebp - 0x134]
call fcn.00405f1f
lea ecx, [ebp - 0x2e0]
call fcn.00405f05
mov byte [ebp - 4], 0x17
lea ecx, [ebp - 0x2d4]
call fcn.00405f05
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0x2c8]
call fcn.00405f05
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x2bc]
call fcn.00405f05
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x2a4]
call fcn.00405f05
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2b0]
call fcn.00405f05
lea eax, [ebp - 0x134]
push eax
mov ecx, dword [ebp + 8]
call fcn.00405a5d
mov eax, dword [ebp - 0x2e4]
or al, 1
mov dword [ebp - 0x2e4], eax
and byte [ebp - 4], 0
lea ecx, [ebp - 0x134]
call fcn.00405f05
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret