Function at 0x401980
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411658
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x418014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
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 - 0x40], xmm0
mov dword [ebp - 0x38], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov eax, dword [esi + 0x10]
sub eax, 0
je 0x401a9b
sub eax, 1
je 0x4019f2
mov esi, 8
jmp 0x401b88
lea edx, [esi + 0x40]
lea ecx, [ebp - 0x2c]
call fcn.00401bb0
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push 0
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
mov edx, dword [ebp - 0x18]
test eax, eax
jne 0x401a5b
cmp edx, 8
jb 0x401a51
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401a47
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401a47
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004102f1
add esp, 8
mov esi, 4
jmp 0x401b88
cmp edx, 8
jb 0x401a94
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401a8a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401a8a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004102f1
add esp, 8
xor esi, esi
jmp 0x401b88
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 0x401abc
lea esi, [eax + 2]
jmp 0x401b88
lea edx, [esi + 0x40]
lea ecx, [ebp - 0x2c]
call fcn.00401bb0
lea ecx, [esi + 0x70]
mov byte [ebp - 4], 4
lea eax, [ebp - 0x2c]
cmp ecx, eax
je 0x401ae6
cmp dword [ebp - 0x18], 8
push dword [ebp - 0x1c]
cmovae eax, dword [ebp - 0x2c]
push eax
call fcn.00401ef0
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push 0
cmovae 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 - 0x3c]
test eax, eax
je 0x401b1d
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [esi + 0x2c], 0xffffffff
jne 0x401b35
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [eax - 5]
neg esi
sbb esi, esi
add esi, 3
jmp 0x401b4c
push dword [esi + 8]
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push esi
call fcn.004012c0
mov esi, eax
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x401b88
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401b7e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401b7e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004102f1
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 esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004102b0
mov esp, ebp
pop ebp
ret 0xc