Function at 0x40cbe0
Capabilities:
Create process on windows
Resolve function by parsing pe exports
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xa8
mov eax, dword [0x5ceb30]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x40]
push esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
call fcn.004150b0
mov dl, byte [edi + 8]
xor esi, esi
mov ecx, dword [edi + 4]
mov byte [esp + 0x13], dl
test ecx, ecx
je 0x40cc3e
mov eax, dword [ecx]
cmp eax, dword [ecx + 4]
jne 0x40cd6c
mov byte [esp + 0x13], 0
cmp byte [edi + 0x10], 0
mov eax, 0x5c9878
mov dword [esp + 0x74], 1
cmove eax, dword [esp + 0x50]
xor ecx, ecx
cmp byte [edi + 1], cl
mov dword [esp + 0x50], eax
mov eax, 5
cmovne eax, ecx
mov word [esp + 0x78], ax
mov eax, dword [edi + 0x18]
test eax, eax
jne 0x40cc7b
cmp dword [edi + 0x1c], ecx
jne 0x40cc7b
cmp dword [edi + 0x20], ecx
je 0x40cc9e
mov dword [esp + 0x80], eax
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x84], eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x74], 0x101
mov dword [esp + 0x88], eax
cmp dword [edi + 0x14], ecx
je 0x40cca9
or esi, 0x1000004
cmp byte [edi + 0x24], cl
je 0x40ccb4
or esi, 0x1000000
xor eax, eax
mov dword [esp + 0xa4], ecx
push 0xffffffffffffffff
push eax
push dword [esp + 0x1c]
xorps xmm0, xmm0
mov dword [esp + 0xb4], 7
lea ecx, [esp + 0xa0]
movdqa xmmword [esp + 0x3c], xmm0
mov word [esp + 0xa0], ax
call fcn.00404320
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40ce03
push 0
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
or esi, 0x400
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x40ce40
cmp dword [esp + 0xa8], 8
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x4c]
push eax
movzx eax, byte [esp + 0x1b]
lea ecx, [esp + 0x9c]
cmovae ecx, dword [esp + 0x9c]
push 0
push dword [esp + 0x20]
push esi
push eax
push 0
push 0
push ecx
push 0
push dword [edi + 0xc]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
push dword [esp + 0x14]
mov esi, eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
test esi, esi
jmp 0x40ce3e
call fcn.00412a50
cmp eax, 3
jl 0x40cdf2
mov eax, dword [edi + 4]
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
sar ecx, 2
cmp ecx, 0x3fffffff
ja 0x40cdf2
push ecx
lea ecx, [esp + 0x4c]
call fcn.00415180
test al, al
je 0x40cdf2
mov eax, dword [edi + 4]
mov edx, dword [eax + 4]
sub edx, dword [eax]
mov esi, dword [eax]
mov eax, dword [eax + 4]
sub eax, esi
sar edx, 2
sar eax, 2
test eax, eax
je 0x40cf77
mov ecx, dword [esp + 0x8c]
test ecx, ecx
je 0x40cdf9
push 0
push 0
lea eax, [edx*4]
push eax
push esi
push 0x20002
push 0
push ecx
call dword [0x5d958c]
test eax, eax
setne al
test al, al
je 0x40cdf2
mov byte [esp + 0x13], 1
mov esi, 0x80000
jmp 0x40cc3e
mov ecx, dword [esp + 0x8c]
mov byte [esp + 0x13], 0
jmp 0x40cf45
cmp dword [esp + 0xa8], 8
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x4c]
push eax
movzx eax, byte [esp + 0x1b]
lea ecx, [esp + 0x9c]
cmovae ecx, dword [esp + 0x9c]
push 0
push 0
push esi
push eax
push 0
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40ce4a
mov byte [esp + 0x13], 0
jmp 0x40cf05
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040d710
mov eax, dword [edi + 0x14]
test eax, eax
je 0x40cea1
push dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
jne 0x40ce97
mov esi, dword [esp + 0x18]
push 1
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
setne al
test al, al
je 0x40ce90
push 0xea60
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov byte [esp + 0x13], 0
jmp 0x40cefc
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp byte [edi], 0
je 0x40ceb2
push 0xffffffffffffffff
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [esp + 0x28]
test edi, edi
je 0x40cef7
mov esi, dword [esp + 0x18]
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], 0
test esi, esi
je 0x40ceef
cmp esi, 0xffffffff
je 0x40ceef
call fcn.0040ed10
push eax
mov eax, dword [ebp + 4]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call fcn.0040efb0
add esp, 0x10
push esi
mov ecx, edi
call fcn.00409ca0
mov byte [esp + 0x13], 1
lea ecx, [esp + 0x18]
call fcn.0040d770
cmp dword [esp + 0xa8], 8
jb 0x40cf1e
push dword [esp + 0x94]
call fcn.0052199f
add esp, 4
mov ecx, dword [esp + 0x8c]
xor eax, eax
mov dword [esp + 0xa8], 7
mov dword [esp + 0xa4], 0
mov word [esp + 0x94], ax
test ecx, ecx
je 0x40cf5f
push ecx
call dword [0x5d9594]
push dword [esp + 0x8c]
call fcn.0049aec2
add esp, 4
mov ecx, dword [esp + 0xac]
mov al, byte [esp + 0x13]
pop edi
pop esi
xor ecx, esp
call fcn.00527f3e
mov esp, ebp
pop ebp
ret
push str.invalid_vector_T__subscript
call fcn.00525dc8
int3