Function at 0x50d940
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59cb10
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.00514190
cmp dword [eax + 0x14], 8
jb 0x50d989
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 0x50d9c1
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 0x50db4d
cmp esi, 0xffffffff
je 0x50db4d
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.00500d40
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.0050cb00
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 0x50dbd4
test bl, bl
je 0x50da9b
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 0x50da9b
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.004c35f0
mov ecx, eax
call fcn.004c0010
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50da95
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a9d40
push esi
jmp 0x50db21
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.004c35f0
mov ecx, eax
call fcn.004c0010
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x50daed
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004a9d40
push 8
call fcn.0053b736
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 0x513a30
push 0
push 0
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x50db98
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x50d975
mov ecx, esi
call fcn.0050dd60
push 4
push esi
call fcn.0053b9f3
add esp, 8
jmp 0x50d975
push 0x1f4
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x50d975
xor bl, bl
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jb 0x50db78
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.0053b526
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.004c35f0
mov ecx, eax
call fcn.004c0010
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50dbd0
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a9d40
xor bl, bl
jmp 0x50dc19
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.004c35f0
mov ecx, eax
call fcn.004c0010
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50dc10
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 0x50db63
mov ecx, esi
call fcn.0050dd60
push 4
push esi
call fcn.0053b9f3
add esp, 8
jmp 0x50db63