Function at 0x461020
Capabilities:
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x595c60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
push 0xff
mov edi, edx
lea edx, [ebp - 0x123]
push ebx
push edx
mov dword [ebp - 0x128], esi
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x13c], ecx
mov byte [ebp - 0x124], bl
call fcn.0050be90
xor eax, eax
add esp, 0xc
cmp edi, ebx
mov byte [ebp - 0x24], bl
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov dword [ebp - 0x13], eax
mov dword [ebp - 0xf], eax
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov byte [ebp - 5], al
mov dword [ebp - 0x130], ebx
mov dword [ebp - 0x12c], ebx
mov dword [ebp - 0x138], ebx
je 0x461122
cmp esi, ebx
je 0x461122
mov eax, dword [ebp - 0x134]
cmp eax, ebx
je 0x461122
cmp dword [ebp + 0x10], ebx
mov dword [eax], ebx
je 0x461106
mov eax, dword [esi]
push eax
push ebx
lea ecx, [ebp - 0x124]
push 0x100
push ecx
call fcn.00460e20
add esp, 0x10
cmp eax, ebx
mov dword [ebp - 0x12c], eax
jne 0x46112c
lea edx, [ebp - 0x24]
push edx
lea eax, [ebx + 0x20]
call fcn.00460400
add esp, 4
test eax, eax
je 0x461122
lea eax, [ebp - 0x24]
push eax
push ebx
lea ecx, [ebp - 0x124]
push 0x100
push ecx
call fcn.004604f0
jmp 0x46111b
mov edx, dword [esi]
push edx
push ebx
lea eax, [ebp - 0x124]
push 0x100
push eax
call fcn.00460e20
add esp, 0x10
test eax, eax
jne 0x46112c
mov edi, 0xb
jmp 0x46131c
push 0x80
call fcn.00507c0d
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x461149
mov edi, 0xb
jmp 0x4612f6
mov dword [esi], edi
mov dword [esi + 4], 0xffffffff
mov dword [esi + 8], ebx
xor eax, eax
mov dword [esi + 0x30], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x44], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], eax
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
lea edi, [esi + 0x44]
mov dword [esi + 0x54], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x68], eax
mov dword [esi + 0x6c], eax
mov dword [esi + 0x70], eax
mov dword [esi + 0x74], eax
push 0x1000
mov dword [esi + 0x78], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x58], ebx
mov dword [esi + 0x7c], ebx
call fcn.00507c0d
add esp, 4
cmp eax, ebx
mov dword [esi + 0x3c], eax
jne 0x4611b4
mov edi, 0xb
jmp 0x4612f6
lea ecx, [esi + 0x10]
push ecx
call fcn.00410bc0
add esp, 4
test eax, eax
jne 0x4611cc
lea edi, [eax + 0xb]
jmp 0x4612f6
lea eax, [esi + 0x7c]
push eax
mov dword [ebp - 0x130], 1
call fcn.00469320
add esp, 4
test eax, eax
jne 0x4611ee
lea edi, [eax + 0xb]
jmp 0x4612f6
mov ecx, dword [ebp - 0x128]
mov eax, dword [ecx + 4]
cmp eax, ebx
jne 0x461200
mov eax, 0x1f
mov edx, dword [ecx + 8]
push edx
push ebx
push 0x1000
push 0x1000
push eax
mov eax, dword [ebp + 0x10]
neg eax
sbb eax, eax
and eax, 0x80000
push ebx
or eax, 0x40000003
push eax
lea ecx, [ebp - 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x461254
call dword [sym.imp.KERNEL32.dll_GetLastError]
call fcn.004606a0
mov edx, dword [ebp - 0x12c]
mov dword [ebp - 0x138], edx
jmp 0x4612f0
cmp dword [ebp + 0x10], ebx
je 0x4612a3
cmp dword [ebp - 0x12c], ebx
jne 0x4612a3
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax]
push ecx
push ebx
lea edx, [ebp - 0x124]
push 0x100
push edx
call fcn.00460e20
add esp, 0x10
test eax, eax
je 0x46128a
mov edi, 0xb
jmp 0x4612f6
mov eax, dword [ebp - 0x128]
mov eax, dword [eax]
lea ecx, [ebp - 0x24]
call fcn.00460340
test eax, eax
jne 0x4612a3
lea edi, [eax + 0xb]
jmp 0x4612f6
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebx
mov dword [esi + 0x78], eax
jne 0x4612bc
mov edi, 0xb
jmp 0x4612f6
push ebx
push 1
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebx
mov dword [esi + 0x54], eax
jne 0x4612d6
mov edi, 0xb
jmp 0x4612f6
mov ecx, dword [esi + 4]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x461341
call dword [sym.imp.KERNEL32.dll_GetLastError]
call fcn.004606a0
mov edi, eax
cmp edi, ebx
je 0x46131c
cmp esi, ebx
je 0x46131c
call fcn.004606d0
cmp dword [ebp - 0x130], ebx
je 0x461313
lea ecx, [esi + 0x10]
push ecx
call fcn.00410c20
add esp, 4
push esi
call fcn.005074d4
add esp, 4
mov eax, dword [ebp - 0x13c]
cmp eax, ebx
je 0x46132e
mov edx, dword [ebp - 0x138]
mov dword [eax], edx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00506c7d
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x217
jne 0x461369
mov edx, dword [esi + 0x54]
push edx
mov dword [esi + 8], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x461374
call edi
jmp 0x4612eb
cmp eax, 0x3e5
jne 0x4612eb
mov eax, dword [ebp - 0x134]
mov dword [eax], esi
xor edi, edi
jmp 0x46131c