Function at 0x12f95af0
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 0x12f95b3f
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x12f95b28
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 0x12f95b3f
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 [0x131c8c70], ebx
jne 0x12f95b8e
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 [0x131c8c70], esi
mov dword [esp + 0x18], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x24], 2
je 0x12f95b8e
mov dword [0x131c8c74], esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b0
ret 8
cmp dword [0x131c8c74], ebx
jne 0x12f95d3e
mov edx, dword [0x13181adc]
cmp edx, ebx
je 0x12f95d3e
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 0x12f95c0b
push 0x104
push eax
lea eax, [esp + 0xb0]
push eax
call fcn.130535d3
add esp, 0xc
mov esi, dword [esp + 0x1c8]
cmp esi, ebx
jne 0x12f95c39
call fcn.13005d20
push eax
push ebx
push 0x8000
push 0x8000
push 1
push ebx
lea ecx, [esp + 0xc0]
push 0x40000003
push ecx
jmp 0x12f95c5e
call fcn.13005d20
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 0x12f95c7e
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 0x12f95cfd
cmp eax, ebx
je 0x12f95cfd
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 0x12f95ce4
cmp eax, 0x3e5
je 0x12f95ce4
cmp eax, 0x217
jne 0x12f95d3e
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 0x12f95d3e
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x12f95d27
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 0x12f95d3e
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