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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dbc90
mov eax, dword fs:[0]
push eax
sub esp, 0x844
mov eax, dword [0x5256a8]
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 ebx, dword [ebp + 8]
xor edi, edi
cmp ebx, edi
jne 0x439682
lea eax, [edi + 8]
jmp 0x43996a
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0x844], edi
call fcn.00438c90
test al, al
je 0x4396b8
push 0x4e798c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, edi
je 0x4396b8
push str.GetNamedPipeClientProcessId
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x844], eax
mov eax, dword [ebx + 0x14]
cmp eax, edi
je 0x4396d2
cmp eax, 2
je 0x4396d2
cmp eax, 3
jne 0x4396ce
mov esi, dword [ebx + 0x34]
jmp 0x4396d5
xor esi, esi
jmp 0x4396d5
mov esi, dword [ebx + 0x30]
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x838], esi
mov dword [ebp - 0x850], eax
mov dword [ebp - 0x84c], ecx
mov edx, dword [ebp - 0x850]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x439968
push 0x400
lea eax, [ebp - 0x820]
push edi
push eax
mov dword [ebp - 0x83c], edi
mov dword [ebp - 0x834], edi
mov dword [ebp - 0x830], edi
mov dword [ebp - 0x82c], edi
mov dword [ebp - 0x828], edi
mov dword [ebp - 0x824], edi
call fcn.004b7120
push 0x400
lea ecx, [ebp - 0x414]
push edi
push ecx
mov dword [ebp - 0x420], edi
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x418], edi
call fcn.004b7120
add esp, 0x18
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x439775
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0x84c]
cmp ebx, edi
je 0x4397fd
mov eax, dword [ebp - 0x844]
cmp eax, edi
je 0x4397fd
lea edx, [ebp - 0x848]
push edx
push esi
mov dword [ebp - 0x848], edi
call eax
cmp eax, edi
je 0x4397fd
cmp ebx, dword [ebp - 0x848]
je 0x4397fd
mov eax, dword [ebp - 0x830]
push edi
lea ecx, [ebp - 0x83c]
push ecx
push 0x410
lea edx, [ebp - 0x830]
push edx
push esi
mov dword [ebp - 0x420], eax
mov dword [ebp - 0x41c], 0xfffffffa
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 0x834]
push eax
push 0x40c
lea ecx, [ebp - 0x420]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x4396ed
push edi
lea edx, [ebp - 0x83c]
push edx
push 0x410
lea eax, [ebp - 0x830]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4399b3
cmp dword [ebp - 0x83c], 0x410
mov eax, dword [ebp - 0x830]
jne 0x439988
cmp eax, edi
je 0x439911
cmp eax, 3
je 0x439914
cmp dword [ebp - 0x824], 0x400
ja 0x439911
mov ebx, dword [ebp - 0x840]
push eax
mov ecx, ebx
call fcn.004395f0
cmp eax, edi
jne 0x439881
mov ecx, dword [ebp - 0x830]
mov dword [ebp - 0x420], ecx
mov dword [ebp - 0x41c], 0xffffffff
jmp 0x4398d2
push ebx
lea edx, [ebp - 0x420]
push edx
lea ecx, [ebp - 0x830]
push ecx
mov dword [ebp - 4], edi
call eax
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
jmp 0x4398d2
push edi
lea eax, [ebp - 0x834]
push eax
push 0x40c
lea ecx, [ebp - 0x420]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp byte [ebx + 0x10], 0
je 0x4399b3
mov byte [ebx + 0x10], 0
add ebx, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x4396ed
cmp eax, 3
sete bl
xor edx, edx
test bl, bl
setne dl
push edi
mov dword [ebp - 0x420], eax
lea eax, [ebp - 0x834]
push eax
push 0x40c
lea ecx, [ebp - 0x420]
dec edx
push ecx
and edx, 0xfffffffb
push esi
mov dword [ebp - 0x41c], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test bl, bl
je 0x4396ed
mov edx, dword [ebp - 0x840]
cmp byte [edx + 0x11], 0
jne 0x4396ed
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.00401306
mov esp, ebp
pop ebp
ret 4
push edi
lea ecx, [ebp - 0x834]
push ecx
push 0x40c
lea edx, [ebp - 0x420]
push edx
push esi
mov dword [ebp - 0x420], eax
mov dword [ebp - 0x41c], 0xfffffffe
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x4396ed