Function at 0x401560
Capabilities:
Connect pipe
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42c84b
mov eax, dword fs:[0]
push eax
sub esp, 0x654
mov eax, dword [0x44a2a8]
xor eax, esp
mov dword [esp + 0x64c], eax
push ebx
push edi
mov eax, dword [0x44a2a8]
xor eax, esp
push eax
lea eax, [esp + 0x660]
mov dword fs:[0], eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x56]
push ecx
mov dword [esp + 0x28], 0
mov word [esp + 0x58], ax
call fcn.0041a9c0
push 0x3ff
lea edx, [esp + 0x265]
push 0
push edx
mov byte [esp + 0x26c], 0
call fcn.0041a9c0
push str.PipeMonitor_run..
mov ecx, 1
call fcn.00401150
add esp, 0x1c
push 0x208
lea eax, [esp + 0x50]
push 0
push eax
call fcn.0041a9c0
push 0x400
lea ecx, [esp + 0x264]
push 0
push ecx
call fcn.0041a9c0
mov edx, dword [esi + 8]
add esp, 0x18
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esi]
push edx
push eax
mov dword [esp + 0x28], 1
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x401653
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_failed__d_
xor ecx, ecx
call fcn.00401150
add esp, 8
mov ecx, dword [esi + 8]
lea edi, [ebx*4]
mov edx, dword [edi + ecx]
push edx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push ebx
push str.Pipe_Client_Connected__d_
mov ecx, 1
call fcn.00401150
mov edx, dword [esi + 0xc]
add esp, 8
lea eax, [ebx + ebx*4]
add eax, eax
add eax, eax
push 1
lea ecx, [esp + 0x20]
push ecx
add edx, eax
mov dword [esp + 0x14], eax
mov eax, dword [esi + 4]
mov ecx, dword [edi + eax]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x40177d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_failed__d_
xor ecx, ecx
call fcn.00401150
mov edx, dword [esi + 4]
mov eax, dword [edi + edx]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x4016e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.__d_pipe__Disconnect_failed__d_
xor ecx, ecx
call fcn.00401150
add esp, 0xc
mov ecx, dword [esi + 0xc]
add ecx, dword [esp + 0xc]
mov edx, dword [esi + 4]
mov eax, dword [edi + edx]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x401719
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.__d_pipe__ConnectNamedPipe_failed__d_
xor ecx, ecx
call fcn.00401150
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x4015ec
cmp eax, 0x3e5
je 0x4015ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.__d_pipe__ConnectNamedPipe_BAD_Status__d_
xor ecx, ecx
call fcn.00401150
mov ecx, dword [esi + 4]
mov edx, dword [edi + ecx]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
push edx
call ebx
mov eax, dword [esi + 8]
mov ecx, dword [edi + eax]
push ecx
call ebx
mov edx, dword [esi + 4]
mov dword [edi + edx], 0
mov eax, dword [esi + 8]
mov dword [edi + eax], 0
jmp 0x4015ec
mov ecx, dword [esi + 0xc]
mov ebx, dword [esp + 0xc]
mov eax, dword [esi + 4]
add ecx, ebx
push ecx
mov ecx, dword [edi + eax]
push 0
push 0x400
lea edx, [esp + 0x260]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
push 1
lea edx, [esp + 0x20]
push edx
mov edx, dword [edi + ecx]
add eax, ebx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
setne al
test al, al
jne 0x4017dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile_failed__d_
xor ecx, ecx
call fcn.00401150
add esp, 8
lea eax, [esp + 0x254]
lea ebx, [esp + 0x14]
call fcn.00401a90
test eax, eax
je 0x4017ff
push str.pipeDataUnSerialize_failed
xor ecx, ecx
call fcn.00401150
add esp, 4
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x50]
call fcn.004019c0
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x50]
push edx
push str.Client_programExeName_:__ls_autoStart___d_n
mov ecx, 1
call fcn.00401150
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
add esp, 0xc
mov dword [esp + 0x10], ecx
cmp ecx, dword [eax + 4]
je 0x401923
jmp 0x401844
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
lea eax, [esp + 0x30]
mov dword [esp + 0x2c], edx
call fcn.004012b0
lea ecx, [esp + 0x4c]
lea edx, [ecx + 2]
lea ebx, [ebx]
mov bx, word [ecx]
add ecx, 2
test bx, bx
jne 0x401860
mov ebx, dword [eax + 0x10]
sub ecx, edx
sar ecx, 1
mov edx, ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], ebx
cmp edx, ebx
jae 0x401884
mov dword [esp + 0x24], edx
cmp ebx, ecx
jb 0x40188a
mov ebx, ecx
cmp dword [eax + 0x14], 8
jb 0x401894
mov edx, dword [eax]
jmp 0x401896
mov edx, eax
lea eax, [esp + 0x4c]
test ebx, ebx
je 0x4018bb
mov edi, edi
mov cx, word [edx]
cmp cx, word [eax]
jne 0x4018b3
add edx, 2
add eax, 2
dec ebx
jne 0x4018a0
jmp 0x4018bb
sbb eax, eax
and eax, 0xfffffffe
inc eax
jne 0x4018d5
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
cmp eax, ecx
jae 0x4018cc
or eax, 0xffffffff
jmp 0x4018d5
xor edx, edx
cmp eax, ecx
setne dl
mov eax, edx
test eax, eax
sete bl
mov dword [esp + 0x668], 0xffffffff
cmp dword [esp + 0x44], 8
jb 0x4018f9
mov eax, dword [esp + 0x30]
push eax
call fcn.00414021
add esp, 4
test bl, bl
je 0x40190c
cmp dword [esp + 0x18], 0
mov edx, dword [esp + 0x2c]
setne cl
mov byte [edx + 0x3c], cl
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x10]
add eax, 4
mov dword [esp + 0x10], eax
cmp eax, dword [ecx + 4]
jne 0x401840
mov edx, dword [esi + 4]
mov eax, dword [edx + edi]
push eax
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x401951
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [esp + 0x20]
push eax
push ebx
push str.__d_pipe__Disconnect_failed__d_
xor ecx, ecx
call fcn.00401150
add esp, 0xc
jmp 0x401955
mov ebx, dword [esp + 0x20]
mov ecx, dword [esi + 0xc]
add ecx, dword [esp + 0xc]
mov edx, dword [esi + 4]
mov eax, dword [edx + edi]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x401985
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.__d_pipe__ConnectNamedPipe_failed__d_
xor ecx, ecx
call fcn.00401150
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x4015ec
cmp eax, 0x3e5
je 0x4015ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.__d_pipe__ConnectNamedPipe_BAD_Status__d_
xor ecx, ecx
call fcn.00401150
mov ecx, dword [esi + 4]
mov edx, dword [ecx + edi]
jmp 0x40174f