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

Disassembly:
push 0xffffffffffffffff
push 0x45e0cc
mov eax, dword fs:[0]
push eax
sub esp, 0x30c
mov eax, dword [0x46e074]
xor eax, esp
mov dword [esp + 0x308], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46e074]
xor eax, esp
push eax
lea eax, [esp + 0x320]
mov dword fs:[0], eax
mov eax, dword [esp + 0x330]
mov ebp, dword [esp + 0x334]
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x278], 0xf
mov dword [esp + 0x274], ebx
mov byte [esp + 0x264], bl
mov dword [esp + method.Share::String::_tstringA.virtual_0], vtable.Share::String::_tstringA.0
xor eax, eax
mov dword [esp + 0x328], ebx
push 0x9c
lea ecx, [esp + 0x280]
push ebx
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
call fcn.004481d0
add esp, 0xc
lea edx, [esp + 0x27c]
push edx
mov dword [esp + 0x280], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x40273f
lea eax, [esp + 0x27c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x27c], 0x94
call fcn.004024d0
push str.GetNativeSystemInfo
push str.kernel32.dll
call edi
push eax
call esi
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x28c]
sub eax, ebx
je 0x402ed3
sub eax, 1
je 0x402dbf
sub eax, 1
jne 0x402ee6
cmp dword [esp + 0x280], 0xa
jne 0x402676
push 0xb
push str.Windows_10
lea ecx, [esp + 0x268]
call fcn.004017b0
mov esi, 6
mov edi, 9
cmp dword [esp + 0x280], esi
jne 0x402710
mov eax, dword [esp + 0x284]
cmp eax, 2
je 0x40269e
cmp eax, 3
jne 0x4026c1
push 0xa
push str.Windows_8
lea ecx, [esp + 0x268]
call fcn.004017b0
cmp dword [esp + 0x280], esi
jne 0x402710
mov eax, dword [esp + 0x284]
cmp eax, 1
jne 0x4026e8
mov edx, str.Windows_7
lea esi, [esp + 0x25c]
call fcn.0040a1a0
cmp dword [esp + 0x280], 6
jne 0x402710
mov eax, dword [esp + 0x284]
cmp eax, ebx
jne 0x402814
cmp byte [esp + 0x316], 1
lea esi, [esp + 0x25c]
mov edx, str.Windows_Vista
je 0x40270b
mov edx, str.Windows_Server__Longhorn_
call fcn.0040a1a0
cmp dword [esp + 0x280], 5
jne 0x4027f7
cmp dword [esp + 0x284], 2
jne 0x4027b8
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x402787
mov edx, str.Microsoft_Windows_Server_2003__R2_
jmp 0x4027a2
push str.ntdll.dll
call edi
cmp eax, ebx
je 0x40277a
push str.RtlGetNtVersionNumbers
push eax
call esi
cmp eax, ebx
je 0x40277a
lea ecx, [esp + 0x288]
push ecx
lea edx, [esp + 0x288]
push edx
lea ecx, [esp + 0x288]
push ecx
call eax
xor edx, edx
mov word [esp + 0x28a], dx
mov dword [esp + 0x18], 1
jmp 0x40261e
cmp byte [esp + 0x316], 1
jne 0x40279d
mov edx, str.Microsoft_Windows_XP_Professional_x64_Edition
cmp word [esp + 0x20], di
je 0x4027a2
mov edx, str.Microsoft_Windows_Server_2003_
lea esi, [esp + 0x25c]
call fcn.0040a1a0
cmp dword [esp + 0x280], 5
jne 0x4027f7
cmp dword [esp + 0x284], 1
jne 0x4027dd
mov edx, str.Microsoft_Windows_XP
lea esi, [esp + 0x25c]
call fcn.0040a1a0
cmp dword [esp + 0x280], 5
jne 0x4027f7
cmp dword [esp + 0x284], ebx
jne 0x402814
mov edx, str.Microsoft_Windows_2000
lea esi, [esp + 0x25c]
call fcn.0040a1a0
cmp dword [esp + 0x280], 4
ja 0x402814
push 0x15
push str.Microsoft_Windows_NT
lea ecx, [esp + 0x268]
call fcn.004017b0
cmp dword [esp + 0x18], ebx
je 0x402d65
movzx ecx, word [esp + 0x310]
push ecx
push str.Service_Pack__d
push 1
push ebp
call fcn.0040a070
mov al, byte [esp + 0x326]
add esp, 0x10
cmp al, 1
jne 0x40290d
cmp word [esp + 0x20], di
je 0x402ca3
cmp dword [esp + 0x280], 4
jne 0x402892
lea edx, [esp + 0x260]
push edx
mov edi, str.Workstation_4.0
lea esi, [esp + 0x148]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 1
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
test dword [esp + 0x314], 0x200
je 0x4028d6
lea eax, [esp + 0x260]
push eax
mov edi, str.Home_Edition
lea esi, [esp + 0x228]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 2
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
lea ecx, [esp + 0x260]
push ecx
mov edi, str.Professional
lea esi, [esp + 0x180]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 3
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
cmp al, 3
je 0x402919
cmp al, 2
jne 0x402ca3
cmp dword [esp + 0x280], 5
jne 0x402c27
mov eax, dword [esp + 0x284]
cmp eax, 2
jne 0x402b6e
mov eax, dword [esp + 0x20]
cmp ax, 6
jne 0x4029c6
mov al, byte [esp + 0x314]
test al, al
jns 0x402987
lea edx, [esp + 0x260]
push edx
mov edi, str.Datacenter_Edition_for_Itanium_based_Systems
lea esi, [esp + 0xa0]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 4
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
test al, 2
je 0x402d42
lea eax, [esp + 0x260]
push eax
mov edi, str.Enterprise_Edition_for_Itanium_based_Systems
lea esi, [esp + 0x20c]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 5
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
cmp ax, di
mov al, byte [esp + 0x314]
jne 0x402a83
test al, al
jns 0x402a11
lea ecx, [esp + 0x260]
push ecx
mov edi, str.Datacenter_x64_Edition
lea esi, [esp + 0xd8]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 6
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
test al, 2
je 0x402a4c
lea edx, [esp + 0x260]
push edx
mov edi, str.Enterprise_x64_Edition
lea esi, [esp + 0x1b8]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 7
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
lea eax, [esp + 0x260]
push eax
mov edi, str.Standard_x64_Edition
lea esi, [esp + 0x110]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 8
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
test al, al
jns 0x402abe
lea ecx, [esp + 0x260]
push ecx
mov edi, str.Datacenter_Edition
lea esi, [esp + 0x244]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 9
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
test al, 2
je 0x402af6
lea edx, [esp + 0x260]
push edx
mov edi, str.Enterprise_Edition
lea esi, [esp + 0x4c]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0xa
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
test dword [esp + 0x314], 0x400
je 0x402b3a
lea eax, [esp + 0x260]
push eax
mov edi, str.Web_Edition
lea esi, [esp + 0x1f0]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0xb
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
lea ecx, [esp + 0x260]
push ecx
mov edi, str.Standard_Edition
lea esi, [esp + 0x68]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0xc
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
cmp eax, ebx
jne 0x402c27
mov al, byte [esp + 0x314]
test al, al
jns 0x402bb8
lea edx, [esp + 0x260]
push edx
mov edi, str.Datacenter_Server
lea esi, [esp + 0x84]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0xd
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
test al, 2
je 0x402bf3
lea eax, [esp + 0x260]
push eax
mov edi, str.Advanced_Server
lea esi, [esp + 0xbc]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0xe
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
lea ecx, [esp + 0x260]
push ecx
mov edi, 0x461628
lea esi, [esp + 0xf4]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0xf
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
test byte [esp + 0x314], 2
je 0x402c65
lea edx, [esp + 0x260]
push edx
mov edi, str.Server_4.0__Enterprise_Edition
lea esi, [esp + 0x12c]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0x10
call fcn.0040a210
mov ecx, esi
jmp 0x402c97
lea eax, [esp + 0x260]
push eax
mov edi, str.Server_4.0
lea esi, [esp + 0x164]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0x11
call fcn.0040a210
mov ecx, esi
mov byte [esp + 0x328], bl
call fcn.00401690
cmp dword [esp + 0x280], 4
jne 0x402d42
push str.Service_Pack_6
lea ecx, [esp + 0x294]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x402d42
lea edx, [esp + 0x18]
push edx
push 1
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402d14
movzx eax, word [esp + 0x288]
push eax
push str.Service_Pack_6a__Build__d__n
lea ecx, [esp + 0x264]
push 1
push ecx
call fcn.0040a070
mov ecx, dword [esp + 0x28]
add esp, 0x10
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402ee6
movzx edx, word [esp + 0x288]
push edx
lea eax, [esp + 0x294]
push eax
push str._s__Build__d__n
call fcn.00446332
mov ecx, dword [esp + 0x24]
add esp, 0xc
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402ee6
movzx edx, word [esp + 0x288]
push edx
lea eax, [esp + 0x294]
push eax
push str._s__Build__d__n
call fcn.00446332
add esp, 0xc
jmp 0x402ee6
lea ecx, [esp + 0x44]
push ecx
push 1
push ebx
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.WS2_32.dll_bind
mov dword [esp + 0x2c], 0x100
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x402d99
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x25c]
call fcn.0040a1d0
cmp dword [esp + 0x278], 0x10
mov dword [esp + method.Share::String::_tstringA.virtual_0], vtable.Share::String::_tstringA.0
jb 0x402f48
mov edx, dword [esp + 0x264]
push edx
jmp 0x402f40
mov ebp, 4
cmp dword [esp + 0x280], ebp
jne 0x402ee6
cmp dword [esp + 0x284], ebx
jne 0x402e45
mov edx, str.Microsoft_Windows_95
lea esi, [esp + 0x25c]
call fcn.0040a1a0
mov al, byte [esp + 0x291]
cmp al, 0x43
je 0x402dfa
cmp al, 0x42
jne 0x402e38
lea eax, [esp + 0x260]
push eax
mov edi, str.OSR2
lea esi, [esp + 0x19c]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0x15
call fcn.0040a210
mov ecx, esi
mov byte [esp + 0x328], bl
call fcn.00401690
cmp dword [esp + 0x280], ebp
jne 0x402ee6
cmp dword [esp + 0x284], 0xa
jne 0x402eb6
mov edx, str.Microsoft_Windows_98
lea esi, [esp + 0x25c]
call fcn.0040a1a0
mov al, byte [esp + 0x291]
cmp al, 0x41
je 0x402e6f
cmp al, 0x42
jne 0x402ead
lea ecx, [esp + 0x260]
push ecx
mov edi, 0x46173c
lea esi, [esp + 0x1d4]
call fcn.00401b70
add esp, 4
lea edi, [esp + 0x25c]
mov byte [esp + 0x328], 0x16
call fcn.0040a210
mov ecx, esi
mov byte [esp + 0x328], bl
call fcn.00401690
cmp dword [esp + 0x280], ebp
jne 0x402ee6
cmp dword [esp + 0x284], 0x5a
jne 0x402ee6
mov edx, str.Microsoft_Windows_Millennium_Edition_n
lea esi, [esp + 0x25c]
call fcn.0040a1a0
jmp 0x402ee6
push 0x11
push str.Microsoft_Win32s_n
lea ecx, [esp + 0x268]
call fcn.004017b0
mov edi, dword [esp + 0x1c]
lea edx, [esp + 0x25c]
cmp edx, edi
je 0x402f23
cmp dword [esp + 0x278], 0x10
jb 0x402f72
mov edx, dword [esp + 0x264]
cmp edx, ebx
je 0x402f23
mov eax, edx
lea esi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402f10
sub eax, esi
push eax
push edx
lea ecx, [edi + 4]
call fcn.004017b0
cmp dword [esp + 0x278], 0x10
mov dword [esp + method.Share::String::_tstringA.virtual_0], vtable.Share::String::_tstringA.0
jb 0x402f48
mov eax, dword [esp + 0x264]
push eax
call fcn.00445523
add esp, 4
mov ecx, dword [esp + 0x320]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x308]
xor ecx, esp
call fcn.004453f2
add esp, 0x318
ret 8
lea edx, [esp + 0x264]
jmp 0x402f0a