Function at 0x50efd0
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59e1f0
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x6091d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x24]
mov dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp + 8]
call fcn.00515820
cmp dword [eax + 0x14], 8
jb 0x50f019
mov eax, dword [eax]
push 0
push 0
push 0x1000
push 0x1000
push 0xff
push 6
push 0x40000003
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov ecx, dword [ebp - 0x14]
mov esi, eax
cmp ecx, 8
jb 0x50f051
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.004a9d40
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
test esi, esi
je 0x50f1dd
cmp esi, 0xffffffff
je 0x50f1dd
push eax
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x68]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00503260
mov byte [ebp - 4], 1
lea edx, [ebp - 0x68]
mov eax, dword [ebp - 0x58]
mov ecx, esi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edi
call fcn.0050e190
push 0xffffffffffffffff
mov bl, al
lea eax, [ebp - 0x50]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
je 0x50f264
test bl, bl
je 0x50f12b
push 0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0
push eax
lea eax, [ebp - 0x68]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x50f12b
push str._Wa3rdPartyHost::ServerListen__GetOverlappedResult_failed
lea ecx, [ebp - 0x40]
call fcn.004a94b0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 3
push 1
push eax
call fcn.004c3e40
mov ecx, eax
call fcn.004c0860
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50f125
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a9d40
push esi
jmp 0x50f1b1
push 0x2f
xor eax, eax
mov dword [ebp - 0x14], 7
push str._Wa3rdPartyHost::ServerListen__client_connected
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call int.004a96a0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
push 1
push eax
call fcn.004c3e40
mov ecx, eax
call fcn.004c0860
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x50f17d
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004a9d40
push 8
call fcn.0053cd96
add esp, 4
lea ecx, [ebp + 8]
xorps xmm0, xmm0
movq qword [eax], xmm0
mov dword [eax], ecx
lea ecx, [ebp - 0x54]
push ecx
push 0
push eax
push 0x5150c0
push 0
push 0
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x50f228
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x50f005
mov ecx, esi
call fcn.0050f3f0
push 4
push esi
call fcn.0053d462
add esp, 8
jmp 0x50f005
push 0x1f4
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x50f005
xor bl, bl
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jb 0x50f208
inc ecx
push ecx
push dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
call fcn.004a9d40
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053cb86
mov esp, ebp
pop ebp
ret 0x20
push str._Wa3rdPartyHost::ServerListen__CreateThread_failed
lea ecx, [ebp - 0x40]
call fcn.004a94b0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 5
push 1
push eax
call fcn.004c3e40
mov ecx, eax
call fcn.004c0860
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50f260
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a9d40
xor bl, bl
jmp 0x50f2a9
push str._Wa3rdPartyHost::ServerListen__cancelHandle_signaled
lea ecx, [ebp - 0x40]
call fcn.004a94b0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push 1
push eax
call fcn.004c3e40
mov ecx, eax
call fcn.004c0860
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50f2a0
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a9d40
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x50f1f3
mov ecx, esi
call fcn.0050f3f0
push 4
push esi
call fcn.0053d462
add esp, 8
jmp 0x50f1f3