Function at 0x45a340
Capabilities:
Connect pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x521920
mov eax, dword fs:[0]
push eax
sub esp, 0x844
mov eax, dword [0x579630]
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 dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
test edi, edi
jne 0x45a380
lea eax, [edi + 8]
jmp 0x45a64e
cmp dword [edi + 0x10], 0
mov dword [ebp - 0x84c], edi
jne 0x45a391
mov esi, dword [edi + 0x2c]
jmp 0x45a393
xor esi, esi
mov eax, dword [edi]
mov ecx, dword [edi + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x844], eax
mov eax, dword [edi + 0x90]
mov dword [ebp - 0x848], esi
mov dword [ebp - 0x840], ecx
mov dword [ebp - 0x850], eax
lea esp, [esp]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x45a64c
push 0x400
lea eax, [ebp - 0x82c]
mov dword [ebp - 0x1c], 0
push 0
push eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x83c], 0
mov dword [ebp - 0x838], 0
mov dword [ebp - 0x834], 0
mov dword [ebp - 0x830], 0
call fcn.004f9050
push 0x400
lea eax, [ebp - 0x420]
mov dword [ebp - 0x42c], 0
push 0
push eax
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
call fcn.004f9050
add esp, 0x18
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
cmp dword [ebp - 0x844], 0
je 0x45a4e0
mov eax, dword [ebp - 0x850]
test eax, eax
je 0x45a4e0
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push ecx
push esi
call eax
test eax, eax
je 0x45a4e0
mov eax, dword [ebp - 0x844]
cmp eax, dword [ebp - 0x20]
je 0x45a4e0
mov eax, dword [ebp - 0x83c]
push 0
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x1c]
push eax
push 0x410
lea eax, [ebp - 0x83c]
mov dword [ebp - 0x428], 0xfffffffa
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x18]
push eax
push 0x40c
lea eax, [ebp - 0x42c]
push eax
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov ecx, dword [ebp - 0x840]
jmp 0x45a3c0
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x410
lea eax, [ebp - 0x83c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45a4ce
cmp dword [ebp - 0x1c], 0x410
mov eax, dword [ebp - 0x83c]
jne 0x45a66c
test eax, eax
je 0x45a5f1
cmp eax, 3
je 0x45a5f4
cmp dword [ebp - 0x830], 0x400
ja 0x45a5f1
push eax
mov ecx, edi
call fcn.0045a0f0
test eax, eax
jne 0x45a555
mov eax, dword [ebp - 0x83c]
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x428], 0xffffffff
jmp 0x45a5c0
push edi
lea ecx, [ebp - 0x42c]
mov dword [ebp - 4], 0
push ecx
lea ecx, [ebp - 0x83c]
push ecx
call eax
add esp, 0xc
jmp 0x45a5b9
mov dword [ebp - 4], 0xffffffff
push 0
lea eax, [ebp - 0x18]
push eax
push 0x40c
lea eax, [ebp - 0x42c]
push eax
push esi
call ebx
lea eax, [edi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov ecx, dword [ebp - 0x840]
jmp 0x45a3c0
cmp eax, 3
sete bl
mov dword [ebp - 0x42c], eax
xor ecx, ecx
mov eax, 0xfffffffb
test bl, bl
push ecx
cmovne eax, ecx
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x18]
push eax
push 0x40c
lea eax, [ebp - 0x42c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov ecx, dword [ebp - 0x840]
test bl, bl
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x45a3c0
cmp byte [edi + 0xc], 0
jne 0x45a3c0
xor eax, eax
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.00401590
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x428], 0xfffffffe
jmp 0x45a4b9