Function at 0x403640
Capabilities:
Check os version

Disassembly:
sub esp, 0x220
push ebx
push ebp
push esi
push edi
mov edi, 0x4a53ec
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
mov ebx, dword [esp + 0x234]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, 0x27
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x9c
push ecx
call esi
test eax, eax
jne 0x4036b9
lea edx, [esp + 0x18]
mov dword [esp + 0x18], 0x94
push edx
call esi
test eax, eax
jne 0x4036b9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x220
ret
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x4039f8
dec eax
je 0x4038e2
dec eax
jne 0x403a1f
mov edx, dword [esp + 0x1c]
cmp edx, 4
ja 0x403704
mov edi, str.Windows_NT
or ecx, 0xffffffff
xor eax, eax
mov ebp, 6
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp edx, 5
jne 0x40373a
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x403892
mov edi, str.Windows_2000
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, 7
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x10]
push eax
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
call dword [0x4a493c]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
lea edx, [esp + 0xb4]
push ecx
push edx
push 0
push 0
push str.ProductType
push eax
call dword [0x4a4938]
mov ecx, dword [esp + 0x10]
push ecx
call dword [0x4a4940]
lea edx, [esp + 0xb4]
push edx
push str.WINNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4037be
mov edi, str.Professional
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0xb4]
push eax
push str.LANMANNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4037fd
mov edi, str.Server
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0xb4]
push eax
push str.SERVERNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40383e
mov edi, str.Advanced_Server
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x2c]
and ecx, 0xffff
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push eax
lea ecx, [esp + 0x114]
push str.__d._02d._04d__s_
push ecx
call fcn.0044537b
lea edi, [esp + 0x11c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
jmp 0x403a13
cmp eax, 1
jne 0x40373a
mov edi, str.Windows_XP
or ecx, 0xffffffff
xor eax, eax
mov ebp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0xb0]
and ecx, 3
test ah, 2
rep movsb byte es:[edi], byte [esi]
je 0x4038d8
mov edi, str.Home_Edition
jmp 0x403819
mov edi, str.Professional
jmp 0x403819
cmp dword [esp + 0x1c], 4
jne 0x403a1f
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40394d
mov edi, str.Windows_95
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, 2
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x2d]
and ecx, 3
cmp al, 0x43
rep movsb byte es:[edi], byte [esi]
je 0x40392a
cmp al, 0x42
jne 0x403a1f
mov edi, str.OSR2
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
jmp 0x403a13
cmp eax, 0xa
jne 0x4039bf
mov edi, str.Windows_98
or ecx, 0xffffffff
xor eax, eax
mov ebp, 3
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x2d]
and ecx, ebp
cmp al, 0x41
rep movsb byte es:[edi], byte [esi]
jne 0x403a1f
mov edi, 0x489eb4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, ebp
mov ebp, 4
rep movsb byte es:[edi], byte [esi]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x220
ret
cmp eax, 0x5a
jne 0x403a1f
mov edi, str.Windows_ME
or ecx, 0xffffffff
xor eax, eax
mov ebp, 5
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x220
ret
mov edi, str.Win32s
or ecx, 0xffffffff
xor eax, eax
mov ebp, 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x220
ret