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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
cmp dword [esi + 4], ebp
je 0x421fa1
cmp dword [esi + 8], ebp
je 0x4220f2
cmp dword [esi + 0x10], 0xffffffff
jne 0x421e53
lea eax, [esi + 0x254]
lea ecx, [esi + 0x14]
push eax
push 0x1388
push 0x800
push 0x800
push 0xff
push 6
push 3
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4220f2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov dword [esi + 0x10], edi
lea ebp, [esi + 0x220]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x21c]
test eax, eax
jne 0x421e7e
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x421f8c
mov edx, dword [esi + 0x218]
mov ecx, edx
mov eax, dword [edx]
mov ebx, dword [eax + 8]
mov eax, dword [ecx]
push eax
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
call sub.MFC42u.DLL_operatordelete
mov eax, dword [esi + 0x21c]
add esp, 4
dec eax
push ebp
mov dword [esi + 0x21c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebx + 4]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x14]
push 0
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0x10]
push eax
lea ecx, [esp + 0x20]
push 4
push ecx
push edx
mov dword [esp + 0x28], 0
call edi
cmp dword [esp + 0x14], 4
jne 0x421f1f
mov ecx, dword [esp + 0x18]
mov edx, dword [ebx]
lea eax, [esp + 0x14]
push 0
push eax
mov eax, dword [esi + 0x10]
push ecx
push edx
push eax
call edi
mov eax, dword [ebx + 8]
test eax, eax
je 0x421f0c
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebx]
push ecx
call sub.MFC42u.DLL_operatordelete
push ebx
call sub.MFC42u.DLL_operatordelete
add esp, 8
jmp 0x421f8c
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x218]
push 0xc
mov edi, dword [edx]
mov eax, dword [edi + 4]
mov dword [esp + 0x20], eax
call sub.MFC42u.DLL_operatornew
add esp, 4
mov ecx, edi
test edi, edi
jne 0x421f47
mov ecx, eax
mov dword [eax], ecx
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x421f53
mov ecx, eax
mov dword [eax + 4], ecx
mov dword [edi + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
add eax, 8
test eax, eax
je 0x421f67
mov dword [eax], ebx
mov edx, dword [esi + 0x21c]
push ebp
inc edx
mov dword [esi + 0x21c], edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [esi + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov dword [esi + 0x10], 0xffffffff
mov eax, dword [esi + 8]
test eax, eax
jne 0x421e0d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
mov eax, dword [esi + 8]
mov byte [esp + 0x13], 1
cmp eax, ebp
je 0x4220f2
mov al, byte [esp + 0x13]
test al, al
je 0x421fd6
lea eax, [esi + 0x14]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x421fd6
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4220e5
mov eax, dword [esi + 0x10]
or ebx, 0xffffffff
cmp eax, ebx
jne 0x421ffc
push ebp
push 0x40000000
push 3
push ebp
push ebp
lea ecx, [esi + 0x14]
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x10]
cmp eax, ebx
jne 0x422010
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4220e5
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x18]
push ebp
push edx
lea ecx, [esp + 0x1c]
push 4
push ecx
push eax
mov byte [esp + 0x27], 0
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], ebp
call edi
test eax, eax
je 0x4220dd
cmp dword [esp + 0x14], ebp
je 0x4220dd
push 0xc
call sub.MFC42u.DLL_operatornew
mov edx, dword [esp + 0x18]
mov ebx, eax
mov dword [esp + 0x20], ebx
mov dword [ebx + 4], edx
mov eax, dword [esp + 0x18]
push eax
call sub.MFC42u.DLL_operatornew
add esp, 8
mov dword [ebx], eax
test eax, eax
je 0x4220e5
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push 0
push ecx
push edx
push eax
mov eax, dword [esi + 0x10]
push eax
call edi
lea ebx, [esi + 0x220]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esi + 0x218]
push 0xc
mov ebp, dword [edi + 4]
call sub.MFC42u.DLL_operatornew
add esp, 4
mov ecx, edi
test edi, edi
jne 0x4220a7
mov ecx, eax
test ebp, ebp
mov dword [eax], ecx
jne 0x4220af
mov ebp, eax
mov dword [eax + 4], ebp
mov dword [edi + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
add eax, 8
test eax, eax
je 0x4220c7
mov edx, dword [esp + 0x1c]
mov dword [eax], edx
mov ecx, dword [esi + 0x21c]
push ebx
inc ecx
mov dword [esi + 0x21c], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4220e5
mov byte [esp + 0x13], 1
mov dword [esi + 0x10], ebx
mov eax, dword [esi + 8]
xor ebp, ebp
cmp eax, ebp
jne 0x421fb1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret