Function at 0x407723
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.00403489
push pe_nt_image_headers32
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.0041c9b0
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 0x407775
xor al, al
jmp 0x407974
mov ecx, dword [ebp - 0x11c]
mov edx, dword [ebp - 0x120]
test edi, edi
je 0x40778c
imul eax, edx, 0x64
add eax, ecx
mov dword [edi], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x40779b
mov eax, dword [ebp - 0x118]
mov dword [edi], eax
xor ebx, ebx
inc ebx
cmp edx, 6
jne 0x4077eb
sub ecx, 0
je 0x4077df
sub ecx, ebx
je 0x4077d3
sub ecx, ebx
je 0x4077c7
sub ecx, ebx
jne 0x407857
mov eax, str.Windows_8.1
mov ecx, str.Windows_Server_2012_R2
jmp 0x407849
mov eax, str.Windows_8
mov ecx, str.Windows_Server_2012
jmp 0x407849
mov eax, str.Windows_7
mov ecx, str.Windows_Server_2008_R2
jmp 0x407849
mov eax, str.Windows_Vista
mov ecx, str.Windows_Server_2008
jmp 0x407849
cmp edx, 0xa
jne 0x40783a
cmp byte [ebp - 0xa], bl
jne 0x40780e
cmp dword [ebp - 0x118], 0x55f0
mov eax, str.Windows_10
mov ecx, str.Windows_11
cmovae eax, ecx
jmp 0x40784f
cmp dword [ebp - 0x118], 0x4f7c
jb 0x407821
mov eax, str.Windows_Server_2022
jmp 0x40784f
cmp dword [ebp - 0x118], 0x3839
mov eax, str.Windows_Server_2019
mov ecx, str.Windows_Server_2016
cmovbe eax, ecx
jmp 0x40784f
cmp edx, 0xb
jne 0x407857
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.00403489
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], 0x46fc00
push eax
jne 0x4078ae
lea eax, [ebp - 0x234]
push 0x46fc04
push eax
call fcn.004011fb
add esp, 0xc
jmp 0x4078c9
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 0x407910
mov ecx, dword [ebp - 0x22c]
test ecx, ecx
je 0x407910
mov edi, dword [esi + 8]
lea eax, [edi + ecx]
cmp eax, dword [esi + 0xc]
jae 0x407910
lea eax, [ecx + ecx]
push eax
push dword [ebp - 0x230]
lea eax, [edx + edi*2]
push eax
call fcn.0041c430
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.004076e8
test al, al
je 0x407972
push str._on
mov ecx, esi
call fcn.0040380a
mov edx, dword [esi + 4]
test edx, edx
je 0x407972
mov ecx, dword [ebp - 0x22c]
test ecx, ecx
je 0x407972
mov edi, dword [esi + 8]
lea eax, [edi + ecx]
cmp eax, dword [esi + 0xc]
jae 0x407972
lea eax, [ecx + ecx]
push eax
push dword [ebp - 0x230]
lea eax, [edx + edi*2]
push eax
call fcn.0041c430
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