Function at 0x413e70
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4986f4]
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 + 0x80c8], 0xffffffff
je 0x413ea8
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00427208
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 + 0x80b4]
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 2
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 0x413fc7
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, 2
jb 0x413ef4
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 + 0x80b0], eax
mov dword [esi + 0x80c4], eax
lea eax, [ebp - 8]
push eax
push 0
push esi
push 0x4143b0
push 0
push 0
call fcn.00450cdd
add esp, 0x18
mov dword [esi + 0x80c8], eax
test eax, eax
je 0x413fc7
pop edi
pop ebx
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00427208
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x80c4]
cmp eax, 0xffffffff
je 0x413fdf
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x80c8]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x414001
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esi + 0x80c8]
call ebx
push dword [esi + 0x80c4]
call ebx
mov dword [esi + 0x80c4], 0xffffffff
mov dword [esi + 0x80c0], 0xffffffff
add esi, 0x28
mov dword [ebp - 0x2c], 2
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x41403f
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 0x414051
push eax
call ebx
mov dword [edi - 4], 0xffffffff
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x414061
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 0x414027
mov ecx, dword [ebp - 0x3c]
call fcn.00414190
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.00427208
mov esp, ebp
pop ebp
ret 4