Function at 0x40c580
Capabilities:
Create process on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xc0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x54], ecx
mov eax, dword [edx]
test eax, eax
je 0x40c5e7
mov esi, edx
lea edi, [esp + 8]
add esi, 4
nop word [eax + eax]
mov ecx, edi
push eax
call fcn.004ee250
mov ecx, edi
push 0x51caf4
call fcn.004ee250
mov eax, dword [esi]
add esi, 4
test eax, eax
jne 0x40c5c0
mov cl, byte [esp + 8]
mov eax, dword [esp + 0xc]
jmp 0x40c5eb
xor eax, eax
xor ecx, ecx
mov edx, ecx
mov esi, dword [ebp + 8]
shr dl, 1
test cl, 1
lea ecx, [esp + 0x78]
movzx edx, dl
cmovne edx, eax
lea eax, [esp + 8]
dec edx
push eax
push edx
push 0
push eax
call fcn.004ef680
test byte [esp + 8], 1
jne 0x40c61e
mov word [esp + 8], 0
jmp 0x40c648
mov eax, dword [esp + 0x10]
mov byte [eax], 0
mov dword [esp + 0xc], 0
test byte [esp + 8], 1
je 0x40c648
push dword [esp + 0x10]
call fcn.00493cf0
add esp, 4
mov dword [esp + 8], 0
movsd xmm0, qword [esp + 0x78]
mov eax, dword [esp + 0x80]
test esi, esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xb0], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0xb8], 0
mov dword [esp + 0xb4], 0
mov dword [esp + 0x78], 0x44
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], 0
movsd qword [esp + 8], xmm0
xorps xmm0, xmm0
mov dword [esp + 0x10], eax
movaps xmmword [esp + 0x60], xmm0
je 0x40c8fc
mov edi, dword [esi]
test edi, edi
je 0x40c8fc
add esi, 4
jmp 0x40c7a0
push dword [esp + 0x20]
call fcn.00493cf0
add esp, 4
test byte [esp + 0x48], 1
je 0x40c8c7
push dword [esp + 0x50]
call fcn.00493cf0
add esp, 4
test byte [esp + 0x28], 1
jne 0x40c8ce
jmp 0x40c8da
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], 0
push edi
call sub.msvcrt.dll_strlen
add esp, 4
cmp eax, 0xfffffff0
jae 0x40ca3c
mov ebx, eax
cmp eax, 0xb
mov dword [esp + 0x5c], edi
jae 0x40c7f0
mov eax, ebx
lea edi, [esp + 0x29]
add al, bl
test ebx, ebx
mov byte [esp + 0x28], al
jne 0x40c81a
jmp 0x40c828
mov dword [esp + 0x58], esi
mov esi, ebx
add esi, 0x10
and esi, 0xfffffff0
push esi
call fcn.00493b40
add esp, 4
or esi, 1
mov dword [esp + 0x30], eax
mov edi, eax
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x58]
mov dword [esp + 0x2c], ebx
push ebx
push dword [esp + 0x60]
push edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [esp + 0x48], 0
mov byte [edi + ebx], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov word [esp + 0x48], 2
mov byte [esp + 0x4a], 0
lea ecx, [esp + 0x28]
push 1
lea eax, [esp + 0x4d]
push eax
call fcn.004ee270
mov ecx, dword [eax + 8]
mov dword [esp + 0x20], ecx
movsd xmm0, qword [eax]
movsd qword [esp + 0x18], xmm0
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
movzx eax, byte [esp + 0x18]
test al, 1
je 0x40c8a0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
jmp 0x40c8a6
shr eax, 1
lea edx, [esp + 0x19]
lea ecx, [esp + 0x38]
push eax
push edx
call fcn.004ee270
test byte [esp + 0x18], 1
jne 0x40c760
test byte [esp + 0x48], 1
jne 0x40c777
test byte [esp + 0x28], 1
je 0x40c8da
push dword [esp + 0x30]
call fcn.00493cf0
add esp, 4
mov edi, dword [esi]
add esi, 4
test edi, edi
jne 0x40c7a0
mov dl, byte [esp + 0x38]
mov ecx, dword [esp + 0x3c]
test byte [esp + 8], 1
jne 0x40c907
lea eax, [esp + 9]
jmp 0x40c90b
xor ecx, ecx
xor edx, edx
test byte [esp + 8], 1
je 0x40c8f6
mov eax, dword [esp + 0x10]
mov ebx, edx
shr bl, 1
test dl, 1
movzx esi, bl
cmove ecx, esi
test ecx, ecx
je 0x40c927
test dl, 1
jne 0x40c92b
lea ecx, [esp + 0x39]
jmp 0x40c92f
xor ecx, ecx
jmp 0x40c92f
mov ecx, dword [esp + 0x40]
lea edx, [esp + 0x60]
push edx
lea edx, [esp + 0x7c]
push edx
push 0
push ecx
push 0
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40c9a8
push 0xffffffffffffffff
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x60]
call esi
push dword [esp + 0x64]
call esi
cmp dword [esp + 0x34], 0
je 0x40c9d6
push 2
call dword [0x519454]
add esp, 4
push dword [esp + 0x34]
push dword [esp + 0x58]
push str._s_failed:__lu_n
push eax
call 0x40ca50
add esp, 0x10
jmp 0x40ca07
push 2
call dword [0x519454]
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.00421640
add esp, 8
test byte [esp + 0x18], 1
je 0x40c9e1
mov eax, dword [esp + 0x20]
jmp 0x40c9e5
xor esi, esi
test byte [esp + 0x38], 1
jne 0x40ca13
jmp 0x40ca1f
lea eax, [esp + 0x19]
push eax
push str.CreateProcess_failed:__s_n
push esi
call 0x40ca50
add esp, 0xc
test byte [esp + 0x18], 1
je 0x40ca07
push dword [esp + 0x20]
call fcn.00493cf0
add esp, 4
mov esi, 0xffffffff
test byte [esp + 0x38], 1
je 0x40ca1f
push dword [esp + 0x40]
call fcn.00493cf0
add esp, 4
test byte [esp + 8], 1
je 0x40ca32
push dword [esp + 0x10]
call fcn.00493cf0
add esp, 4
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [esp + 0x28]
call fcn.004d7ad0
nop word cs:[eax + eax]
nop
push eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
mov dword [esp], edx
push edx
push ecx
push eax
call fcn.004c2f80
add esp, 0xc
pop eax
ret