Function at 0x4017d0
Capabilities:
Create pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
lea eax, [ebx + 0x14198]
mov dword [esp + 0x10], edi
lea esi, [ebx + 0x1c]
mov dword [esp + 0x14], eax
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
test eax, eax
je 0x401861
push 0
push 0x1388
push 0x1000
push 0x1000
push 0xa
push 6
mov dword [esi - 4], eax
mov edx, dword [ebx]
push 0x40000003
push edx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x40186d
mov eax, edi
mov ecx, ebx
call fcn.00401cb0
xor eax, eax
cmp dword [esi + 0x2010], eax
sete al
add dword [esp + 0x14], 4
inc edi
add esi, 0x2028
cmp edi, 0xa
mov dword [esi - 0x1c], eax
jl 0x4017f2
jmp 0x4018a0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetLastError_d_n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [esi + 0x202c], 1
mov ebx, dword [ebp + 8]
lea ecx, [ecx]
push 0x927c0
push 0
lea eax, [ebx + 0x14198]
push eax
push 0xa
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, 0x102
jne 0x4018da
call fcn.004012f0
test eax, eax
je 0x401c17
mov edi, ebx
call fcn.00401740
jmp 0x4018a0
test edi, edi
jl 0x401c95
cmp edi, 9
jg 0x401c95
mov ecx, edi
imul ecx, ecx, 0x2028
cmp dword [ecx + ebx + 0x202c], 0
lea esi, [ecx + ebx]
je 0x401a4d
push 0
lea edx, [esp + 0x14]
push edx
lea eax, [esi + 8]
push eax
mov eax, dword [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, dword [esi + 0x2028]
sub ecx, 0
je 0x401a3b
sub ecx, 1
je 0x40198c
sub ecx, 1
jne 0x401c4f
test eax, eax
je 0x40194a
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esi + 0x2024]
je 0x401a43
mov edx, dword [esi + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x40196d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DisconnectNamedPipe_failed_with__d._n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
mov eax, edi
mov ecx, ebx
call fcn.00401cb0
xor eax, eax
cmp dword [esi + 0x202c], eax
sete al
mov dword [esi + 0x2028], eax
jmp 0x4018a0
test eax, eax
je 0x4019f9
cmp dword [esp + 0x10], 0
je 0x4019f9
lea eax, [esi + 8]
push eax
call fcn.00401d40
test eax, eax
je 0x4019e3
mov ecx, dword [esi + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x4019c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DisconnectNamedPipe_failed_with__d._n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
mov eax, edi
mov ecx, ebx
call fcn.00401cb0
xor edx, edx
cmp dword [esi + 0x202c], edx
sete dl
mov dword [esi + 0x2028], edx
jmp 0x401a4d
mov eax, dword [esp + 0x10]
mov dword [esi + 0x1020], eax
mov dword [esi + 0x2028], 2
jmp 0x401a4d
mov ecx, dword [esi + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x401a1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DisconnectNamedPipe_failed_with__d._n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
mov eax, edi
mov ecx, ebx
call fcn.00401cb0
xor edx, edx
cmp dword [esi + 0x202c], edx
sete dl
mov dword [esi + 0x2028], edx
jmp 0x4018a0
test eax, eax
je 0x401c5d
mov dword [esi + 0x2028], 1
mov eax, dword [esi + 0x2028]
sub eax, 1
je 0x401b2b
sub eax, 1
jne 0x401c6b
mov eax, dword [ebp + 8]
lea ebx, [esi + 8]
push eax
mov ecx, ebx
call fcn.00401e50
mov edi, eax
cmp edi, 0x62
jne 0x401a97
mov ecx, dword [esi + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x401bf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401be6
mov ecx, dword [esi + 0x2024]
push ebx
lea eax, [esp + 0x14]
push eax
mov eax, dword [esi + 0x1c]
push ecx
lea edx, [esi + 0x1024]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
cmp edi, 0x63
je 0x401c79
cmp edi, 0x61
jne 0x401ad2
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401a7a
test ebx, ebx
je 0x401afb
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 0x2024]
jne 0x401afb
mov dword [esi + 0x202c], 0
mov dword [esi + 0x2028], 1
jmp 0x40189a
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test ebx, ebx
jne 0x401b12
cmp eax, 0x3e5
je 0x401890
mov ecx, dword [esi + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x401bf5
call edi
jmp 0x401be6
mov ecx, dword [esi + 0x1c]
lea eax, [esi + 8]
push eax
lea ebx, [esi + 0x1020]
push ebx
push 0x1000
lea eax, [esi + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
test edi, edi
je 0x401bbf
cmp dword [ebx], 0
je 0x401bbf
lea eax, [esi + 8]
push eax
call fcn.00401d40
test eax, eax
je 0x401ba6
mov edx, dword [esi + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x401b84
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DisconnectNamedPipe_failed_with__d._n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 8]
call fcn.00401cb0
xor eax, eax
cmp dword [esi + 0x202c], eax
sete al
mov dword [esi + 0x2028], eax
jmp 0x40189a
mov dword [esi + 0x202c], 0
mov dword [esi + 0x2028], 2
jmp 0x40189a
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test edi, edi
jne 0x401bd6
cmp eax, 0x3e5
je 0x401890
mov ecx, dword [esi + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x401bf5
call ebx
push eax
push str.DisconnectNamedPipe_failed_with__d._n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 8]
call fcn.00401cb0
xor edx, edx
cmp dword [esi + 0x202c], edx
sete dl
mov dword [esi + 0x2028], edx
jmp 0x40189a
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x30], esp
push str.Pipe_client_may_be_killed__Closing_pipe_server...
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea ecx, [ebx + 0x141cc]
lea esi, [ebx + 0x141c0]
call fcn.00402b50
add esp, 0x1c
mov edi, ebx
call fcn.00401740
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0xfffffffc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0xfffffff6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0xffffffec
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [ebp + 8]
call fcn.00401740
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
mov eax, 0xfffffffd
pop ebx
mov esp, ebp
pop ebp
ret 4