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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
push ebx
push esi
mov dword [ebp - 0x24], ecx
mov ecx, dword [eax + 0x14]
mov eax, dword [eax + 4]
push edi
push eax
xor esi, esi
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], esi
mov dword [ebp + 8], esi
mov ebx, 0xffff
mov edi, 0x80070000
mov eax, dword [ebp + 8]
mov eax, dword [ebp + eax*4 - 0x24]
cmp eax, 0xffffffff
je 0x40d97c
push 0
push 0
lea ecx, [ebp - 0xc]
push ecx
push eax
mov dword [ebp - 0xc], 1
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
je 0x40d84d
and dword [ebp - 8], 0
mov eax, dword [ebp + 8]
push 0
push dword [ebp + eax*4 - 0x24]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40d758
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x40d762
cmp eax, 0x218
jne 0x40d766
cmp dword [ebp - 8], 0x708
jae 0x40d82e
inc dword [ebp - 8]
push 0x64
mov esi, 0x80070218
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 0x80070218
je 0x40d714
jmp 0x40d770
xor esi, esi
jmp 0x40d778
test eax, eax
jle 0x40d76e
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x40d833
xor eax, eax
push eax
push eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
push dword [ebp + eax*4 - 0x24]
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
je 0x40d880
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
push dword [ebp + eax*4 - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d8b3
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
mov eax, dword [ebp + 8]
push dword [ebp - 0x14]
push dword [ebp + eax*4 - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d8e6
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp + 8]
push dword [ebp + eax*4 - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d916
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
push dword [ebp + eax*4 - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40d946
inc dword [ebp + 8]
cmp dword [ebp + 8], 2
jb 0x40d6e2
jmp 0x40d97c
mov esi, 0x800705b4
push esi
push 0x1fb
push 0x43be0c
call fcn.004315c0
push 0x43c3b4
jmp 0x40d974
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40d85b
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x40d866
mov esi, 0x80004005
push esi
push 0x1d6
push 0x43be0c
call fcn.004315c0
push 0x43c390
jmp 0x40d974
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40d88e
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x40d899
mov esi, 0x80004005
push esi
push 0x201
push 0x43be0c
call fcn.004315c0
push 0x43c36e
jmp 0x40d974
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40d8c1
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x40d8cc
mov esi, 0x80004005
push esi
push 0x207
push 0x43be0c
call fcn.004315c0
push 0x43c346
jmp 0x40d974
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40d8f4
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x40d8ff
mov esi, 0x80004005
push esi
push 0x20c
push 0x43be0c
call fcn.004315c0
push 0x43c326
jmp 0x40d974
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40d924
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x40d92f
mov esi, 0x80004005
push esi
push 0x211
push 0x43be0c
call fcn.004315c0
push 0x43c2fe
jmp 0x40d974
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40d954
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x40d95f
mov esi, 0x80004005
push esi
push 0x217
push 0x43be0c
call fcn.004315c0
push 0x43c2e0
push esi
call fcn.00430a6a
pop ecx
pop ecx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4