Function at 0x4031d2
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x14], ebx
call esi
test eax, eax
jne 0x403248
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x403223
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
cmp edi, ebx
jl 0x40322e
mov edi, 0x80004005
push edi
push 0x34c
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_read_size_of_verification_secret_from_parent_pipe.
jmp 0x4033ba
mov eax, dword [ebp - 8]
shr eax, 1
cmp eax, 0xff
jbe 0x403276
mov esi, 0x8007000d
push esi
push 0x352
push str.pipe.cpp
mov edi, esi
call fcn.0043166e
push str.Verification_secret_from_parent_is_too_big.
push esi
jmp 0x4033bb
inc eax
push eax
lea eax, [ebp - 4]
push eax
call fcn.0042f547
mov edi, eax
cmp edi, ebx
jge 0x403291
push str.Failed_to_allocate_buffer_for_verification_secret.
jmp 0x4033ba
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp + 8]
call esi
test eax, eax
jne 0x4032de
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x4032b9
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
cmp edi, ebx
jl 0x4032c4
mov edi, 0x80004005
push edi
push 0x35a
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_read_verification_secret_from_parent_pipe.
jmp 0x4033ba
push 0xffffffffffffffff
push dword [ebp + 0xc]
push 0xffffffffffffffff
push dword [ebp - 4]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
je 0x403316
mov esi, 0x8007000d
push esi
push 0x361
push str.pipe.cpp
mov edi, esi
call fcn.0043166e
push str.Verification_secret_from_parent_does_not_match.
jmp 0x403270
push ebx
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call esi
test eax, eax
jne 0x403360
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x40333e
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
cmp edi, ebx
jl 0x403349
mov edi, 0x80004005
push edi
push 0x367
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_read_verification_process_id_from_parent_pipe.
jmp 0x4033ba
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
cmp eax, ebx
jne 0x4033d8
mov eax, dword [ebp - 0x10]
mov dword [ecx], eax
push ebx
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4033c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x40339a
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
cmp edi, ebx
jl 0x4033a5
mov edi, 0x80004005
push edi
push 0x378
push str.pipe.cpp
call fcn.0043166e
push str.Failed_to_inform_parent_process_that_child_is_running.
push edi
call fcn.0042eef6
pop ecx
pop ecx
cmp dword [ebp - 4], ebx
je 0x4033cf
push dword [ebp - 4]
call fcn.0042f657
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp eax, dword [ebp - 0x10]
je 0x40336e
mov esi, 0x8007000d
push esi
push 0x372
push str.pipe.cpp
mov edi, esi
call fcn.0043166e
push str.Verification_process_id_from_parent_does_not_match.
jmp 0x403270