Function at 0x40d310
Capabilities:
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [0x41a064]
xor eax, ebp
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x258], ecx
cmp dword [ebp + 8], 0
je 0x40d339
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
test ecx, ecx
jne 0x40d340
xor eax, eax
jmp 0x40d557
mov edx, dword [ebp + 8]
push edx
push 0x104
lea eax, [ebp - 0x240]
push eax
call fcn.004020aa
add esp, 0xc
mov dword [ebp - 8], 0
mov dword [ebp - 0x28], 3
mov dword [ebp - 0x248], 7
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x20], 0x9c4000
mov dword [ebp - 0x18], 0x9c4000
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0xc]
push edx
push 1
push 0x417db8
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x40d43e
mov dword [ebp - 0x24c], 0xc
mov eax, dword [ebp - 0x24c]
push eax
call fcn.00401c10
add esp, 4
mov dword [ebp - 0x250], eax
cmp dword [ebp - 0x250], 0
je 0x40d40f
mov ecx, dword [ebp - 0x24c]
push ecx
push 0
mov edx, dword [ebp - 0x250]
push edx
call fcn.00402030
add esp, 0xc
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x25c], eax
jmp 0x40d419
mov dword [ebp - 0x25c], 0
mov ecx, dword [ebp - 0x25c]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
mov dword [edx], 0xc
mov eax, dword [ebp - 0x34]
mov dword [eax + 8], 1
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x244]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x248]
push edx
mov eax, dword [ebp - 0x28]
push eax
lea ecx, [ebp - 0x240]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [ebp - 8], eax
cmp dword [ebp - 0xc], 0
je 0x40d487
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0x34], 0
je 0x40d4ac
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x254]
push ecx
call fcn.00401c7f
add esp, 4
mov dword [ebp - 0x34], 0
cmp dword [ebp - 8], 0xffffffff
jne 0x40d4b9
xor eax, eax
jmp 0x40d557
lea edx, [ebp - 0x240]
push edx
call fcn.0040262d
add esp, 4
lea eax, [eax + eax + 2]
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x240]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push 0xa
push 0x65
mov ecx, dword [ebp - 0x258]
call fcn.0040c670
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x30], 0x1388
push 0
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40d549
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x217
jne 0x40d525
jmp 0x40d554
cmp dword [ebp - 0x24], 0x218
je 0x40d532
xor eax, eax
jmp 0x40d557
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x30]
sub ecx, 0x32
mov dword [ebp - 0x30], ecx
jne 0x40d547
jmp 0x40d554
jmp 0x40d54b
jmp 0x40d554
cmp dword [ebp - 0x24], 0x218
je 0x40d4fa
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x38]
xor ecx, ebp
call fcn.00401c84
mov esp, ebp
pop ebp
ret 4