Function at 0x4ff940
Capabilities:
Check mutex on windows
Create pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6bf9e5
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x78efc4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x48], 0
jne 0x4ffaff
push 0
push 1
push 0
mov dword [esi + 0x48], 2
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x4c], eax
test eax, eax
jne 0x4ff9bc
call fcn.004486f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.00531420
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
push str.Unable_to_create_server_alive_mutex._Error__0
jmp 0x4ffabc
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
push 1
push 0
call edi
mov dword [esi + 0x68], eax
test eax, eax
jne 0x4ff9ff
call fcn.004486f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.00531420
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 1
push eax
push str.Unable_to_create_overlapped_event._Error__0
jmp 0x4ffabc
push 0
push 0
push 1
push 0
call edi
mov dword [esi + 0x50], eax
test eax, eax
jne 0x4ffa3c
call fcn.004486f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.00531420
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 2
push eax
push str.Unable_to_create_monitor_stop_event._Error__0
jmp 0x4ffabc
mov edi, dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push 4
push 0xffffffffffffffff
push esi
push 0x501070
push eax
lea eax, [esi + 0x170]
push eax
call edi
test eax, eax
jne 0x4ffa7a
call fcn.004486f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.00531420
mov dword [ebp - 4], 3
jmp 0x4ffab3
push 4
push 0xffffffffffffffff
push esi
push 0x500f90
push dword [esi + 0x68]
lea eax, [esi + 0x40]
push eax
call edi
test eax, eax
jne 0x4ffb1c
call fcn.004486f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.00531420
mov dword [ebp - 4], 4
lea eax, [ebp - 0x28]
push eax
push str.Unable_to_register_wait_for_client_connection._Error__0
push 2
mov ecx, esi
call fcn.0044f2f0
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4ffaff
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4ffaf5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ffbc4
push edx
push ecx
call fcn.006779b1
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006773ff
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x38], 8
lea eax, [esi + 0x24]
jb 0x4ffb27
mov eax, dword [eax]
push dword [esi + 0x44]
push 0
push 0x40
push 0x40
push 1
push 6
push 0x40080003
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [esi + 0x3c], eax
cmp eax, 0xffffffff
jne 0x4ffbb1
call fcn.004486f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x28]
call fcn.00531420
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 5
push eax
push str.Unable_to_create_named_pipe._Error__0
push 2
mov ecx, esi
call fcn.0044f2f0
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4ffaff
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4ffaf5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ffbc4
jmp 0x4ffaf5
mov ecx, esi
call fcn.004ffbd0
cmp dword [esi + 0x48], 1
setne al
jmp 0x4ffb01
call fcn.00682da2
int3