Function at 0x401990
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41234d
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x419040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x30], 0
mov dword [ebp - 4], 1
movq qword [ebp - 0x58], xmm0
mov dword [ebp - 0x50], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov eax, dword [esi + 0x10]
sub eax, 0
je 0x401aad
sub eax, 1
je 0x401a04
mov esi, 8
jmp 0x401bcd
lea edx, [esi + 0x40]
lea ecx, [ebp - 0x4c]
call fcn.00401d20
cmp dword [ebp - 0x38], 7
lea eax, [ebp - 0x4c]
push 0
cmova eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
mov ecx, dword [ebp - 0x38]
test eax, eax
jne 0x401a6d
cmp ecx, 7
jbe 0x401a63
mov edx, dword [ebp - 0x4c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401a59
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401a59
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0041127e
add esp, 8
mov esi, 4
jmp 0x401bcd
cmp ecx, 7
jbe 0x401aa6
mov edx, dword [ebp - 0x4c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401a9c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401a9c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0041127e
add esp, 8
xor esi, esi
jmp 0x401bcd
push 0
push 0
push 1
push 0
mov byte [esi + 0xc], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 8], eax
test eax, eax
jne 0x401ace
lea esi, [eax + 2]
jmp 0x401bcd
lea edx, [esi + 0x40]
lea ecx, [ebp - 0x2c]
call fcn.00401d20
lea ecx, [esi + 0x70]
mov byte [ebp - 4], 4
lea eax, [ebp - 0x2c]
cmp ecx, eax
je 0x401b2b
cmp dword [ebp - 0x18], 7
mov edx, eax
mov edi, dword [ebp - 0x1c]
cmova edx, dword [ebp - 0x2c]
mov eax, dword [ecx + 0x14]
cmp edi, eax
ja 0x401b1d
mov ebx, ecx
cmp eax, 7
jbe 0x401b04
mov ebx, dword [ecx]
lea eax, [edi + edi]
mov dword [ecx + 0x10], edi
push eax
push edx
push ebx
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [ebx + edi*2], ax
jmp 0x401b2b
push edx
mov byte [ebp - 0x5c], 0
push dword [ebp - 0x5c]
push edi
call fcn.00402250
cmp dword [ebp - 0x18], 7
lea eax, [ebp - 0x2c]
push 0
cmova eax, dword [ebp - 0x2c]
push 0x3e8
push 0
push 0
push 1
push 0xe
push 0x80003
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x401b62
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [esi + 0x2c], 0xffffffff
jne 0x401b7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [eax - 5]
neg esi
sbb esi, esi
add esi, 3
jmp 0x401b91
push dword [esi + 8]
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push esi
call fcn.00401200
mov esi, eax
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x401bcd
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401bc3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401bc3
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0041127e
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00411240
mov esp, ebp
pop ebp
ret 0xc