Function at 0x41fef0
Capabilities:
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
mov esi, ecx
push edi
mov edi, dword [esi + 0x18]
test edi, edi
jne 0x41ffaa
mov ecx, dword [0x4478b4]
lea edx, [ebp - 8]
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
push edx
mov eax, dword [ecx]
add eax, 0x4478b4
push 0x14
push eax
mov eax, dword [ecx + 4]
call eax
add esp, 0xc
test eax, eax
cmovne edi, dword [ebp - 8]
test edi, edi
jne 0x41ff49
mov dword [esi + 0x14], 0xe
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x41ff67
push 0
push 0
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x41ffa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x14], eax
lea eax, [ebp - 8]
mov ecx, dword [0x4478b4]
push eax
mov dword [ebp - 8], edi
mov dword [ebp - 4], 0x14
mov eax, dword [ecx]
add eax, 0x4478b4
push 0
push eax
mov eax, dword [ecx + 4]
call eax
add esp, 0xc
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x18], edi
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0xc
push eax
push 0x1f40
push 0x400
push 0x400
push 0xff
push 0
push 0x40000003
push dword [esi + 8]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x420002
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov dword [esi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc]
push 0
push 0
push dword [eax + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
jne 0x420025
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x14], eax
jmp 0x4200c4
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x28], 0x41fe90
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], 0
mov edx, dword [eax]
mov ecx, dword [edx]
add ecx, eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [edx + 4]
push ecx
call eax
add esp, 8
test eax, eax
je 0x420017
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
push ecx
push edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x28], ecx
mov dword [esi + 0x20], 0x410870
mov dword [esi + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x420099
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x420099
cmp eax, 0x217
jne 0x4200ac
push dword [ebp - 0x18]
mov eax, dword [esi + 0xc]
push 0
push 0
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x14], eax
mov ecx, dword [esi + 0x10]
push dword [ebp - 0x1c]
mov edx, dword [ecx]
mov eax, dword [edx]
add eax, ecx
push eax
mov eax, dword [edx + 8]
call eax
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x1c], 0
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret