Function at 0x40cdd0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.Windows_Undefined
push 0x80
push 0x430138
xor esi, esi
mov dword [0x42f1e8], 0xffffffff
mov ebx, str.32_bit
call fcn.00413978
push 0x9c
lea eax, [ebp - 0x148]
push esi
push eax
call fcn.004198c0
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0x148]
add esp, 0x18
mov dword [ebp - 0x148], 0x9c
push eax
call edi
test eax, eax
jne 0x40ce6d
push 0x9c
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.004198c0
add esp, 0xc
mov dword [ebp - 0x148], 0x94
lea eax, [ebp - 0x148]
push eax
call edi
test eax, eax
je 0x40d29d
cmp dword [ebp - 0x138], 2
jne 0x40d04c
mov edi, dword [ebp - 0x144]
cmp edi, 6
ja 0x40ce9a
jne 0x40cf1d
mov ebx, dword [ebp - 0x140]
cmp ebx, 2
jb 0x40cf2c
push 1
push 2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov edi, dword [ebp - 0x144]
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x14c], edx
cmp edi, 9
ja 0x40cf1d
mov ebx, dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
jmp 0x40ced0
push 0x9c
lea eax, [ebp - 0xa8]
push 0
push eax
call fcn.004198c0
add esp, 0xc
mov dword [ebp - 0xa8], 0x9c
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xa4], edi
push dword [ebp - 0x14c]
push dword [ebp - 0x150]
push 2
push eax
call ebx
test eax, eax
jne 0x40cf65
inc edi
cmp edi, 9
jbe 0x40ced0
mov edi, dword [ebp - 0x144]
mov ebx, dword [ebp - 0x140]
cmp edi, 0xf
ja 0x40d047
cmp ebx, 0xf
ja 0x40d047
mov al, 1
cmp al, byte [ebp - 0xae]
sbb ecx, ecx
shl edi, 4
or edi, ebx
inc ecx
mov dword [0x42f1e8], edi
lea eax, [edi - 0x51]
cmp eax, 0x5f
ja case.0x40cf5e.83
movzx eax, byte [eax + 0x40d2d8]
jmp dword [eax*4 + 0x40d2b0]
cmp dword [ebp - 0x144], edi
jae 0x40cf79
mov dword [ebp - 0x144], edi
mov dword [ebp - 0x140], esi
push 1
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov ebx, dword [ebp - 0x140]
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x150], edx
cmp ebx, 9
ja 0x40d002
mov edi, dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
jmp 0x40cfb0
push 0x9c
lea eax, [ebp - 0xa8]
push 0
push eax
call fcn.004198c0
add esp, 0xc
mov dword [ebp - 0xa8], 0x9c
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xa0], ebx
push dword [ebp - 0x150]
push dword [ebp - 0x14c]
push 1
push eax
call edi
test eax, eax
jne 0x40cffc
inc ebx
cmp ebx, 9
jbe 0x40cfb0
jmp 0x40cf17
mov dword [ebp - 0x140], ebx
mov edi, dword [ebp - 0x144]
jmp 0x40cf23
mov esi, 0x42b230
jmp 0x40d047
test ecx, ecx
je 0x40d01f
mov esi, str.XP_64
jmp 0x40d047
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
mov esi, str.Server_2003
mov ecx, str.Server_2003_R2
cmovne esi, ecx
jmp 0x40d047
mov esi, str.Vista
mov eax, str.Server_2008
test ecx, ecx
cmove esi, eax
mov ebx, str.32_bit
push 0x42ae44
push str.kernel32
mov dword [ebp - 0x14c], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x40d083
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
cmp dword [ebp - 0x14c], 0
lea eax, [ebp - 0x154]
push eax
movzx eax, word [ebp - 0xb2]
mov edi, str.64_bit
push eax
movzx eax, word [ebp - 0xb4]
cmove edi, ebx
push eax
push dword [ebp - 0x140]
push dword [ebp - 0x144]
call dword [sym.imp.KERNEL32.dll_GetProductInfo]
push edi
test esi, esi
jne 0x40d19a
push dword [ebp - 0x140]
cmp dword [ebp - 0x138], 2
mov eax, 0x42b30c
push dword [ebp - 0x144]
mov ecx, 0x42b310
cmovne eax, ecx
push eax
push str._s__u._u__s
jmp 0x40d205
mov esi, 0x42b26c
mov eax, str.Server_2008_R2
jmp 0x40d042
mov esi, 0x42b280
mov eax, str.Server_2012
jmp 0x40d042
mov esi, 0x42b290
mov eax, str.Server_2012_R2
jmp 0x40d042
mov esi, str.10__Preview_1_
mov eax, str.Server_10__Preview_1_
jmp 0x40d042
mov eax, dword [ebp - 0x13c]
cmp eax, 0x4e20
jae 0x40d162
mov ebx, str.32_bit
test ecx, ecx
je 0x40d14b
mov esi, 0x42b2cc
jmp 0x40d04c
cmp eax, 0x4563
mov esi, str.Server_2016
mov ecx, str.Server_2019
cmovae esi, ecx
jmp 0x40d04c
mov dword [0x42f1e8], 0xb0
mov esi, 0x42b2e8
mov eax, str.Server_2022
jmp 0x40d042
mov ebx, str.32_bit
cmp edi, 0x51
jge 0x40d190
mov dword [0x42f1e8], esi
jmp 0x40d04c
mov esi, str.12_or_later
jmp 0x40d04c
mov ax, word [ebp - 0xb2]
test ax, ax
je 0x40d1ba
movzx eax, ax
push eax
movzx eax, word [ebp - 0xb4]
push eax
push esi
push str._s_SP_u._u__s
jmp 0x40d205
mov ax, word [ebp - 0xb4]
test ax, ax
je 0x40d1e1
movzx eax, ax
push eax
push esi
push str._s_SP_u__s
push 0x7f
push 0x430138
call fcn.004136cf
add esp, 0x18
jmp 0x40d214
mov edx, dword [ebp - 0x154]
mov ecx, edx
call fcn.0040c830
push eax
test edx, edx
mov eax, 0x42b33c
mov ecx, 0x42ae33
cmove eax, ecx
push eax
push esi
push str._s_s_s___s
push 0x7f
push 0x430138
call fcn.004136cf
add esp, 0x1c
cmp dword [0x42f1e8], 0x62
mov eax, dword [ebp - 0x13c]
mov dword [0x42f20c], eax
jl 0x40d29d
push ecx
lea eax, [ebp - 0x150]
push eax
push ecx
call fcn.0040cbc0
mov ecx, 0x430138
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d241
sub ecx, edx
mov eax, 0x7f
sub eax, ecx
lea edx, [ecx + 0x430138]
mov ecx, dword [ebp - 0x150]
test ecx, ecx
jle 0x40d288
push ecx
push dword [0x42f20c]
push str.__Build__d._d_
push eax
push edx
call fcn.004136cf
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
push dword [0x42f20c]
push str.__Build__d_
push eax
push edx
call fcn.004136cf
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004136c0
mov esp, ebp
pop ebp
ret