Function at 0x4186a0
Capabilities:
Check os version

Disassembly:
sub esp, 0x1a4
mov eax, dword [0x489e34]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push esi
push 0x9c
lea eax, [esp + 0x10]
push 0
push eax
mov ebx, ecx
call fcn.004568e0
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
mov dword [esp + 0x10], 0x9c
call esi
test eax, eax
jne 0x418722
push 0x94
push eax
lea edx, [esp + 0x14]
push edx
call fcn.004568e0
add esp, 0xc
lea eax, [esp + 0xc]
push eax
mov dword [esp + 0x10], 0x94
call esi
test eax, eax
jne 0x418722
pop esi
pop ebx
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.004563cf
add esp, 0x1a4
ret
movzx esi, word [esp + 0xa0]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [ebx + 0x14], esi
movzx esi, word [esp + 0xa2]
mov dword [ebx + 8], eax
sub eax, 0
mov dword [ebx + 0xc], edx
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x18], esi
je 0x418e4c
sub eax, 1
je 0x418d88
sub eax, 1
jne 0x418e5f
cmp edx, 4
ja 0x418785
mov ecx, dword [ebx + 0x1c]
push str.Microsoft_Windows_NT
push 0x16
push ecx
call fcn.004565a4
add esp, 0xc
jmp 0x418906
cmp edx, 5
jne 0x4188b7
test ecx, ecx
jne 0x4187aa
mov edx, dword [ebx + 0x1c]
push str.Microsoft_Windows_2000
push 0x18
push edx
call fcn.004565a4
add esp, 0xc
jmp 0x418906
cmp ecx, 1
jne 0x418879
mov eax, dword [ebx + 0x1c]
push str.Microsoft_Windows_XP
push 0x16
push eax
call fcn.004565a4
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
add esp, 0xc
push 0x57
call esi
test eax, eax
je 0x418821
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
lea ebx, [ebx]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4187e0
mov ecx, dword [str.Media_Center_Edition]
mov dword [eax], ecx
mov edx, dword [0x472bac]
mov dword [eax + 4], edx
mov ecx, dword [0x472bb0]
mov dword [eax + 8], ecx
mov edx, dword [0x472bb4]
mov dword [eax + 0xc], edx
mov ecx, dword [0x472bb8]
mov dword [eax + 0x10], ecx
mov dx, word [0x472bbc]
mov word [eax + 0x14], dx
push 0x56
call esi
test eax, eax
je 0x418906
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418833
mov ecx, dword [str.Tablet_PC_Edition]
mov dword [eax], ecx
mov edx, dword [0x472b98]
mov dword [eax + 4], edx
mov ecx, dword [0x472b9c]
mov dword [eax + 8], ecx
mov edx, dword [0x472ba0]
mov dword [eax + 0xc], edx
mov cx, word [0x472ba4]
mov word [eax + 0x10], cx
mov dl, byte [0x472ba6]
mov byte [eax + 0x12], dl
jmp 0x418906
cmp ecx, 2
jne 0x4188b2
cmp byte [esp + 0xa6], 1
jne 0x41889d
mov eax, dword [ebx + 0x1c]
push str.Microsoft_Windows_XP_x64
push 0x1a
push eax
call fcn.004565a4
add esp, 0xc
jmp 0x418906
mov ecx, dword [ebx + 0x1c]
push str.Microsoft_Windows_Server_2003
push 0x1f
push ecx
call fcn.004565a4
add esp, 0xc
jmp 0x418906
push ecx
push 5
jmp 0x4188f5
cmp edx, 6
push ecx
jne 0x4188f4
mov eax, dword [ebx + 0x1c]
push edx
push str.Microsoft_Windows_Vista___d._d_
push eax
call fcn.00458204
movzx ecx, word [esp + 0xb2]
movzx edx, word [esp + 0xb0]
mov eax, dword [esp + 0x24]
add esp, 0x10
push ecx
mov ecx, dword [esp + 0x14]
push edx
push eax
push ecx
mov ecx, ebx
call fcn.00418320
jmp 0x418906
push edx
mov edx, dword [ebx + 0x1c]
push str.Microsoft_Windows_NT_d._d
push edx
call fcn.00458204
add esp, 0x10
mov al, byte [esp + 0xa6]
cmp al, 1
jne 0x4189e8
mov eax, dword [esp + 0x10]
cmp eax, 4
jne 0x41895f
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418924
mov ecx, dword [str.Workstation_4.0]
mov dword [eax], ecx
mov edx, dword [0x472b08]
mov dword [eax + 4], edx
mov ecx, dword [0x472b0c]
mov dword [eax + 8], ecx
mov edx, dword [0x472b10]
mov dword [eax + 0xc], edx
mov cl, byte [0x472b14]
mov byte [eax + 0x10], cl
jmp 0x418c96
cmp eax, 5
jne 0x418c96
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
test dword [esp + 0xa4], 0x200
je 0x4189b4
jmp 0x418980
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418980
mov edx, dword [str.Home_Edition]
mov dword [eax], edx
mov ecx, dword [0x472af8]
mov dword [eax + 4], ecx
mov edx, dword [0x472afc]
mov dword [eax + 8], edx
mov cx, word [0x472b00]
mov word [eax + 0xc], cx
jmp 0x418c96
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4189b4
mov edx, dword [str.Professional]
mov dword [eax], edx
mov ecx, dword [0x472ae8]
mov dword [eax + 4], ecx
mov edx, dword [0x472aec]
mov dword [eax + 8], edx
mov cx, word [0x472af0]
mov word [eax + 0xc], cx
jmp 0x418c96
cmp al, 3
je 0x4189f4
cmp al, 2
jne 0x418c96
mov eax, dword [esp + 0x10]
cmp eax, 5
jne 0x418c3d
mov eax, dword [esp + 0x14]
cmp eax, 2
jne 0x418b74
mov eax, dword [esp + 0xa4]
test al, al
jns 0x418a5b
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
nop
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418a20
mov edx, dword [str.Datacenter_Edition]
mov dword [eax], edx
mov ecx, dword [0x472ad4]
mov dword [eax + 4], ecx
mov edx, dword [0x472ad8]
mov dword [eax + 8], edx
mov ecx, dword [0x472adc]
mov dword [eax + 0xc], ecx
mov edx, dword [0x472ae0]
mov dword [eax + 0x10], edx
jmp 0x418c96
test al, 2
je 0x418aa0
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418a65
mov ecx, dword [str.Enterprise_Edition]
mov dword [eax], ecx
mov edx, dword [0x472ac0]
mov dword [eax + 4], edx
mov ecx, dword [0x472ac4]
mov dword [eax + 8], ecx
mov edx, dword [0x472ac8]
mov dword [eax + 0xc], edx
mov ecx, dword [0x472acc]
mov dword [eax + 0x10], ecx
jmp 0x418c96
cmp ax, 0x400
jne 0x418ae2
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418ab0
mov edx, dword [str.Web_Edition]
mov dword [eax], edx
mov ecx, dword [0x472ab0]
mov dword [eax + 4], ecx
mov edx, dword [0x472ab4]
mov dword [eax + 8], edx
mov cl, byte [0x472ab8]
mov byte [eax + 0xc], cl
jmp 0x418c96
cmp ax, 1
mov eax, dword [ebx + 0x1c]
jne 0x418b34
add eax, 0xffffffff
mov edi, edi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418af0
mov edx, dword [str.Small_Business_Edition]
mov dword [eax], edx
mov ecx, dword [0x472a98]
mov dword [eax + 4], ecx
mov edx, dword [0x472a9c]
mov dword [eax + 8], edx
mov ecx, dword [0x472aa0]
mov dword [eax + 0xc], ecx
mov edx, dword [0x472aa4]
mov dword [eax + 0x10], edx
mov ecx, dword [0x472aa8]
mov dword [eax + 0x14], ecx
jmp 0x418c96
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418b37
mov edx, dword [str.Standard_Edition]
mov dword [eax], edx
mov ecx, dword [0x472a84]
mov dword [eax + 4], ecx
mov edx, dword [0x472a88]
mov dword [eax + 8], edx
mov ecx, dword [0x472a8c]
mov dword [eax + 0xc], ecx
mov dx, word [0x472a90]
mov word [eax + 0x10], dx
jmp 0x418c96
test eax, eax
jne 0x418d52
mov al, byte [esp + 0xa4]
test al, al
jns 0x418bd6
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
lea ecx, [ecx]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418b90
mov ecx, dword [str.Datacenter_Server]
mov dword [eax], ecx
mov edx, dword [0x472a70]
mov dword [eax + 4], edx
mov ecx, dword [0x472a74]
mov dword [eax + 8], ecx
mov edx, dword [0x472a78]
mov dword [eax + 0xc], edx
mov cx, word [0x472a7c]
mov word [eax + 0x10], cx
mov dl, byte [0x472a7e]
mov byte [eax + 0x12], dl
jmp 0x418c96
test al, 2
mov eax, dword [ebx + 0x1c]
je 0x418c18
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418be0
mov ecx, dword [str.Advanced_Server]
mov dword [eax], ecx
mov edx, dword [0x472a5c]
mov dword [eax + 4], edx
mov ecx, dword [0x472a60]
mov dword [eax + 8], ecx
mov edx, dword [0x472a64]
mov dword [eax + 0xc], edx
mov cl, byte [0x472a68]
mov byte [eax + 0x10], cl
jmp 0x418c96
add eax, 0xffffffff
jmp 0x418c20
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418c20
mov edx, dword [str.Server]
mov dword [eax], edx
mov ecx, dword [0x472a54]
mov dword [eax + 4], ecx
jmp 0x418c96
cmp eax, 4
ja 0x418c96
test byte [esp + 0xa4], 2
je 0x418c6c
push edi
mov edi, dword [ebx + 0x1c]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x418c53
mov ecx, 8
mov esi, str.Server_4.0__Enterprise_Edition
rep movsd dword es:[edi], dword [esi]
pop edi
jmp 0x418c96
mov eax, dword [ebx + 0x1c]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418c72
mov edx, dword [str.Server_4.0]
mov dword [eax], edx
mov ecx, dword [0x472a28]
mov dword [eax + 4], ecx
mov edx, dword [0x472a2c]
mov dword [eax + 8], edx
cmp dword [esp + 0x10], 4
jne 0x418d52
push str.Service_Pack_6
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x418d52
lea ecx, [esp + 8]
push ecx
push 1
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x418d11
movzx edx, word [esp + 0x18]
push edx
lea eax, [esp + 0xac]
push str.Service_Pack_6a__Build__d_
push eax
call fcn.00458204
mov edx, dword [ebx + 0x20]
lea ecx, [esp + 0xb4]
push ecx
push edx
call fcn.00458204
mov edx, dword [esp + 0x1c]
add esp, 0x14
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x418e5f
movzx eax, word [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0xb0]
push str._s__Build__d_
push edx
call fcn.00458204
mov ecx, dword [ebx + 0x20]
lea eax, [esp + 0xb8]
push eax
push ecx
call fcn.00458204
mov edx, dword [esp + 0x20]
add esp, 0x18
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x418e5f
movzx eax, word [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0xb0]
push str._s__Build__d_
push edx
call fcn.00458204
mov ecx, dword [ebx + 0x20]
lea eax, [esp + 0xb8]
push eax
push ecx
call fcn.00458204
add esp, 0x18
jmp 0x418e5f
cmp edx, 4
jne 0x418e3f
test ecx, ecx
jne 0x418de7
mov edx, dword [ebx + 0x1c]
push str.Microsoft_Windows_95
push 0x15
push edx
call fcn.004565a4
mov al, byte [esp + 0x2d]
add esp, 0xc
cmp al, 0x43
je 0x418db8
cmp al, 0x42
jne 0x418e5f
mov ebx, dword [ebx + 0x1c]
add ebx, 0xffffffff
mov edi, edi
mov al, byte [ebx + 1]
add ebx, 1
test al, al
jne 0x418dc0
mov eax, dword [str._OSR2]
mov dword [ebx], eax
mov cx, word [0x472990]
mov word [ebx + 4], cx
mov dl, byte [0x472992]
mov byte [ebx + 6], dl
jmp 0x418e5f
cmp ecx, 0xa
jne 0x418e2d
mov eax, dword [ebx + 0x1c]
push str.Microsoft_Windows_98
push 0x15
push eax
call fcn.004565a4
add esp, 0xc
cmp byte [esp + 0x21], 0x41
jne 0x418e5f
mov ebx, dword [ebx + 0x1c]
add ebx, 0xffffffff
lea esp, [esp]
mov al, byte [ebx + 1]
add ebx, 1
test al, al
jne 0x418e10
mov ecx, dword [str._SE]
mov dword [ebx], ecx
mov dl, byte [0x472970]
mov byte [ebx + 4], dl
jmp 0x418e5f
cmp ecx, 0x5a
jne 0x418e5f
mov eax, dword [ebx + 0x1c]
push str.Microsoft_Windows_Millennium_Edition
push 0x26
push eax
jmp 0x418e57
mov ecx, dword [ebx + 0x1c]
push str.Microsoft_Windows_9x
push 0x16
push ecx
jmp 0x418e57
mov edx, dword [ebx + 0x1c]
push str.Microsoft_Win32s
push 0x11
push edx
call fcn.004565a4
add esp, 0xc
mov ecx, dword [esp + 0x1a8]
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004563cf
add esp, 0x1a4
ret