Function at 0x1004fd70
Capabilities:
Connect pipe
Create pipe

Disassembly:
sub esp, 0x1b0
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
push esi
push edi
mov eax, dword [ebp + 4]
mov dword [ebp + 4], ebx
cmp eax, ebx
je 0x1004fdbf
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x1004fda8
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebp + 8]
push eax
call esi
mov dword [ebp + 8], ebx
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x1004fdbf
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp + 0xc]
push ecx
call esi
mov dword [ebp + 0xc], ebx
cmp dword [0x101f945c], ebx
jne 0x1004fe0e
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x14]
mov esi, 1
push edx
rep stosd dword es:[edi], eax
mov dword [0x101f945c], esi
mov dword [esp + 0x18], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x24], 2
je 0x1004fe0e
mov dword [0x101f9460], esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b0
ret 8
cmp dword [0x101f9460], ebx
jne 0x1004ffbe
mov edx, dword [str..PipeOCULAR_]
cmp edx, ebx
je 0x1004ffbe
mov ecx, 0x45
xor eax, eax
lea edi, [esp + 0xa9]
mov byte [esp + 0xa8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0xa8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, esi
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x1c4]
and ecx, 3
cmp eax, ebx
rep movsb byte es:[edi], byte [esi]
je 0x1004fe8b
push 0x104
push eax
lea eax, [esp + 0xb0]
push eax
call fcn.10058c5b
add esp, 0xc
mov esi, dword [esp + 0x1c8]
cmp esi, ebx
jne 0x1004feb9
call fcn.10069d80
push eax
push ebx
push 0x8000
push 0x8000
push 1
push ebx
lea ecx, [esp + 0xc0]
push 0x40000003
push ecx
jmp 0x1004fede
call fcn.10069d80
push eax
push ebx
push 0x1000
push 0x1000
push 0xff
push 6
lea edx, [esp + 0xc0]
push 0x40000003
push edx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
cmp eax, 0xffffffff
mov dword [ebp + 4], eax
jne 0x1004fefe
pop edi
mov dword [ebp + 4], ebx
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b0
ret 8
push ebx
push ebx
mov dword [ebp + 0x18], esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 1
push ebx
call esi
push ebx
push ebx
push 1
push ebx
mov dword [ebp + 8], eax
call esi
mov ecx, dword [ebp + 8]
mov dword [ebp + 0xc], eax
cmp ecx, ebx
je 0x1004ff7d
cmp eax, ebx
je 0x1004ff7d
lea eax, [ebp + 0x1c]
xor ecx, ecx
mov edx, eax
push eax
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov dword [edx + 0x10], ecx
mov edx, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push edx
mov dword [ebp + 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x1004ff64
cmp eax, 0x3e5
je 0x1004ff64
cmp eax, 0x217
jne 0x1004ffbe
pop edi
mov dword [ebp + 0x10], 1
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1b0
ret 8
mov eax, dword [ebp + 4]
mov dword [ebp + 4], ebx
cmp eax, ebx
je 0x1004ffbe
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x1004ffa7
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebp + 8]
push eax
call esi
mov dword [ebp + 8], ebx
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x1004ffbe
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp + 0xc]
push ecx
call esi
mov dword [ebp + 0xc], ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b0
ret 8