Function at 0x40d2f0
Capabilities:
Read file on windows
Read pipe
Terminate process
Terminate thread

Disassembly:
mov eax, 0x2010
call fcn.0040e740
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [0x426abc], edi
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x28]
cmp eax, edi
je 0x40d326
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [esi + 0x28], edi
mov eax, dword [esi + 0x18]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
je 0x40d398
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x14]
push edx
push ecx
lea edx, [esp + 0x28]
push 0x1000
push edx
push eax
call ebx
cmp dword [esp + 0x14], edi
jbe 0x40d37f
mov edx, dword [esi + 0x18]
lea eax, [esp + 0x10]
push edi
push eax
lea ecx, [esp + 0x24]
push 0x1000
push ecx
push edx
call ebp
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x40d398
lea ecx, [esp + 0x1c]
mov word [esp + eax*2 + 0x1c], di
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 4]
mov eax, dword [esi + 0x1c]
cmp eax, edi
je 0x40d3f1
lea edx, [esp + 0x18]
lea ecx, [esp + 0x14]
push edx
lea edx, [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x28]
push 0x1000
push ecx
push eax
call ebx
cmp dword [esp + 0x14], edi
jbe 0x40d3d7
mov ecx, dword [esi + 0x1c]
lea edx, [esp + 0x10]
push edi
push edx
lea eax, [esp + 0x24]
push 0x1000
push eax
push ecx
call ebp
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x40d3f1
mov edx, dword [esi]
mov word [esp + eax*2 + 0x1c], di
push eax
lea eax, [esp + 0x20]
push eax
mov ecx, esi
call dword [edx + 8]
mov eax, dword [esi + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, edi
je 0x40d401
push eax
call ebx
mov eax, dword [esi + 0xc]
mov dword [esi + 8], edi
cmp eax, edi
je 0x40d40e
push eax
call ebx
mov eax, dword [esi + 0x10]
mov dword [esi + 0xc], edi
cmp eax, edi
je 0x40d41b
push eax
call ebx
mov eax, dword [esi + 0x14]
mov dword [esi + 0x10], edi
cmp eax, edi
je 0x40d428
push eax
call ebx
mov eax, dword [esi + 0x20]
mov ebx, dword [sym.imp.KERNEL32.dll_TerminateThread]
cmp eax, edi
mov dword [esi + 0x14], edi
je 0x40d45f
call fcn.0040cf90
test eax, eax
jne 0x40d449
mov ecx, dword [esi + 0x20]
push 1
push ecx
call ebx
mov edx, dword [esi + 0x20]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x3e8
push edx
call ebp
mov dword [esi + 0x20], edi
jmp 0x40d465
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x18]
cmp eax, edi
je 0x40d473
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x24]
mov dword [esi + 0x18], edi
cmp eax, edi
je 0x40d49c
call fcn.0040cf90
test eax, eax
jne 0x40d48e
mov eax, dword [esi + 0x24]
push 1
push eax
call ebx
mov ecx, dword [esi + 0x24]
push 0x3e8
push ecx
call ebp
mov dword [esi + 0x24], edi
mov eax, dword [esi + 0x1c]
cmp eax, edi
je 0x40d4aa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
mov dword [esi + 0x1c], edi
call fcn.0040d2c0
test eax, eax
je 0x40d4cf
mov edx, dword [esi + 0x2c]
push 1
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esi + 0x2c]
push 0x3e8
push eax
call ebp
mov eax, dword [esi + 4]
pop ebp
cmp eax, edi
mov dword [esi + 0x2c], edi
pop ebx
je 0x40d4e2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], edi
pop edi
pop esi
add esp, 0x2010
ret