Function at 0x506400
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x594f60
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x5ff1d4]
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.0050cca0
cmp dword [eax + 0x14], 8
jb 0x506449
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 0x506481
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.004a5150
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
test esi, esi
je 0x50660d
cmp esi, 0xffffffff
je 0x50660d
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.005068e0
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.005055c0
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 0x506694
test bl, bl
je 0x50655b
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 0x50655b
push str._Wa3rdPartyHost::ServerListen__GetOverlappedResult_failed
lea ecx, [ebp - 0x40]
call fcn.004a48c0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 3
push 1
push eax
call fcn.004be7e0
mov ecx, eax
call fcn.004bb210
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x506555
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a5150
push esi
jmp 0x5065e1
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.004a4ab0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
push 1
push eax
call fcn.004be7e0
mov ecx, eax
call fcn.004bb210
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x5065ad
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004a5150
push 8
call fcn.005341d6
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 0x50c550
push 0
push 0
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x506658
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x506435
mov ecx, esi
call fcn.00506820
push 4
push esi
call fcn.005348a2
add esp, 8
jmp 0x506435
push 0x1f4
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x506435
xor bl, bl
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jb 0x506638
inc ecx
push ecx
push dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
call fcn.004a5150
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.00533fc6
mov esp, ebp
pop ebp
ret 0x20
push str._Wa3rdPartyHost::ServerListen__CreateThread_failed
lea ecx, [ebp - 0x40]
call fcn.004a48c0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 5
push 1
push eax
call fcn.004be7e0
mov ecx, eax
call fcn.004bb210
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x506690
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a5150
xor bl, bl
jmp 0x5066d9
push str._Wa3rdPartyHost::ServerListen__cancelHandle_signaled
lea ecx, [ebp - 0x40]
call fcn.004a48c0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push 1
push eax
call fcn.004be7e0
mov ecx, eax
call fcn.004bb210
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x5066d0
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004a5150
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x506623
mov ecx, esi
call fcn.00506820
push 4
push esi
call fcn.005348a2
add esp, 8
jmp 0x506623