Function at 0x403630
Capabilities:
Check os version

Disassembly:
sub esp, 0x244
push ebx
push ebp
push esi
push edi
mov edi, 0x4a778c
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
mov ebx, dword [esp + 0x258]
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 0x4036a9
lea edx, [esp + 0x18]
mov dword [esp + 0x18], 0x94
push edx
call esi
test eax, eax
jne 0x4036a9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x244
ret
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x403a93
dec eax
je 0x40397d
dec eax
jne 0x403aba
mov edx, dword [esp + 0x1c]
cmp edx, 4
ja 0x4036f4
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 0x40372a
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x403882
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 [0x4a6cdc]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
lea edx, [esp + 0xd8]
push ecx
push edx
push 0
push 0
push str.ProductType
push eax
call dword [0x4a6cd8]
mov ecx, dword [esp + 0x10]
push ecx
call dword [0x4a6ce0]
lea edx, [esp + 0xd8]
push edx
push str.WINNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4037ae
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 + 0xd8]
push eax
push str.LANMANNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4037ed
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 + 0xd8]
push eax
push str.SERVERNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40382e
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]
dec edi
mov ecx, edx
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 + 0x138]
push str.__d._02d._04d__s_
push ecx
call fcn.00445f93
lea edi, [esp + 0x140]
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 0x403aae
cmp eax, 1
jne 0x4038ce
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 0x4038c4
mov edi, str.Home_Edition
jmp 0x403809
mov edi, str.Professional
jmp 0x403809
cmp eax, 2
jne 0x40372a
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x4038f1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x244
ret
push str.GetNativeSystemInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40382e
lea ecx, [esp + 0xb4]
push ecx
call eax
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x403922
mov edi, str.Windows_Server_2003_R2
jmp 0x403967
mov ax, word [esp + 0xb4]
cmp ax, 6
je 0x403936
cmp ax, 9
jne 0x403962
cmp byte [esp + 0xb2], 1
jne 0x403962
mov edi, str.Windows_XP_Professional_x64
or ecx, 0xffffffff
xor eax, eax
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
jmp 0x403829
mov edi, str.Windows_Server_2003
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
jmp 0x403822
cmp dword [esp + 0x1c], 4
jne 0x403aba
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4039e8
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 0x4039c5
cmp al, 0x42
jne 0x403aba
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 0x403aae
cmp eax, 0xa
jne 0x403a5a
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 0x403aba
mov edi, 0x48bec4
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, 0x244
ret
cmp eax, 0x5a
jne 0x403aba
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, 0x244
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, 0x244
ret