Function at 0x40a900
Capabilities:
Check os version

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x26c
mov ebx, dword [esp + 0x280]
test ebx, ebx
je 0x40abe0
lea esi, [esp + 0x30]
xor eax, eax
mov ecx, 0x45
mov dword [esp + 0x2c], 0
mov edi, esi
rep stosd dword es:[edi], eax
mov dword [esp + 0x30], 0x114
mov dword [esp], str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
sub esp, 4
test eax, eax
je 0x40ab88
mov dword [esp + 4], str.RtlGetVersion
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 8
test eax, eax
je 0x40ab88
mov dword [esp], esi
call eax
sub esp, 4
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x40ab88
lea eax, [esp + 0x2c]
lea edi, [esp + 0x144]
mov dword [esp + 4], eax
lea eax, [esp + 0x44]
mov dword [esp], eax
call fcn.0040be20
mov edx, dword [esp + 0x1c]
mov ecx, 0x47
mov esi, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
mov eax, edx
rep stosd dword es:[edi], eax
mov byte [esp + 0x25e], 1
mov dword [esp + 0x144], 0x11c
mov dword [esp + 0xc], 1
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], 0
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
sub esp, 0x10
mov dword [esp + 8], eax
lea eax, [esp + 0x144]
mov dword [esp + 0xc], edx
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
sub esp, 0x10
test eax, eax
jne 0x40aac0
cmp esi, 2
sete dl
cmp ebp, 5
jne 0x40aa2a
mov eax, str.Windows_Server_2003__R2_
test dl, dl
jne 0x40aa66
cmp ebp, 6
sete byte [esp + 0x1c]
test esi, esi
movzx ecx, byte [esp + 0x1c]
sete al
mov edi, eax
test cl, cl
je 0x40aa4d
mov ecx, edi
mov eax, str.Windows_Server_2008
test cl, cl
jne 0x40aa66
cmp esi, 1
jne 0x40ab98
cmp byte [esp + 0x1c], 0
mov eax, str.Windows_Server_2008_R2
je 0x40ab98
mov dword [esp], ebx
add ebx, 0x90
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x2c]
mov dword [ebx - 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [ebx - 0xc], eax
mov eax, dword [esp + 0x3c]
mov dword [ebx - 8], eax
mov eax, dword [esp + 0x40]
mov dword [ebx - 4], eax
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_strcpy
mov dword [esp], esi
call sub.msvcrt.dll_free
add esp, 0x26c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ebp, 5
sete dl
test esi, esi
sete byte [esp + 0x1c]
movzx ecx, byte [esp + 0x1c]
test dl, dl
je 0x40aadf
mov eax, str.Windows_2000
test cl, cl
jne 0x40aa66
cmp esi, 1
sete al
mov edi, eax
test dl, dl
je 0x40aafa
mov ecx, edi
mov eax, str.Windows_XP
test cl, cl
jne 0x40aa66
cmp esi, 2
sete al
mov ecx, eax
test dl, dl
je 0x40ab13
mov eax, str.Windows_XP_64_bit
test cl, cl
jne 0x40aa66
cmp ebp, 6
sete dl
cmp byte [esp + 0x1c], 0
je 0x40ab2d
mov eax, str.Windows_Vista
test dl, dl
jne 0x40aa66
mov eax, edi
test al, al
je 0x40ab40
mov eax, str.Windows_7
test dl, dl
jne 0x40aa66
test cl, cl
je 0x40ab51
mov eax, str.Windows_8
test dl, dl
jne 0x40aa66
cmp esi, 3
jne 0x40ab63
mov eax, str.Windows_8.1
test dl, dl
jne 0x40aa66
cmp ebp, 0xa
jne 0x40ab78
cmp byte [esp + 0x1c], 0
mov eax, str.Windows_10
jne 0x40aa66
mov eax, str.Unknown_client_version
jmp 0x40aa66
add esp, 0x26c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
test dl, dl
je 0x40abac
cmp byte [esp + 0x1c], 0
mov eax, str.Windows_Server_2012
jne 0x40aa66
cmp esi, 3
jne 0x40abc1
cmp byte [esp + 0x1c], 0
mov eax, str.Windows_Server_2012_R2
jne 0x40aa66
cmp ebp, 0xa
jne 0x40abd5
mov ecx, edi
mov eax, str.Windows_Server_2016_2019
test cl, cl
jne 0x40aa66
mov eax, str.Unknown_server_version
jmp 0x40aa66
mov dword [esp + 8], str.os_version_get
mov dword [esp + 4], 0x51
mov dword [esp], str.src_main_util_os.c
call fcn.00409750
jmp 0x40a919