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

Disassembly:
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 0x402f19
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 0x402dea
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 0x402cf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x402cff
cmp eax, 0x218
jne 0x402d03
cmp dword [ebp - 8], 0x708
jae 0x402dcb
inc dword [ebp - 8]
push 0x64
mov esi, 0x80070218
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 0x80070218
je 0x402cb1
jmp 0x402d0d
xor esi, esi
jmp 0x402d15
test eax, eax
jle 0x402d0b
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x402dd0
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 0x402e1d
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 0x402e50
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 0x402e83
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 0x402eb3
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 0x402ee3
inc dword [ebp + 8]
cmp dword [ebp + 8], 2
jb 0x402c7f
jmp 0x402f19
mov esi, 0x800705b4
push esi
push 0x1f8
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_wait_for_child_to_connect_to_pipe.
jmp 0x402f11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402df8
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x402e03
mov esi, 0x80004005
push esi
push 0x1d3
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_set_pipe_to_non_blocking.
jmp 0x402f11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402e2b
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x402e36
mov esi, 0x80004005
push esi
push 0x1fe
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_reset_pipe_to_blocking.
jmp 0x402f11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402e5e
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x402e69
mov esi, 0x80004005
push esi
push 0x204
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_write_secret_length_to_pipe.
jmp 0x402f11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402e91
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x402e9c
mov esi, 0x80004005
push esi
push 0x209
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_write_secret_to_pipe.
jmp 0x402f11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402ec1
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x402ecc
mov esi, 0x80004005
push esi
push 0x20e
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_write_our_process_id_to_pipe.
jmp 0x402f11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402ef1
and eax, ebx
or eax, edi
mov esi, eax
test esi, esi
js 0x402efc
mov esi, 0x80004005
push esi
push 0x214
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_read_ACK_from_pipe.
push esi
call fcn.0042eef6
pop ecx
pop ecx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4