Function at 0x4e9520
Capabilities:
Connect pipe
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb4
mov eax, dword [0x58f070]
xor eax, esp
mov dword [esp + 0xb0], eax
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
lea ebx, [esi + 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esi + 0x39], 0
je 0x4e9575
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 5
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.0050ce8d
mov esp, ebp
pop ebp
ret 0x18
lea ecx, [esi + 0x44]
call fcn.004ef6f0
cmp dword [edi + 0x14], 8
jb 0x4e9587
mov ecx, dword [edi]
jmp 0x4e9589
mov ecx, edi
mov edx, dword [edi + 0x10]
push 0
push 0x55c340
call fcn.004143b0
add esp, 8
test eax, eax
je case.default.0x4e95f9
push edi
mov edx, str..pipe_
lea ecx, [esp + 0x14]
call fcn.00414d80
add esp, 4
mov ecx, esi
push eax
call fcn.004128d0
mov eax, dword [esp + 0x24]
cmp eax, 8
jb 0x4e95d5
inc eax
lea ecx, [esp + 0x10]
push eax
push dword [esp + 0x14]
call fcn.004132e0
xor eax, eax
mov dword [esp + 0x24], 7
mov word [esp + 0x10], ax
mov eax, dword [ebp + 8]
dec eax
mov dword [esp + 0x20], 0
cmp eax, 3
ja case.default.0x4e95f9
jmp dword [eax*4 + 0x4e9aa4]
push str._OUT
mov edx, esi
mov dword [esi + 0x18], 1
lea ecx, [esp + 0x2c]
call fcn.00413420
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x4e9622
mov eax, dword [eax]
push 0
push 0
push 0xfa000
push 0xfa000
push 1
push 1
push 2
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
lea ecx, [esp + 0x28]
mov edi, eax
call fcn.00412890
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp edi, 0xffffffff
je 0x4e975a
test edi, edi
je 0x4e975a
push 0x577658
mov edx, esi
mov dword [esi + 0x74], edi
lea ecx, [esp + 0x44]
call fcn.00413420
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x4e967f
mov eax, dword [eax]
push 0
push 0
push 0xfa000
push 0xfa000
push 1
push 1
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
lea ecx, [esp + 0x40]
mov edi, eax
call fcn.00412890
call ebx
cmp edi, 0xffffffff
je 0x4e9753
test edi, edi
je 0x4e9753
mov dword [esi + 0x70], edi
xor edi, edi
jmp 0x4e96c6
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push dword [esi + 0x70]
inc edi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x4e96dd
mov ebx, 1
jmp 0x4e96e9
call ebx
xor ebx, ebx
cmp eax, 0x217
sete bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x4e9704
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, 0x8ca0
jl 0x4e96c0
inc edi
push 0
push 0
push 0
push dword [esi + 0x70]
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
cmp edi, 0x8ca1
je 0x4e9830
push 0
push dword [esi + 0x74]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x4e9735
mov ebx, 1
jmp 0x4e9745
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x217
sete bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x4e99f6
mov ecx, esi
call fcn.004e9d30
lea eax, [esi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffffa
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.0050ce8d
mov esp, ebp
pop ebp
ret 0x18
push str._OUT
mov edx, esi
mov dword [esi + 0x18], 1
lea ecx, [esp + 0x5c]
call fcn.00413420
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x4e97a2
mov eax, dword [eax]
push 0
push 0
push 0xfa000
push 0xfa000
push 1
push 1
push 2
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
lea ecx, [esp + 0x58]
mov edi, eax
call fcn.00412890
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp edi, 0xffffffff
je 0x4e975a
test edi, edi
je 0x4e975a
mov dword [esi + 0x74], edi
xor edi, edi
nop
push 0
push dword [esi + 0x74]
inc edi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x4e97f7
mov ebx, 1
jmp 0x4e9803
call ebx
xor ebx, ebx
cmp eax, 0x217
sete bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x4e9824
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0x8ca0
jl 0x4e97e0
inc edi
cmp edi, 0x8ca1
jne 0x4e99f6
mov ecx, esi
call fcn.004e9d30
lea eax, [esi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.0050ce8d
mov esp, ebp
pop ebp
ret 0x18
mov dword [esi + 0x18], 3
mov edi, 1
nop dword [eax]
mov eax, dword [esi + 0x70]
cmp eax, 0xffffffff
je 0x4e987c
test eax, eax
jne 0x4e98c9
push str._OUT
mov edx, esi
mov dword [esi + 0x70], 0
lea ecx, [esp + 0x74]
call fcn.00413420
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x4e989e
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esp + 0x70]
mov dword [esi + 0x70], eax
call fcn.00412890
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x74]
cmp eax, 0xffffffff
je 0x4e98d5
test eax, eax
jne 0x4e9928
push 0x577658
mov edx, esi
mov dword [esi + 0x74], 0
lea ecx, [esp + 0x8c]
call fcn.00413420
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x4e98fa
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esp + 0x88]
mov dword [esi + 0x74], eax
call fcn.00412890
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x70]
cmp eax, 0xffffffff
je 0x4e9944
test eax, eax
je 0x4e9944
mov eax, dword [esi + 0x74]
cmp eax, 0xffffffff
je 0x4e9944
test eax, eax
jne 0x4e99f9
cmp edi, 0x57e40
je 0x4e9a36
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x57e40
jle 0x4e9870
jmp 0x4e99f9
mov dword [esi + 0x18], 3
mov edi, 1
nop word [eax + eax]
push str._OUT
mov edx, esi
lea ecx, [esp + 0xa4]
call fcn.00413420
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x4e999e
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esp + 0xa0]
mov ebx, eax
call fcn.00412890
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 0xffffffff
je 0x4e99d4
test ebx, ebx
jne 0x4e99f3
cmp edi, 0x57e40
je 0x4e975a
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x57e40
jle 0x4e9980
jmp 0x4e99f6
mov dword [esi + 0x70], ebx
lea ebx, [esi + 0x20]
cmp dword [ebp + 8], 2
mov byte [esi + 0x39], 1
je 0x4e9a60
lea eax, [esp + 0xb8]
mov byte [esi + 0x38], 1
push eax
push 0
push esi
push 0x4e9120
push 0
push 0
mov dword [esp + 0xd0], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x4e9a60
mov byte [esi + 0x38], al
mov ecx, esi
call fcn.004e9d30
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffffa
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.0050ce8d
mov esp, ebp
pop ebp
ret 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.0050ce8d
mov esp, ebp
pop ebp
ret 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xbc]
mov eax, 0xfffffff9
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0050ce8d
mov esp, ebp
pop ebp
ret 0x18