Function at 0x401d80
Capabilities:
Read file on windows
Read pipe
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x478276
mov eax, dword fs:[0]
push eax
sub esp, 0x2ac
mov eax, dword [0x4c3408]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0x40
lea eax, [ebp - 0x50]
mov edi, 1
push 0
push eax
call fcn.0043f7e0
push 0x104
lea eax, [ebp - 0x154]
push 0
push eax
call fcn.0043f7e0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateEventA]
add esp, 0x18
push 0
push edi
push edi
push 0
call ebx
mov dword [ebp - 0x168], eax
mov dword [esi + 0x20], eax
lea eax, [ebp - 0x174]
push eax
call fcn.0042a2b0
add esp, 4
test eax, eax
je 0x4021b9
push 0x104
lea eax, [ebp - 0x154]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x154]
push eax
call fcn.0042ae10
push dword [ebp - 0x174]
lea eax, [ebp - 0x154]
push eax
push str..pipepoenvuewt
lea eax, [ebp - 0x50]
push str._s__s__d
push eax
call fcn.00401cb0
add esp, 0x18
lea eax, [ebp - 0x50]
push eax
call fcn.004021e0
mov ecx, eax
mov dword [esi + 0x24], ecx
test ecx, ecx
jne 0x401e5f
xor edi, edi
jmp 0x401e6c
lea eax, [esi + 0x10]
push eax
push ecx
call fcn.004022c0
mov dword [esi + 0x34], eax
mov eax, dword [esi + 4]
mov dword [esi + 0xc], edi
test eax, eax
je 0x401e7d
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [esi + 0xc], 0
je 0x4021b9
push 0
push 0
push 1
push 0
call ebx
mov ecx, dword [ebp - 0x168]
push 0xffffffffffffffff
mov dword [esi + 8], eax
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x170]
push 0
push eax
push 2
mov dword [ebp - 0x170], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push 0
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4021b9
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x34], 0
je 0x402078
push 0
lea eax, [ebp - 0x164]
mov dword [esi + 0x34], 0
push eax
lea ebx, [esi + 0x10]
push ebx
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x401f41
call edi
cmp eax, 0xea
jne 0x401f4e
lea eax, [ebp - 0x160]
mov dword [ebp - 0x160], 0
push eax
push 0
push 0
push 0
push 0
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x401f3d
cmp dword [ebp - 0x160], 0
jbe 0x401f3d
mov eax, dword [ebp - 0x164]
jmp 0x401f4b
call edi
jmp 0x401f4e
mov eax, dword [ebp - 0x164]
test eax, eax
je 0x401f4e
add dword [esi + 0x30], eax
lea eax, [ebp - 0x158]
mov dword [ebp - 0x158], 0
push eax
push 0
push 0
push 0
push 0
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov ecx, dword [ebp - 0x158]
test ecx, ecx
jne 0x401f8e
cmp dword [esi + 0x30], ecx
jne 0x402178
mov ecx, 0x800
mov dword [ebp - 0x158], ecx
mov edx, dword [esi + 0x30]
lea eax, [edx + ecx]
cmp eax, dword [esi + 0x28]
jbe 0x401fe8
mov edi, dword [esi + 0x2c]
push eax
call fcn.0043a304
mov ecx, dword [esi + 0x30]
add ecx, dword [ebp - 0x158]
push ecx
push 0
push eax
mov dword [esi + 0x2c], eax
call fcn.0043f7e0
add esp, 0x10
test edi, edi
je 0x401fd3
push dword [esi + 0x30]
push edi
push dword [esi + 0x2c]
call fcn.004400a0
push edi
call fcn.0043a30d
add esp, 0x10
mov edx, dword [esi + 0x30]
mov ecx, dword [ebp - 0x158]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [edx + ecx]
mov dword [esi + 0x28], eax
push ebx
lea eax, [ebp - 0x15c]
mov dword [ebp - 0x15c], 0
push eax
mov eax, dword [esi + 0x2c]
push ecx
add eax, edx
push eax
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40206a
call edi
cmp eax, 0xea
je 0x40202e
cmp eax, 0x3e5
jne 0x402178
mov dword [esi + 0x34], 1
jmp 0x402178
push 0
lea eax, [ebp - 0x15c]
mov dword [ebp - 0x15c], 0
push eax
push ebx
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov eax, dword [ebp - 0x15c]
test eax, eax
mov ecx, dword [ebp - 0x158]
cmovne ecx, eax
add dword [esi + 0x30], ecx
mov dword [ebp - 0x15c], ecx
jmp 0x402178
mov eax, dword [ebp - 0x15c]
add dword [esi + 0x30], eax
jmp 0x402178
cmp dword [esi + 0x30], 0
je 0x402178
mov edi, dword [esi + 0x2c]
lea ecx, [ebp - 0x1d4]
call fcn.00425b70
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2b8]
call fcn.004220b0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2b8]
push 0
push edi
call fcn.00424c10
lea eax, [ebp - 0x2b8]
push eax
lea ecx, [ebp - 0x1d4]
call fcn.004275a0
mov eax, dword [esi + 0x38]
lea ecx, [ebp - 0x1d4]
mov eax, dword [eax + 0x60]
add eax, 0xa528
push eax
call fcn.004279c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2b8]
call fcn.004222e0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1d4]
call fcn.00425c90
push dword [esi + 0x2c]
call fcn.0043a30d
add esp, 4
mov dword [esi + 0x2c], 0
lea eax, [ebp - 0x178]
mov dword [esi + 0x30], 0
mov dword [esi + 0x28], 0
mov dword [ebp - 0x17c], 0
push 0
push eax
push 4
lea eax, [ebp - 0x17c]
mov dword [ebp - 0x178], 0
push eax
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402157
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
lea eax, [esi + 0x10]
push eax
push dword [esi + 0x24]
call fcn.004022c0
mov dword [esi + 0x34], eax
mov eax, dword [ebp - 0x168]
mov dword [ebp - 0x170], eax
mov eax, dword [esi + 8]
push 0xffffffffffffffff
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x170]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push 0
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401ed2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00439f38
mov esp, ebp
pop ebp
ret