Function at 0x4020c0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xbc
mov eax, dword [0x422040]
xor eax, esp
mov dword [esp + 0xb8], eax
push ebx
mov ebx, ecx
mov byte [esp + 7], dl
push esi
push edi
xor esi, esi
lea edx, [esp + 0x1c]
mov ecx, dword [ebx + 8]
push 0xc0000000
add ecx, 8
mov dword [esp + 0x20], esi
call fcn.00402770
add esp, 4
test eax, eax
js 0x4022e9
mov eax, dword [ebx + 8]
mov edi, dword [eax + 0x180]
test edi, edi
je 0x4022e9
cmp dword [edi], esi
jne 0x4022e9
xor edx, edx
cmp dword [edi + 4], edx
jbe 0x4022e9
mov ebx, dword [ebx + 0xc]
lea ecx, [edi + 0x40]
mov eax, dword [ebx + 8]
cmp dword [ecx - 8], eax
jne 0x40215f
mov eax, dword [ebx + 0xc]
cmp dword [ecx - 4], eax
mov eax, dword [ebx + 8]
jne 0x40215f
mov eax, dword [ecx]
cmp eax, dword [ebx + 0x10]
jne 0x40215c
mov eax, dword [ecx + 4]
cmp eax, dword [ebx + 0x14]
jne 0x40215c
mov eax, dword [ecx + 8]
cmp eax, dword [ebx + 0x18]
je 0x402170
mov eax, dword [ebx + 8]
inc edx
add ecx, 0x90
cmp edx, dword [edi + 4]
jb 0x402135
jmp 0x4022e9
mov cl, byte [esp + 0xf]
lea eax, [edx + edx*8]
add eax, eax
push 0x90
push 0
mov byte [edi + eax*8 + 0x50], cl
mov byte [edi + eax*8 + 0x4c], 1
mov eax, dword [edi + 4]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x20], ebx
lea esi, [eax + eax*8]
lea eax, [esp + 0x34]
shl esi, 4
push eax
add esi, 0x30
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x28], 0x94
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4021fa
cmp dword [esp + 0x38], 2
jne 0x4021d6
cmp dword [esp + 0x2c], 5
ja 0x4021d6
cmp dword [esp + 0x30], 0
je 0x4021fa
push 0
push 0
push esi
push edi
push 0x7c054
lea eax, [esp + 0x34]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_ZwDeviceIoControlFile]
mov esi, eax
jmp 0x4022e4
cmp dword [edi], 0
je 0x402209
mov esi, 0xc0000001
jmp 0x4022e4
mov eax, dword [edi + 4]
shl eax, 5
add eax, 8
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x402230
mov esi, 0xc0000001
jmp 0x4022e4
mov ecx, dword [edi + 4]
mov eax, dword [edi + 8]
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov dword [esp + 0x10], 0
test ecx, ecx
je 0x4022b5
lea edx, [ebx + 0x10]
lea esi, [edi + 0x40]
nop dword [eax]
mov eax, dword [esi - 8]
lea esi, [esi + 0x90]
mov ecx, dword [esi - 0x94]
lea edx, [edx + 0x20]
mov dword [edx - 0x28], eax
mov eax, dword [esi - 0x90]
mov dword [edx - 0x20], eax
mov eax, dword [esi - 0x88]
mov dword [edx - 0x14], eax
movzx eax, byte [esi - 0x84]
mov byte [edx - 0xd], al
movzx eax, byte [esi - 0x80]
mov byte [edx - 0x10], al
movzx eax, byte [esi - 0x7f]
mov byte [edx - 0xf], al
movzx eax, byte [esi - 0x7e]
mov byte [edx - 0xe], al
mov eax, dword [esi - 0x7c]
mov dword [edx - 0x18], eax
mov eax, dword [esp + 0x10]
mov dword [edx - 0x24], ecx
inc eax
mov ecx, dword [esi - 0x8c]
mov dword [edx - 0x1c], ecx
mov dword [esp + 0x10], eax
cmp eax, dword [ebx]
jb 0x402250
push 0
push 0
push dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push ebx
push 0x7c010
push eax
push 0
push 0
push 0
push dword [esp + 0x3c]
call dword [sym.imp.ntdll.dll_ZwDeviceIoControlFile]
push ebx
mov esi, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
not esi
shr esi, 0x1f
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x402315
cmp eax, 0xffffffff
je 0x402315
push eax
call dword [sym.imp.ntdll.dll_ZwClose]
test eax, eax
jns 0x402315
push 0
push str.Ext2Close
push str.Failed_to_close_handle
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0xc4]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00416a63
mov esp, ebp
pop ebp
ret