Function at 0x40cf40
Capabilities:
Create process on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x540eb8
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push esi
push edi
mov eax, dword [0x594ca8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 1
mov esi, dword [ebp + 8]
mov ecx, 0x5704e4
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40cf9e
test dx, dx
je 0x40cf9a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40cf9e
add eax, 4
add ecx, 4
test dx, dx
jne 0x40cf78
xor eax, eax
jmp 0x40cfa3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x40cfb8
mov byte [ebp - 4], 0
lea eax, [esi - 0x10]
jmp 0x40d115
push 0x40
lea ecx, [ebp - 0x64]
push 0
push ecx
mov dword [ebp - 0x68], 0x44
call fcn.00518ea0
add esp, 0xc
call fcn.00417515
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40cfe9
push 0x80004005
call fcn.00404860
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push edx
lea eax, [ebp - 0x10]
push str.__s____s_
push eax
call fcn.00403cc0
mov esi, dword [ebp - 0x10]
mov edx, dword [esi - 0xc]
add esp, 0x10
test edx, edx
jns 0x40d029
push 0x80070057
call fcn.00404860
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x40d046
push edx
lea ecx, [ebp - 0x10]
call fcn.00404610
mov esi, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x68]
push edx
push 0
push 0
push 0x8000000
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40d07e
mov eax, dword [ebp - 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [ebp - 0x24]
push ecx
call edi
jmp 0x40d0c4
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x5711f0
call edi
push 0x5710b0
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.00404260
mov eax, dword [eax]
add esp, 0xc
push eax
call edi
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d0c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00516787
add esp, 8
test eax, eax
js 0x40d01f
cmp eax, dword [esi - 8]
jg 0x40d01f
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d10b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d12e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d154
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret