Function at 0x40f8a0
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4a6134]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], esi
cmp dword [esi + 0x283c8], 0xffffffff
je 0x40f8d8
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00429b0b
mov esp, ebp
pop ebp
ret 4
push ebx
push edi
push 1
lea eax, [ebp - 0x1c]
xor ecx, ecx
push eax
mov dword [ebp - 0x34], ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x28], 0xc
mov dword [ebp - 0x24], eax
lea edi, [esi + 0x28374]
lea eax, [esi + 0x10]
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x2c], 0
mov ebx, edi
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28]
push eax
push 0x3e8
push 0x6000
push 0x6000
push 0xa
push 6
push 0x40000003
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 0x18], eax
cmp eax, 0xffffffff
je 0x40f9f7
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
push 1
push 0
mov dword [ebx - 4], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [ebp - 0x30]
add dword [ebp - 0x34], 2
mov dword [ebx], eax
mov eax, dword [ebx - 4]
mov dword [ecx], eax
mov eax, dword [ebx]
add ebx, 8
mov dword [ecx + 0x14], eax
add ecx, 0x4058
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], eax
cmp eax, 0xa
jb 0x40f924
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [ebp - 0x34]
mov dword [esi + ecx*4 + 0x28370], eax
mov dword [esi + 0x283c4], eax
lea eax, [ebp - 8]
push eax
push 0
push esi
push 0x40fde0
push 0
push 0
call fcn.0045fe45
add esp, 0x18
mov dword [esi + 0x283c8], eax
test eax, eax
je 0x40f9f7
pop edi
pop ebx
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00429b0b
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x283c4]
cmp eax, 0xffffffff
je 0x40fa0f
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x283c8]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x40fa31
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esi + 0x283c8]
call ebx
push dword [esi + 0x283c4]
call ebx
mov dword [esi + 0x283c4], 0xffffffff
mov dword [esi + 0x283c0], 0xffffffff
add esi, 0x28
mov dword [ebp - 0x2c], 0xa
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40fa6f
push eax
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push dword [esi]
call ebx
mov dword [esi], 0xffffffff
mov eax, dword [edi - 4]
cmp eax, 0xffffffff
je 0x40fa81
push eax
call ebx
mov dword [edi - 4], 0xffffffff
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x40fa91
push eax
call ebx
mov dword [edi], 0xffffffff
mov dword [esi - 0x18], 0xffffffff
add edi, 8
mov dword [esi - 4], 0xffffffff
mov dword [esi + 0x4010], 0
add esi, 0x4058
sub dword [ebp - 0x2c], 1
jne 0x40fa57
mov ecx, dword [ebp - 0x3c]
call fcn.0040fbc0
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.00429b0b
mov esp, ebp
pop ebp
ret 4