Function at 0x496f50
Capabilities:
Check os version

Disassembly:
sub esp, 0x1a4
mov eax, dword [0x4ca09c]
xor eax, esp
mov dword [esp + 0x1a0], eax
push esi
push edi
push 0x9c
lea eax, [esp + 0x10]
push 0
push eax
mov esi, ecx
call fcn.00481f20
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
mov dword [esp + 0x10], 0x9c
call edi
test eax, eax
jne 0x496fd2
push 0x94
push eax
lea edx, [esp + 0x14]
push edx
call fcn.00481f20
add esp, 0xc
lea eax, [esp + 0xc]
push eax
mov dword [esp + 0x10], 0x94
call edi
test eax, eax
jne 0x496fd2
pop edi
pop esi
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.004811b7
add esp, 0x1a4
ret
movzx edi, word [esp + 0xa0]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esi + 0x14], edi
movzx edi, word [esp + 0xa2]
mov dword [esi + 8], ecx
sub ecx, 0
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], eax
mov dword [esi + 0x18], edi
je 0x49745a
sub ecx, 1
je 0x4973b6
sub ecx, 1
jne 0x497470
cmp edx, 4
ja 0x497038
push str.Microsoft_Windows_NT
mov ecx, dword [esi + 0x1c]
push 0x400
push ecx
call fcn.00481ba5
add esp, 0xc
jmp 0x497155
cmp edx, 5
jne 0x4970fc
test eax, eax
jne 0x497060
mov edx, dword [esi + 0x1c]
push str.Microsoft_Windows_2000
push 0x400
push edx
call fcn.00481ba5
add esp, 0xc
jmp 0x497155
cmp eax, 1
jne 0x4970c6
mov eax, dword [esi + 0x1c]
push str.Microsoft_Windows_XP
push 0x400
push eax
call fcn.00481ba5
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
add esp, 0xc
push 0x57
call edi
test eax, eax
je 0x49709f
mov ecx, dword [esi + 0x1c]
push str.Media_Center_Edition
push 0x400
push ecx
call fcn.00430eb0
add esp, 0xc
push 0x56
call edi
test eax, eax
je 0x497155
mov edx, dword [esi + 0x1c]
push str.Tablet_PC_Edition
push 0x400
push edx
call fcn.00430eb0
add esp, 0xc
jmp 0x497155
cmp eax, 2
jne 0x4970f7
cmp byte [esp + 0xa6], 1
jne 0x4970ed
mov eax, dword [esi + 0x1c]
push str.Microsoft_Windows_XP_x64
push 0x400
push eax
call fcn.00481ba5
add esp, 0xc
jmp 0x497155
push str.Microsoft_Windows_Server_2003
jmp 0x497022
push eax
push 5
jmp 0x49713f
cmp edx, 6
push eax
jne 0x49713e
mov eax, dword [esi + 0x1c]
push edx
push str.Microsoft_Windows_Vista___d._d_
push 0x400
push eax
call fcn.004310e0
movzx ecx, word [esp + 0xb6]
movzx edx, word [esp + 0xb4]
mov eax, dword [esp + 0x28]
add esp, 0x14
push ecx
mov ecx, dword [esp + 0x14]
push edx
push eax
push ecx
mov ecx, esi
call fcn.00496d80
jmp 0x497155
push edx
mov edx, dword [esi + 0x1c]
push str.Microsoft_Windows_NT_d._d
push 0x400
push edx
call fcn.004310e0
add esp, 0x14
mov al, byte [esp + 0xa6]
cmp al, 1
jne 0x4971af
mov eax, dword [esp + 0x10]
cmp eax, 4
jne 0x497173
push str.Workstation_4.0
jmp 0x497295
cmp eax, 5
jne 0x4972a6
test dword [esp + 0xa4], 0x200
je 0x49719c
mov ecx, dword [esi + 0x1c]
push str.Home_Edition
push 0x400
push ecx
jmp 0x49729e
mov edx, dword [esi + 0x1c]
push str.Professional
push 0x400
push edx
jmp 0x49729e
cmp al, 3
je 0x4971bb
cmp al, 2
jne 0x4972a6
mov eax, dword [esp + 0x10]
cmp eax, 5
jne 0x497271
mov eax, dword [esp + 0x14]
cmp eax, 2
jne 0x497233
mov eax, dword [esp + 0xa4]
test al, al
jns 0x4971e6
push str.Datacenter_Edition
jmp 0x497295
test al, 2
je 0x4971fd
mov ecx, dword [esi + 0x1c]
push str.Enterprise_Edition
push 0x400
push ecx
jmp 0x49729e
cmp ax, 0x400
jne 0x497216
mov edx, dword [esi + 0x1c]
push str.Web_Edition
push 0x400
push edx
jmp 0x49729e
cmp ax, 1
jne 0x497223
push str.Small_Business_Edition
jmp 0x497295
mov ecx, dword [esi + 0x1c]
push str.Standard_Edition
push 0x400
push ecx
jmp 0x49729e
test eax, eax
jne 0x497376
mov al, byte [esp + 0xa4]
test al, al
jns 0x497256
mov edx, dword [esi + 0x1c]
push str.Datacenter_Server
push 0x400
push edx
jmp 0x49729e
test al, 2
je 0x497261
push str.Advanced_Server
jmp 0x497295
mov ecx, dword [esi + 0x1c]
push str.Server
push 0x400
push ecx
jmp 0x49729e
cmp eax, 4
ja 0x4972a6
test byte [esp + 0xa4], 2
je 0x497290
mov edx, dword [esi + 0x1c]
push str.Server_4.0__Enterprise_Edition
push 0x400
push edx
jmp 0x49729e
push str.Server_4.0
mov eax, dword [esi + 0x1c]
push 0x400
push eax
call fcn.00430eb0
add esp, 0xc
cmp dword [esp + 0x10], 4
jne 0x497376
push str.Service_Pack_6
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x497376
lea edx, [esp + 8]
push edx
push 1
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x49732b
movzx eax, word [esp + 0x18]
push eax
push str.Service_Pack_6a__Build__d_
lea ecx, [esp + 0xb0]
push 0x100
push ecx
call fcn.004310e0
mov eax, dword [esi + 0x20]
lea edx, [esp + 0xb8]
push edx
push 0x200
push eax
call fcn.004310e0
mov eax, dword [esp + 0x24]
add esp, 0x1c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x497470
movzx ecx, word [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
push str._s__Build__d_
lea eax, [esp + 0xb4]
push 0x100
push eax
call fcn.004310e0
mov edx, dword [esi + 0x20]
lea ecx, [esp + 0xbc]
push ecx
push 0x200
push edx
call fcn.004310e0
mov eax, dword [esp + 0x28]
add esp, 0x20
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x497470
movzx ecx, word [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
push str._s__Build__d_
lea eax, [esp + 0xb4]
push 0x100
push eax
call fcn.004310e0
mov edx, dword [esi + 0x20]
lea ecx, [esp + 0xbc]
push ecx
push 0x200
push edx
call fcn.004310e0
add esp, 0x20
jmp 0x497470
cmp edx, 4
jne 0x49744a
test eax, eax
jne 0x4973fe
mov eax, dword [esi + 0x1c]
push str.Microsoft_Windows_95
push 0x400
push eax
call fcn.00481ba5
mov al, byte [esp + 0x2d]
add esp, 0xc
cmp al, 0x43
je 0x4973e9
cmp al, 0x42
jne 0x497470
mov ecx, dword [esi + 0x1c]
push str._OSR2
push 0x400
push ecx
call fcn.00430eb0
jmp 0x49746d
cmp eax, 0xa
jne 0x497435
mov edx, dword [esi + 0x1c]
push str.Microsoft_Windows_98
push 0x400
push edx
call fcn.00481ba5
add esp, 0xc
cmp byte [esp + 0x21], 0x41
jne 0x497470
mov eax, dword [esi + 0x1c]
push str._SE
push 0x400
push eax
call fcn.00430eb0
jmp 0x49746d
cmp eax, 0x5a
jne 0x497470
mov ecx, dword [esi + 0x1c]
push str.Microsoft_Windows_Millennium_Edition
push 0x400
push ecx
jmp 0x497468
mov edx, dword [esi + 0x1c]
push str.Microsoft_Windows_9x
push 0x400
push edx
jmp 0x497468
mov eax, dword [esi + 0x1c]
push str.Microsoft_Win32s
push 0x400
push eax
call fcn.00481ba5
add esp, 0xc
mov ecx, dword [esp + 0x1a8]
pop edi
pop esi
xor ecx, esp
mov eax, 1
call fcn.004811b7
add esp, 0x1a4
ret