Function at 0x40d590
Capabilities:
Create pipe
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa0
mov esi, esp
mov dword [esi + 0x88], ebp
lea eax, [esi + 0x90]
mov dword [esi + 0x38], 8
mov dword [esi + 4], 0
mov dword [esi + 0x34], 0
mov dword [eax - 4], esp
mov dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x40e7a0
mov ecx, dword fs:[0]
mov dword [eax], ecx
mov dword fs:[0], eax
movzx eax, byte [ebp + 0xc]
mov ecx, 0x40080002
sub ecx, eax
mov al, 1
mov dword [esi + 0x60], ecx
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esi + 0x64], eax
mov eax, dword [0x44597c]
test eax, eax
jne 0x40d638
mov dword [esi + 0x98], 1
mov eax, dword [esi + 4]
mov byte [esi + 2], 0
mov byte [esi + 1], al
lea eax, [esi + 0x78]
push eax
call fcn.0040f861
add esp, 4
mov eax, dword [esi + 0x78]
mov dword [0x44597c], eax
mov eax, dword [0x44597c]
test eax, eax
je 0x40d611
xor eax, eax
mov ecx, 2
inc eax
lock xadd dword [0x44597c], eax
mov dword [esi + 0x3c], 0x4366e4
mov dword [esi + 0x40], ecx
mov dword [esi + 0x4c], 0
mov byte [esi + 2], 0
mov dword [esi + 0x98], 1
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 4]
mov byte [esi + 1], al
lea eax, [esi + 0x64]
mov dword [esi + 0x10], eax
lea eax, [esi + 0x2c]
mov dword [esi + 0x14], fcn.00421dcf
mov dword [esi + 0x18], eax
lea eax, [esi + 0x10]
mov dword [esi + 0x1c], fcn.00421dcf
mov dword [esi + 0x44], eax
lea eax, [esi + 0x3c]
mov dword [esi + 0x48], ecx
push eax
lea eax, [esi + 0x6c]
push eax
call fcn.00420f9d
add esp, 8
test byte [esi + 8], 1
jne 0x40d6bb
lea ecx, [esi + 0x20]
mov dword [esi + 0x98], 3
call fcn.00401356
mov eax, dword [esi + 0x74]
movsd xmm0, qword [esi + 0x6c]
mov byte [esi + 1], 1
mov byte [esi + 2], 0
mov dword [esi + 0x28], eax
movsd qword [esi + 0x20], xmm0
mov ecx, dword [esi + 0x24]
add eax, ecx
xor edx, edx
inc edx
mov dword [esi + 0x3c], edx
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], eax
lea eax, [esi + 0x3c]
mov word [esi + 0x48], 0
mov dword [esi + 0x98], edx
push eax
lea eax, [esi + 0x10]
push eax
call fcn.0040ad7e
add esp, 8
mov ecx, dword [esi + 0x14]
xor eax, eax
push eax
push eax
mov eax, 0x10000
push eax
push eax
push 1
mov ebx, dword [esi + 0x38]
push ebx
push dword [esi + 0x60]
mov dword [esi + 4], ecx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
jne 0x40d7f9
mov eax, dword [esi + 0x34]
lea edi, [eax + 1]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0xa
mov dword [esi + 0x40], eax
mov dword [esi + 0x3c], 0
jge 0x40d79a
cmp eax, 5
jne 0x40d752
mov dword [esi + 0x34], edi
jmp 0x40d75d
test ebx, ebx
je 0x40d79a
xor ebx, ebx
cmp eax, 0x57
jne 0x40d79a
lea ecx, [esi + 0x3c]
mov dword [esi + 0x38], ebx
mov dword [esi + 0x98], 2
call fcn.0040c7ae
mov eax, dword [esi + 0x10]
test eax, eax
je 0x40d789
add eax, eax
push 2
push eax
push dword [esi + 4]
call fcn.00402b10
add esp, 0xc
mov al, 1
mov dword [esi + 8], 0
mov dword [esi + 4], eax
jmp 0x40d5f5
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], 0
mov dword [ecx], 1
test eax, eax
je 0x40d7c4
add eax, eax
push 2
push eax
push dword [esi + 4]
call fcn.00402b10
add esp, 0xc
mov edi, dword [esi + 8]
xor eax, eax
lea ecx, [esi + 0x20]
mov dword [esi + 0xc], edi
mov byte [esi + 3], al
mov dword [esi + 0x98], 0
call fcn.00401356
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x40d8ac
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40d8ac
mov edi, eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x40d812
add eax, eax
push 2
push eax
push dword [esi + 4]
call fcn.00402b10
add esp, 0xc
mov dl, byte [ebp + 0xc]
mov cl, 1
xor eax, eax
mov dword [esi + 0x10], 0xc
mov dword [esi + 0x68], edi
mov dword [esi + 0x44], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x58], eax
mov word [esi + 0x5c], 0
mov dword [esi + 0x50], eax
mov dword [esi + 0x14], eax
mov byte [esi + 1], cl
mov byte [esi + 2], cl
mov byte [esi + 0x59], dl
xor dl, cl
mov ecx, dword [esi + 0x28]
mov byte [esi + 0x58], dl
mov dword [esi + 0x4c], eax
movzx eax, byte [ebp + 0x10]
lea edx, [esi + 0x3c]
mov dword [esi + 0x18], eax
lea eax, [esi + 0x10]
mov dword [esi + 0x54], eax
mov eax, dword [esi + 0x24]
push edx
push ecx
push eax
lea eax, [esi + 0x2c]
push eax
call fcn.004138a0
add esp, 0x10
cmp byte [esi + 0x2c], 4
mov edi, dword [esi + 8]
jne 0x40d87f
mov eax, dword [esi + 0x30]
jmp 0x40d88a
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0x30]
cmp cl, 4
jne 0x40d8c3
mov ecx, dword [ebp + 8]
mov dword [esi + 0xc], edi
mov byte [esi + 3], 0
mov dword [ecx + 4], edi
mov dword [ecx + 8], eax
xor eax, eax
mov dword [ecx], eax
lea ecx, [esi + 0x20]
mov dword [esi + 0x98], eax
call fcn.00401356
mov eax, dword [esi + 0x90]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebp + 8]
mov dword [edx + 8], eax
mov al, 1
mov dword [edx + 4], ecx
mov dword [edx], 1
jmp 0x40d7c9