Function at 0x406412
Capabilities:
Check os version
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
mov eax, dword [0x410004]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
js 0x40647a
and eax, 0xff
cmp eax, 6
jb 0x40647a
push 0x4027a0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40647a
push 0x4027bc
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40647a
xor eax, eax
mov ecx, esi
push eax
push eax
push 1
push eax
call dword [0x4121a8]
call esi
push 0
push 4
push 0
push 1
call fcn.0040f6e1
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_setvbuf]
add esp, 0x10
push 0
push 4
push 0
push 2
call fcn.0040f6e1
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_setvbuf]
xor eax, eax
push 0xc10
mov dword [esp + 0x224], eax
mov byte [esp + 0x24], al
mov dword [esp + 0x234], eax
mov dword [esp + 0x238], eax
mov dword [esp + 0x228], eax
call dword [sym.imp.msvcrt.dll_malloc]
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x406501
lea eax, [esp + 0x10]
push 0x4027d0
push eax
call fcn.00409fd2
pop ecx
pop ecx
lea edx, [esp + 0x10]
xor ecx, ecx
call fcn.0040956b
push 1
call dword [sym.imp.msvcrt.dll_exit]
xor ecx, ecx
xor eax, eax
mov word [edi + 0x80], ax
lea eax, [edi + 0x9b4]
push 0x4f
mov dword [edi + 0xa0], ecx
mov dword [edi + 0xa4], ecx
mov dword [edi + 0xa8], ecx
mov dword [edi + 0x10], ecx
mov dword [edi + 4], ecx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ecx
mov dword [edi + 0x40], ecx
mov dword [edi + 0x44], ecx
mov dword [edi + 0x5c], ecx
mov dword [edi + 0x68], ecx
mov dword [edi + 0x54], ecx
mov dword [edi + 0x58], ecx
mov dword [edi + 0x70], ecx
mov dword [edi + 0x84], ecx
mov byte [edi + 0xb04], cl
push 0x20
push eax
mov dword [edi + 0xac], ecx
mov dword [edi + 0xc0c], ecx
call sub.msvcrt.dll_memset
add esp, 0xc
mov byte [edi + 0xa03], 0
mov ecx, edi
call fcn.004090ed
push 0x4027ec
push 0x40211c
push 0x402800
lea esi, [edi + 0x1b4]
push 0x800
push esi
call fcn.0040dbc8
add esp, 0x14
push esi
push 0x40211c
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
lea edx, [esp + 0x10]
mov ecx, edi
call fcn.00404b39
mov ecx, edi
test eax, eax
jne 0x4065cb
lea edx, [esp + 0x10]
call fcn.0040956b
xor eax, eax
inc eax
jmp 0x406688
mov edx, dword [ebp + 8]
mov dword [edi + 8], eax
lea eax, [esp + 0x10]
push eax
push ebx
call fcn.00409148
test eax, eax
jne 0x4065e4
mov ecx, edi
jmp 0x4065ba
xor ebx, ebx
inc ebx
cmp dword [edi], ebx
jne 0x4065fd
push 0x402838
call dword [sym.imp.msvcrt.dll_printf]
xor eax, eax
jmp 0x406687
call dword [sym.imp.msvcrt.dll_clock]
mov dword [edi + 0x74], eax
mov eax, dword [edi]
dec eax
sub eax, 1
je 0x406620
sub eax, 1
jne 0x40664f
lea edx, [esp + 0x10]
mov ecx, edi
call fcn.00406941
jmp 0x40663e
lea edx, [esp + 0x10]
mov ecx, edi
call fcn.00409cb2
test eax, eax
jne 0x406633
mov eax, ebx
jmp 0x406688
lea edx, [esp + 0x10]
mov ecx, edi
call fcn.004066a2
test eax, eax
jne 0x40664f
lea edx, [esp + 0x10]
mov ecx, edi
call fcn.0040956b
jmp 0x40662f
mov ecx, dword [edi + 8]
xor ebx, ebx
cmp dword [edi + 0x38], ebx
setg bl
test ecx, ecx
je 0x406663
call fcn.0040eaef
mov ecx, dword [edi + 0x84]
test ecx, ecx
je 0x406672
call fcn.0040bceb
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x40667e
call fcn.0040a0ba
push edi
call dword [sym.imp.msvcrt.dll_free]
mov eax, ebx
pop ecx
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040f060
mov esp, ebp
pop ebp
ret