Function at 0x402090
Capabilities:
Check os version

Disassembly:
sub esp, 0x1a0
push ebx
mov ebx, dword [esp + 0x1a8]
push esi
push edi
test ebx, ebx
jne 0x4020b0
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1a0
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x9c
push eax
call esi
test eax, eax
jne 0x4020f3
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 0x94
push ecx
call esi
test eax, eax
jne 0x4020f3
pop edi
pop esi
pop ebx
add esp, 0x1a0
ret
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
sub eax, 0
push ebp
mov byte [ebx], 0
je 0x4022f9
dec eax
je 0x4021e4
dec eax
jne 0x402323
cmp ecx, 4
ja 0x402129
mov edi, str.Microsoft_Windows_NT
jmp 0x4022fe
cmp ecx, 5
jne 0x4021da
test edx, edx
jne 0x4021cb
mov edi, str.Microsoft_Windows_2000
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
push eax
push edx
lea edx, [esp + 0x2c]
push ecx
push edx
lea eax, [esp + 0xbc]
push str._s__Build__d._d._d__n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
lea edi, [esp + 0xac]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
pop ebp
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
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x1a0
ret
cmp edx, 1
jne 0x4021da
mov edi, str.Microsoft_Windows_XP
jmp 0x40213f
mov edi, str.Microsoft_Windows_XP_later
jmp 0x4022fe
cmp ecx, 4
jne 0x4022f2
test edx, edx
jne 0x40225a
mov edi, str.Microsoft_Windows_95
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [esp + 0x25]
mov ecx, ebp
and ecx, 3
cmp al, 0x43
rep movsb byte es:[edi], byte [esi]
je 0x40222b
cmp al, 0x42
jne 0x40232e
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 ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40232e
cmp edx, 0xa
jne 0x4022c1
mov edi, str.Microsoft_Windows_98
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [esp + 0x25]
mov ecx, ebp
and ecx, 3
cmp al, 0x41
rep movsb byte es:[edi], byte [esi]
jne 0x40232e
mov edi, 0x4422c8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40232e
cmp edx, 0x5a
jne 0x4022f2
mov edi, str.Microsoft_Windows_Me
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40232e
mov edi, str.Microsoft_Windows_Me_later
jmp 0x4022fe
mov edi, str.Microsoft_Win32s
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x14], 4
ja 0x402164
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
push eax
push edx
push ecx
lea edx, [esp + 0xb8]
push str._Build__d._d._d__n
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
lea edi, [esp + 0xac]
jmp 0x402196