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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40cdac
mov eax, dword fs:[0]
push eax
sub esp, 0x110
mov eax, dword [0x413034]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push esi
push edi
mov eax, dword [0x413034]
xor eax, esp
push eax
lea eax, [esp + 0x120]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, ecx
push 0x48
xor edi, edi
lea ecx, [esp + 0x28]
push edi
push ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], eax
call sub.MSVCR100.dll_memset
pxor xmm0, xmm0
movq qword [esp + 0x78], xmm0
movq qword [esp + 0x80], xmm0
push 0x90
lea edx, [esp + 0x90]
push edi
push edx
mov dword [esp + 0x140], edi
call sub.MSVCR100.dll_memset
add esp, 0x18
lea eax, [esp + 0x7c]
push eax
mov dword [esp + 0x80], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x80]
cmp eax, 6
jne 0x4013ce
cmp dword [esp + 0x84], 1
jae 0x4013d0
mov dword [esp + 0x14], edi
mov dword [esp + 0x24], 0x44
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x128], 1
test esi, esi
je 0x401538
test esi, 0xffff0000
jne 0x40153c
movzx esi, si
push esi
call fcn.004056f0
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x401555
lea edx, [esp + 0x1c]
push edx
mov eax, esi
call fcn.004044a0
jmp 0x401555
jbe 0x401368
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.InitializeProcThreadAttributeList
push str.kernel32.dll
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x401418
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x401405
and eax, 0xffff
or eax, 0x80070000
push 0x410d74
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], eax
call sub.MSVCR100.dll__CxxThrowException
push str.UpdateProcThreadAttribute
push str.kernel32.dll
call edi
push eax
call ebx
mov edi, eax
test edi, edi
jne 0x401454
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x401441
and eax, 0xffff
or eax, 0x80070000
push 0x410d74
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], eax
call sub.MSVCR100.dll__CxxThrowException
lea eax, [esp + 0x18]
push eax
push 0
push 1
push 0
mov dword [esp + 0x24], 0x80000
mov dword [esp + 0x28], 0
call esi
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4014a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40148d
and eax, 0xffff
or eax, 0x80070000
push 0x410d74
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], eax
call sub.MSVCR100.dll__CxxThrowException
push eax
call fcn.0040baed
add esp, 4
lea edx, [esp + 0x18]
push edx
push 0
push 1
push eax
mov dword [esp + 0x78], eax
call esi
test eax, eax
jne 0x4014e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4014d1
and eax, 0xffff
or eax, 0x80070000
mov dword [esp + 0x14], eax
push 0x410d74
lea eax, [esp + 0x18]
push eax
call sub.MSVCR100.dll__CxxThrowException
mov edx, dword [esp + 0x68]
push 0
push 0
push 2
lea ecx, [ebp + 8]
push ecx
push 0x20004
push 0
push edx
call edi
test eax, eax
jne 0x401527
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x401514
and eax, 0xffff
or eax, 0x80070000
mov dword [esp + 0x14], eax
push 0x410d74
lea eax, [esp + 0x18]
push eax
call sub.MSVCR100.dll__CxxThrowException
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x24], 0x48
jmp 0x401374
xor eax, eax
jmp 0x40154a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401541
sub eax, edx
push esi
lea ecx, [esp + 0x20]
push ecx
call fcn.00404770
lea esi, [esp + 0x1c]
mov byte [esp + 0x128], 2
call fcn.00402c50
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x128], 3
mov ebx, dword [esp + 0x1c]
push 0x40efae
push ebx
push str._s__s
lea edi, [esp + 0x24]
call fcn.00404870
mov esi, dword [esp + 0x24]
add esp, 0xc
cmp dword [esi - 4], 1
jle 0x4015ba
mov ecx, dword [esi - 0xc]
push ecx
mov edx, edi
push edx
call fcn.004060f0
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x28]
push ecx
push 0
push 0
push edx
push 1
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov edi, eax
mov eax, dword [esi - 8]
push eax
push esi
call dword [sym.imp.MSVCR100.dll_strnlen]
add esp, 8
test eax, eax
js 0x4016bf
cmp eax, dword [esi - 8]
jg 0x4016bf
mov dword [esi - 0xc], eax
mov byte [eax + esi], 0
test edi, edi
jne 0x40162f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40161c
and eax, 0xffff
or eax, 0x80070000
mov dword [esp + 0x14], eax
push 0x410d74
lea eax, [esp + 0x18]
push eax
call sub.MSVCR100.dll__CxxThrowException
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x6c]
mov dword [edx], ecx
lea eax, [esi - 0x10]
mov byte [esp + 0x128], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401661
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x128], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401685
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x24]
mov dword [esp + 0x128], 0xffffffff
call fcn.004016d0
mov eax, edi
mov ecx, dword [esp + 0x120]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.0040be38
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00407a00
int3