Function at 0x401340
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push 0xffffffffffffffff
push 0x40fd48
mov eax, dword fs:[0]
push eax
sub esp, 0xdc
mov eax, dword [0x417008]
xor eax, esp
mov dword [esp + 0xd4], eax
push esi
push edi
mov eax, dword [0x417008]
xor eax, esp
push eax
lea eax, [esp + 0xe8]
mov dword fs:[0], eax
mov esi, edx
mov edx, ecx
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x94], 7
mov dword [esp + 0x90], 0
mov word [esp + 0x80], ax
mov dword [esp + 0xf0], eax
mov dword [esp + 0xdc], 7
mov dword [esp + 0xd8], eax
mov word [esp + 0xc8], ax
cmp word [edx], ax
jne 0x4013d4
xor ecx, ecx
jmp 0x4013ef
mov ecx, edx
lea edi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4013e0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0xd0]
call fcn.00401d20
lea eax, [esp + 0xc8]
mov byte [esp + 0xf0], 1
push eax
mov edx, 0x4154f0
lea ecx, [esp + 0x9c]
call fcn.00402350
mov edx, eax
mov byte [esp + 0xf4], 2
lea ecx, [esp + 0xb4]
call fcn.004023f0
mov edi, eax
add esp, 4
lea eax, [esp + 0x80]
cmp eax, edi
je 0x40148a
cmp dword [esp + 0x94], 8
jb 0x40145d
push dword [esp + 0x80]
call fcn.00403270
add esp, 4
xor eax, eax
mov dword [esp + 0x94], 7
push edi
lea ecx, [esp + 0x84]
mov dword [esp + 0x94], 0
mov word [esp + 0x84], ax
call fcn.00401a50
cmp dword [esp + 0xc4], 8
jb 0x4014a3
push dword [esp + 0xb0]
call fcn.00403270
add esp, 4
xor eax, eax
mov dword [esp + 0xc4], 7
cmp dword [esp + 0xac], 8
mov dword [esp + 0xc0], 0
mov word [esp + 0xb0], ax
jb 0x4014dc
push dword [esp + 0x98]
call fcn.00403270
add esp, 4
xor eax, eax
mov dword [esp + 0xac], 7
mov byte [esp + 0xf0], al
cmp dword [esp + 0xdc], 8
mov dword [esp + 0xa8], 0
mov word [esp + 0x98], ax
jb 0x40151c
push dword [esp + 0xc8]
call fcn.00403270
add esp, 4
test esi, esi
je 0x4015da
mov ecx, esi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401530
sub ecx, edx
sar ecx, 1
je 0x4015da
push esi
lea ecx, [esp + 0xb4]
call fcn.00401890
push eax
mov edx, 0x4154f4
mov byte [esp + 0xf4], 3
lea ecx, [esp + 0x9c]
call fcn.00402350
add esp, 4
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x8c]
mov byte [esp + 0xfc], 4
call fcn.00401c50
cmp dword [esp + 0xac], 8
jb 0x4015a1
push dword [esp + 0x98]
call fcn.00403270
add esp, 4
xor eax, eax
mov dword [esp + 0xac], 7
cmp dword [esp + 0xc4], 8
mov dword [esp + 0xa8], 0
mov word [esp + 0x98], ax
jb 0x4015da
push dword [esp + 0xb0]
call fcn.00403270
add esp, 4
push 0x44
lea eax, [esp + 0x38]
push 0
push eax
call fcn.0040a250
add esp, 0xc
mov dword [esp + 0x34], 0x44
cmp dword [esp + 0x94], 8
lea ecx, [esp + 0x24]
lea eax, [esp + 0x80]
xorps xmm0, xmm0
cmovae eax, dword [esp + 0x80]
push ecx
lea ecx, [esp + 0x38]
movdqa xmmword [esp + 0x28], xmm0
push ecx
push dword [esp + 0x24]
push 0
push 0
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x401650
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_process_failed__error__0x_08X_n
call fcn.004012c0
add esp, 8
xor al, al
jmp 0x401664
push dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x28]
call esi
mov al, 1
cmp dword [esp + 0x94], 8
mov byte [esp + 0x1b], al
jb 0x401685
push dword [esp + 0x80]
call fcn.00403270
mov al, byte [esp + 0x1f]
add esp, 4
mov ecx, dword [esp + 0xe8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0xd4]
xor ecx, esp
call fcn.004028ed
mov esp, ebp
pop ebp
ret