Function at 0x50d690
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59c760
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x6071d4]
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.00513ee0
cmp dword [eax + 0x14], 8
jb 0x50d6d9
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 0x50d711
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 0x50d89d
cmp esi, 0xffffffff
je 0x50d89d
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.00500c00
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.0050c850
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 0x50d924
test bl, bl
je 0x50d7eb
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 0x50d7eb
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.004c3520
mov ecx, eax
call fcn.004bff50
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50d7e5
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a9d40
push esi
jmp 0x50d871
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 fcn.004a96a0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
push 1
push eax
call fcn.004c3520
mov ecx, eax
call fcn.004bff50
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x50d83d
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004a9d40
push 8
call fcn.0053b416
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 0x513780
push 0
push 0
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x50d8e8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x50d6c5
mov ecx, esi
call fcn.0050dab0
push 4
push esi
call fcn.0053bae2
add esp, 8
jmp 0x50d6c5
push 0x1f4
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x50d6c5
xor bl, bl
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jb 0x50d8c8
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.0053b206
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.004c3520
mov ecx, eax
call fcn.004bff50
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50d920
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a9d40
xor bl, bl
jmp 0x50d969
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.004c3520
mov ecx, eax
call fcn.004bff50
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50d960
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 0x50d8b3
mov ecx, esi
call fcn.0050dab0
push 4
push esi
call fcn.0053bae2
add esp, 8
jmp 0x50d8b3