Function at 0x421f60
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
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x422113
mov eax, dword [esi + 8]
test eax, eax
je 0x422281
cmp dword [esi + 0x10], 0xffffffff
jne 0x421fc5
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 0x422281
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 0x421fe8
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4220f6
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 0x422089
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 0x422076
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 0x4220fe
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 0x4220b1
mov ecx, eax
mov dword [eax], ecx
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x4220bd
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 0x4220d1
mov dword [eax], ebx
mov edi, dword [esi + 0x21c]
push ebp
inc edi
mov dword [esi + 0x21c], edi
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
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esi + 8]
test eax, eax
jne 0x421f7f
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
test eax, eax
je 0x422281
mov al, byte [esp + 0x13]
test al, al
je 0x42213f
lea eax, [esi + 0x14]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x42226e
mov eax, dword [esi + 0x10]
or edi, 0xffffffff
cmp eax, edi
jne 0x422168
push 0
push 0x40000000
push 3
push 0
push 0
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, edi
je 0x42226e
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x18]
push 0
push edx
lea ecx, [esp + 0x1c]
push 4
push ecx
push eax
mov byte [esp + 0x27], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
call ebx
test eax, eax
je 0x422266
mov eax, dword [esp + 0x14]
test eax, eax
je 0x422266
cmp eax, 0x100000
jae 0x422266
push 0xc
call sub.MFC42u.DLL_operatornew
mov edx, dword [esp + 0x18]
mov edi, eax
mov dword [esp + 0x20], edi
mov dword [edi + 4], edx
mov eax, dword [esp + 0x18]
push eax
call sub.MFC42u.DLL_operatornew
add esp, 8
mov dword [edi], eax
test eax, eax
je 0x422276
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 ebx
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
cmp ecx, eax
jne 0x422276
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 0x422230
mov ecx, eax
test ebp, ebp
mov dword [eax], ecx
jne 0x422238
mov ebp, eax
mov dword [eax + 4], ebp
mov dword [edi + 4], eax
mov edx, dword [eax + 4]
mov dword [edx], eax
add eax, 8
test eax, eax
je 0x422250
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
mov ecx, dword [esi + 0x21c]
push ebx
inc ecx
mov dword [esi + 0x21c], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x422276
mov byte [esp + 0x13], 1
mov dword [esi + 0x10], edi
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esi + 8]
test eax, eax
jne 0x422123
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret