Function at 0x40c184
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [ebp + 8]
and byte [ebp - 1], 0
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
mov dword [ebp - 8], edi
je 0x40c1b2
cmp eax, 1
je 0x40c1b2
jle 0x40c1d4
cmp eax, 3
jle 0x40c1b2
cmp eax, 4
jne 0x40c1d4
mov byte [ebp - 1], 1
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
mov cl, byte [eax]
test cl, cl
je 0x40c1eb
inc eax
cmp byte [eax], 0
jne 0x40c1be
cmp byte [eax + 1], 0
lea ecx, [eax + 1]
je 0x40c1b8
mov byte [eax], 0x20
mov eax, ecx
jmp 0x40c1b8
call fcn.004071fc
mov dword [eax], 0x16
call fcn.00407205
mov dword [eax], edi
jmp 0x40c30f
push 0x44
lea eax, [ebp - 0x60]
pop esi
push esi
push edi
push eax
call fcn.00404f00
mov dword [ebp - 0x60], esi
mov esi, dword [0x42af60]
add esp, 0xc
cmp esi, edi
je 0x40c22d
lea ecx, [esi - 1]
mov edx, ecx
mov eax, ecx
sar edx, 5
and eax, 0x1f
mov edx, dword [edx*4 + 0x42ae60]
lea eax, [eax + eax*8]
cmp byte [edx + eax*4 + 4], 0
jne 0x40c22d
dec esi
dec ecx
cmp esi, edi
jne 0x40c20c
lea eax, [esi + esi*4 + 4]
push 1
mov word [ebp - 0x2e], ax
movzx eax, ax
push eax
call fcn.0040b8e4
mov dword [ebp - 0x2c], eax
pop ecx
mov dword [eax], esi
mov eax, dword [ebp - 0x2c]
pop ecx
xor ebx, ebx
cmp esi, edi
lea ecx, [eax + 4]
lea edx, [eax + esi + 4]
jle 0x40c291
mov edi, ebx
mov eax, ebx
sar edi, 5
and eax, 0x1f
mov edi, dword [edi*4 + 0x42ae60]
lea eax, [eax + eax*8]
lea edi, [edi + eax*4]
mov al, byte [edi + 4]
test al, 0x10
jne 0x40c27d
mov byte [ecx], al
mov eax, dword [edi]
mov dword [edx], eax
jmp 0x40c283
and byte [ecx], 0
or dword [edx], 0xffffffff
inc ebx
inc ecx
add edx, 4
cmp ebx, esi
jl 0x40c257
mov eax, dword [ebp - 0x2c]
xor edi, edi
cmp byte [ebp - 1], 0
je 0x40c2c4
lea ecx, [eax + 4]
xor edx, edx
lea eax, [eax + esi + 4]
cmp esi, 3
jge 0x40c2a9
mov ebx, esi
jmp 0x40c2ac
push 3
pop ebx
cmp edx, ebx
jge 0x40c2bd
and byte [ecx], 0
or dword [eax], 0xffffffff
inc edx
inc ecx
add eax, 4
jmp 0x40c2a0
mov dword [ebp - 8], 8
call fcn.004071fc
mov dword [eax], edi
call fcn.00407205
mov dword [eax], edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x60]
push eax
push edi
push dword [ebp + 0x14]
push dword [ebp - 8]
push 1
push edi
push edi
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x2c]
mov ebx, eax
call fcn.00405b59
cmp esi, edi
pop ecx
jne 0x40c314
push ebx
call fcn.00407189
pop ecx
or eax, 0xffffffff
jmp 0x40c368
cmp dword [ebp + 8], 2
jne 0x40c320
push edi
call fcn.00406845
cmp dword [ebp + 8], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x40c34a
push 0xffffffffffffffff
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp + 0x10]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x1c]
call esi
jmp 0x40c360
cmp dword [ebp + 8], 4
jne 0x40c35a
push dword [ebp - 0x1c]
call esi
mov dword [ebp + 0x10], edi
jmp 0x40c360
mov eax, dword [ebp - 0x1c]
mov dword [ebp + 0x10], eax
push dword [ebp - 0x18]
call esi
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
leave
ret