Function at 0x407958
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
push ebx
push esi
push edi
push str.Windows
mov edi, edx
mov esi, ecx
call fcn.0040349c
push pe_nt_image_headers32
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.0041cce0
add esp, 0xc
mov dword [ebp - 0x124], 0x11c
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x4079aa
xor al, al
jmp 0x407ba9
mov ecx, dword [ebp - 0x11c]
mov edx, dword [ebp - 0x120]
test edi, edi
je 0x4079c1
imul eax, edx, 0x64
add eax, ecx
mov dword [edi], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x4079d0
mov eax, dword [ebp - 0x118]
mov dword [edi], eax
xor ebx, ebx
inc ebx
cmp edx, 6
jne 0x407a20
sub ecx, 0
je 0x407a14
sub ecx, ebx
je 0x407a08
sub ecx, ebx
je 0x4079fc
sub ecx, ebx
jne 0x407a8c
mov eax, str.Windows_8.1
mov ecx, str.Windows_Server_2012_R2
jmp 0x407a7e
mov eax, str.Windows_8
mov ecx, str.Windows_Server_2012
jmp 0x407a7e
mov eax, str.Windows_7
mov ecx, str.Windows_Server_2008_R2
jmp 0x407a7e
mov eax, str.Windows_Vista
mov ecx, str.Windows_Server_2008
jmp 0x407a7e
cmp edx, 0xa
jne 0x407a6f
cmp byte [ebp - 0xa], bl
jne 0x407a43
cmp dword [ebp - 0x118], 0x55f0
mov eax, str.Windows_10
mov ecx, str.Windows_11
cmovae eax, ecx
jmp 0x407a84
cmp dword [ebp - 0x118], 0x4f7c
jb 0x407a56
mov eax, str.Windows_Server_2022
jmp 0x407a84
cmp dword [ebp - 0x118], 0x3839
mov eax, str.Windows_Server_2019
mov ecx, str.Windows_Server_2016
cmovbe eax, ecx
jmp 0x407a84
cmp edx, 0xb
jne 0x407a8c
mov eax, str.Windows_11
mov ecx, str.Windows_Server_2022
cmp byte [ebp - 0xa], bl
cmovne eax, ecx
push eax
mov ecx, esi
call fcn.0040349c
and dword [ebp - 0x22c], 0
lea eax, [ebp - 0x224]
mov dword [ebp - 0x230], eax
xor eax, eax
cmp word [ebp - 0x110], ax
mov word [ebp - 0x224], ax
movzx eax, word [ebp - 0x118]
mov dword [ebp - 0x228], 0x80
mov dword [ebp - 0x234], 0x46fc48
push eax
jne 0x407ae3
lea eax, [ebp - 0x234]
push 0x46fc4c
push eax
call fcn.004011fb
add esp, 0xc
jmp 0x407afe
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x234]
push str.__s_build__d
push eax
call fcn.004011fb
add esp, 0x10
mov edx, dword [esi + 4]
test edx, edx
je 0x407b45
mov ecx, dword [ebp - 0x22c]
test ecx, ecx
je 0x407b45
mov edi, dword [esi + 8]
lea eax, [edi + ecx]
cmp eax, dword [esi + 0xc]
jae 0x407b45
lea eax, [ecx + ecx]
push eax
push dword [ebp - 0x230]
lea eax, [edx + edi*2]
push eax
call fcn.0041c760
mov eax, dword [ebp - 0x22c]
add esp, 0xc
add dword [esi + 8], eax
xor edx, edx
mov ecx, dword [esi + 8]
mov eax, dword [esi + 4]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x234]
call fcn.0040791d
test al, al
je 0x407ba7
push str._on
mov ecx, esi
call fcn.00403846
mov edx, dword [esi + 4]
test edx, edx
je 0x407ba7
mov ecx, dword [ebp - 0x22c]
test ecx, ecx
je 0x407ba7
mov edi, dword [esi + 8]
lea eax, [edi + ecx]
cmp eax, dword [esi + 0xc]
jae 0x407ba7
lea eax, [ecx + ecx]
push eax
push dword [ebp - 0x230]
lea eax, [edx + edi*2]
push eax
call fcn.0041c760
mov ecx, dword [ebp - 0x22c]
add esp, 0xc
add dword [esi + 8], ecx
mov edx, dword [esi + 8]
mov ecx, dword [esi + 4]
xor esi, esi
mov word [ecx + edx*2], si
mov al, bl
pop edi
pop esi
pop ebx
leave
ret