Function at 0x513070
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a2470
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x6121d4]
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.005198d0
cmp dword [eax + 0x14], 8
jb 0x5130b9
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 0x5130f1
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.004abec0
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
test esi, esi
je 0x51327d
cmp esi, 0xffffffff
je 0x51327d
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.00507300
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.00512230
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 0x513304
test bl, bl
je 0x5131cb
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 0x5131cb
push str._Wa3rdPartyHost::ServerListen__GetOverlappedResult_failed
lea ecx, [ebp - 0x40]
call fcn.004ab630
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 3
push 1
push eax
call fcn.004c7930
mov ecx, eax
call fcn.004c4350
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x5131c5
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004abec0
push esi
jmp 0x513251
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.004ab820
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
push 1
push eax
call fcn.004c7930
mov ecx, eax
call fcn.004c4350
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x51321d
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004abec0
push 8
call fcn.00540e66
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 0x519170
push 0
push 0
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x5132c8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x5130a5
mov ecx, esi
call fcn.00513490
push 4
push esi
call fcn.00541532
add esp, 8
jmp 0x5130a5
push 0x1f4
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x5130a5
xor bl, bl
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jb 0x5132a8
inc ecx
push ecx
push dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
call fcn.004abec0
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.00540c56
mov esp, ebp
pop ebp
ret 0x20
push str._Wa3rdPartyHost::ServerListen__CreateThread_failed
lea ecx, [ebp - 0x40]
call fcn.004ab630
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 5
push 1
push eax
call fcn.004c7930
mov ecx, eax
call fcn.004c4350
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x513300
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004abec0
xor bl, bl
jmp 0x513349
push str._Wa3rdPartyHost::ServerListen__cancelHandle_signaled
lea ecx, [ebp - 0x40]
call fcn.004ab630
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push 1
push eax
call fcn.004c7930
mov ecx, eax
call fcn.004c4350
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x513340
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004abec0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x513293
mov ecx, esi
call fcn.00513490
push 4
push esi
call fcn.00541532
add esp, 8
jmp 0x513293