Function at 0x10005850
Capabilities:
Connect pipe
Create pipe
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10099750
mov eax, dword fs:[0]
push eax
sub esp, 0x150
mov eax, dword [0x100b5004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x120], esi
push 0x1002c
call fcn.1007bcba
mov edi, eax
xorps xmm0, xmm0
add esp, 4
mov dword [ebp - 0x11c], edi
mov dword [edi + 0x14], 0
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov eax, dword [edi + 0x14]
test eax, eax
je 0x100058c3
cmp eax, 1
je 0x100058c3
mov dword [edi + 0x2c], 0
jmp 0x100058d0
lea eax, [edi + 0x2c]
mov dword [edi + 0x1c], 0x10000
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov al, byte [esi + 0x46]
cmp al, 2
jne 0x100059c1
mov eax, dword [edi + 0x20]
mov dword [ebp - 0x120], eax
mov eax, dword [esi + 0x4150]
mov esi, dword [0x100df518]
push esi
mov dword [ebp - 0x11c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x11c]
cmp ecx, dword [0x100df520]
jae 0x100059b0
mov eax, dword [0x100df51c]
cmp dword [eax + ecx*8], 0
je 0x100059b0
mov eax, dword [eax + ecx*8 + 4]
push esi
mov dword [ebp - 0x11c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x11c]
mov eax, dword [ecx + 0x458]
sub eax, 0x66
je 0x100059a6
sub eax, 0x62
je 0x100059a6
sub eax, 1
je 0x10005962
mov esi, 0x54f
jmp 0x10005cb5
push ecx
push edi
lea eax, [edi + 0x1c]
push eax
push dword [ebp - 0x120]
lea eax, [edi + 0x18]
push eax
call fcn.100159c6
mov esi, eax
test esi, esi
je 0x1000598b
cmp esi, 0x3e5
jne 0x10005cb5
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret
mov esi, 0x32
jmp 0x10005cb5
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, 6
jmp 0x10005cb5
cmp al, 7
jne 0x10005c47
lea eax, [esi + 4]
push eax
lea eax, [ebp - 0x114]
push str..pipe_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x114]
push 0
push 0
push 0x1000
push 0x1000
push 0xff
push 0
push 0x40000003
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov esi, eax
mov dword [ebp - 0x118], esi
cmp esi, 0xffffffff
jne 0x10005a23
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10005cb1
push 0
push 1
push esi
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0x80
call fcn.1007bcba
mov dword [ebp - 0x124], eax
push 0x80
push 0
push eax
mov dword [ebp - 4], 0
call fcn.1007d2d0
push 0x160
call fcn.1007bcba
push 0x160
mov edi, eax
push 0
push edi
mov dword [ebp - 0x128], edi
call fcn.1007d2d0
add esp, 0x20
mov dword [edi + 4], esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi], vtable.CXSmbSoPipeClient.0
push 0
push 0
push 1
push 0
call esi
push 0
push 0
push 1
push 0
mov dword [edi + 0x2c], eax
mov dword [edi + 0x24], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x1c], 0
call esi
push 0
push 0
push 1
push 0
mov dword [edi + 0x18], eax
mov dword [edi + 0x10], 0
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
call esi
mov dword [edi + 0x30], eax
movzx eax, byte [ebp - 0x158]
mov byte [ebp - 0x148], al
movzx eax, byte [ebp - 0x157]
mov byte [ebp - 0x147], al
movzx eax, byte [ebp - 0x156]
mov byte [ebp - 0x146], al
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x144], eax
lea eax, [ebp - 0x150]
mov dword [ebp - 0x150], 0x100a9e18
mov dword [ebp - 0x14c], 0x10005ee0
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x124]
lea esi, [eax + 0x30]
mov dword [eax], vtable.CXSmbServer.0
mov dword [esi + 0x24], 0
mov byte [ebp - 4], 3
add eax, 0x24
mov edx, dword [edi]
mov ecx, edi
push eax
push 5
call dword [edx + 0x1c]
mov eax, dword [ebp - 0x124]
push 0x200034
mov dword [eax + 0x20], edi
call fcn.1007bcba
add esp, 4
mov edx, eax
mov dword [ebp - 0x128], edx
lea eax, [edx + 0xc]
mov edi, dword [ebp - 0x124]
mov dword [edx], eax
mov dword [edx + 4], eax
mov dword [edx + 8], 0
lea eax, [edi + 4]
mov dword [edi + 0x28], edx
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [ebp - 0x150]
mov ecx, esi
push eax
call fcn.100063a0
push 8
call fcn.1007bcba
add esp, 4
mov dword [ebp - 0x128], eax
xorps xmm0, xmm0
mov byte [ebp - 4], 4
mov ecx, eax
movq qword [eax], xmm0
call fcn.10003420
mov dword [edi + 0x1c], eax
mov dword [edi + 0x78], 0
mov ecx, dword [ebp - 0x12c]
test ecx, ecx
je 0x10005be6
mov edx, dword [ecx]
lea eax, [ebp - 0x150]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0x120]
mov esi, dword [ebp - 0x118]
push 0
push edi
push dword [eax + 0x4154]
push esi
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
jne 0x10005c19
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x11c]
mov esi, eax
jmp 0x10005cb1
mov edi, dword [ebp - 0x11c]
push edi
push esi
mov dword [edi + 0x18], esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x10005989
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x3e5
jne 0x10005cb1
jmp 0x10005989
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [edi + 0x18], eax
cmp eax, 0xffffffff
jne 0x10005c6b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
jmp 0x10005cb1
push edi
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x118], 0
push ecx
push 0x20
push 0x20
push 0
push dword [edi + 0x20]
push eax
push dword [esi + 0x4150]
mov eax, dword [esi + 0x4160]
call eax
test eax, eax
jne 0x10005989
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x3e5
je 0x10005989
test esi, esi
je 0x10005ce0
cmp dword [edi + 0x14], 2
jne 0x10005cd2
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x10005cd2
push eax
call fcn.1007bd0d
add esp, 4
mov dword [edi + 0x2c], 0
push 0x1002c
push edi
call fcn.1007bcac
add esp, 8
mov eax, esi
jmp 0x1000598b