Function at 0x40403e
Capabilities:
Check os version
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7dc
mov eax, dword [0x40e050]
xor eax, esp
mov dword [esp + 0x7d8], eax
push ebx
xor eax, eax
push esi
push edi
lea edi, [esp + 0x4c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [esp + 0x40]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [esp + 0x24], ecx
xor ecx, ecx
mov ebx, 0x11c
push ebx
stosd dword es:[edi], eax
push ecx
lea eax, [esp + 0xb0]
push eax
mov esi, ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x34], ecx
call fcn.00409ce0
add esp, 0xc
lea eax, [esp + 0x60]
push 0x44
push esi
push eax
call fcn.00409ce0
xor eax, eax
lea edi, [esp + 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
push 0x208
xor edi, edi
lea eax, [esp + 0x1cc]
push edi
push eax
call fcn.00409ce0
add esp, 0xc
lea eax, [esp + 0x3d0]
push 0x410
push edi
push eax
call fcn.00409ce0
add esp, 0xc
push 0x402b54
call fcn.004055c0
pop ecx
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], ebx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40413f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40412d
movzx esi, si
or esi, 0x80070000
push 0x402b88
push esi
call fcn.004055e9
pop ecx
pop ecx
jmp 0x404506
cmp dword [esp + 0xac], 6
jae 0x404155
push 0x402bb8
call fcn.004055c0
jmp 0x404139
lea ecx, [esp + 0x1c]
call fcn.0040453c
mov esi, eax
test esi, esi
jns 0x404175
push 0x402c10
push esi
call fcn.004055e9
pop ecx
jmp 0x4044c8
push 1
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x4041a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40419b
movzx esi, si
or esi, 0x80070000
push 0x402c70
jmp 0x404169
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x10]
call fcn.0040460c
mov esi, eax
test esi, esi
jns 0x4041bc
push 0x402ce0
jmp 0x404169
push edi
mov edi, dword [esp + 0x14]
push edi
push 1
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x4041f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4041e8
movzx esi, si
or esi, 0x80070000
push 0x402d28
jmp 0x4042db
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0x402a98
lea eax, [esp + 0x50]
push 0
mov dword [esp + 0x4c], eax
push 1
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x50], 0xc
call esi
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40423f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x404235
movzx esi, si
or esi, 0x80070000
push 0x402d8c
jmp 0x4042db
push 0x402af8
push 0
push 1
lea eax, [esp + 0x4c]
push eax
call esi
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x404273
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40426c
movzx esi, si
or esi, 0x80070000
push 0x402dc8
jmp 0x4042db
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x18]
call fcn.00404838
mov esi, eax
test esi, esi
jns 0x40428d
push 0x402e10
jmp 0x4042db
push 0x402e50
call fcn.004055c0
pop ecx
lea ecx, [esp + 0x1c8]
call fcn.00404b31
mov esi, eax
test esi, esi
jne 0x4044cd
lea eax, [esp + 0x1c8]
push eax
push 0x402e98
lea eax, [esp + 0x3d8]
push 0x208
push eax
call fcn.00403fd5
mov esi, eax
add esp, 0x10
test esi, esi
jns 0x4042e8
push 0x402f08
push esi
call fcn.004055e9
pop ecx
pop ecx
jmp 0x4044cd
lea eax, [esp + 0x3d0]
push eax
lea eax, [esp + 0x1cc]
push eax
push 0x402f60
call fcn.004055c0
add esp, 0xc
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x64]
push eax
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
lea eax, [esp + 0x3f0]
push eax
lea eax, [esp + 0x1ec]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x404364
call edi
mov esi, eax
test esi, esi
jle 0x404348
movzx esi, si
or esi, 0x80070000
push 0x402fc0
push esi
call fcn.004055e9
pop ecx
pop ecx
mov ecx, dword [esp + 0x24]
mov dword [ecx], 1
jmp 0x4043f9
push 0x403008
call fcn.004055c0
pop ecx
push 0xffffffffffffffff
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40439e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x404394
movzx esi, si
or esi, 0x80070000
push 0x403058
jmp 0x404169
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x4043d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4043c6
movzx esi, si
or esi, 0x80070000
push 0x4030c0
jmp 0x404169
push dword [esp + 0x14]
push 0x403118
call fcn.004055c0
mov eax, dword [esp + 0x1c]
pop ecx
pop ecx
cmp eax, 0xbc2
jne 0x4043f3
mov dword [esp + 0x28], 1
mov ecx, dword [esp + 0x24]
mov dword [ecx], eax
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x28], 0
mov eax, dword [esp + 0x2c]
jne 0x404413
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x404439
call edi
mov esi, eax
test esi, esi
jle 0x40442f
movzx esi, si
or esi, 0x80070000
push 0x403160
jmp 0x404169
push 0xffffffffffffffff
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x404464
call edi
mov esi, eax
test esi, esi
jle 0x40445a
movzx esi, si
or esi, 0x80070000
push 0x4031a0
jmp 0x404169
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x404492
call edi
mov esi, eax
test esi, esi
jle 0x404488
movzx esi, si
or esi, 0x80070000
push 0x4031f8
jmp 0x404169
push dword [esp + 0x14]
push 0x403240
call fcn.004055c0
cmp dword [esp + 0x1c], 2
pop ecx
pop ecx
jne 0x4044c9
call fcn.00404a01
mov esi, eax
test esi, esi
jns 0x4044be
push 0x403288
jmp 0x404169
push 0x4032cc
call fcn.004055c0
pop ecx
mov edi, dword [esp + 0x10]
cmp dword [esp + 0x1c], 0
je 0x4044da
push dword [esp + 0x1c]
call ebx
test edi, edi
je 0x4044ee
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4044f9
push eax
call ebx
cmp dword [esp + 0x18], 0
je 0x404506
push dword [esp + 0x18]
call ebx
cmp dword [esp + 0x30], 0
je 0x404513
push dword [esp + 0x30]
call ebx
cmp dword [esp + 0x34], 0
je 0x404520
push dword [esp + 0x34]
call ebx
mov ecx, dword [esp + 0x7e4]
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.00405a7b
mov esp, ebp
pop ebp
ret