Function at 0x5164e0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7484e6
mov eax, dword fs:[0]
push eax
sub esp, 0xd4
mov eax, dword [0x899944]
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 + 0xc]
mov eax, dword [ebp + 8]
mov esi, ecx
movzx ecx, byte [edi + 0xad]
push ecx
push str.createSocket_ipv4
push edi
lea ecx, [ebp - 0xe0]
mov dword [ebp - 0xd0], eax
call fcn.00474f30
cmp byte [0x8967cc], 0
mov dword [ebp - 4], 0
je 0x51658c
lea ecx, [ebp - 0xc8]
call fcn.00420de0
lea ebx, [ebp - 0xc8]
mov byte [ebp - 4], 1
call fcn.00511dc0
mov byte [ebp - 4], 0
mov ecx, ebx
test al, al
jne 0x516587
call fcn.00420e00
lea ecx, [ebp - 0xe0]
mov dword [ebp - 4], 0xffffffff
call fcn.00474f80
xor al, al
jmp 0x516792
call fcn.00420e00
mov ecx, esi
call fcn.00513cb0
mov ebx, dword [sym.imp.WS2_32.dll_socket]
push 0
push 1
push 2
mov byte [ebp - 0xc9], 1
mov dword [ebp - 0xd4], 0
call ebx
mov dword [esi + 0xb4], eax
cmp eax, 0xffffffff
jne 0x51661c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xd4], eax
cmp eax, 0x2726
jne 0x5165e0
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
push str.Retry_with_IPPROTO_TCP_explicitly_specified...
mov ecx, edi
call eax
jmp 0x51660e
cmp eax, 0x2734
jne 0x51661c
push 0x14
call fcn.004213c0
add esp, 4
push 0
push 1
push 2
call ebx
mov dword [esi + 0xb4], eax
cmp eax, 0xffffffff
jne 0x51661c
push 0x14
call fcn.004213c0
add esp, 4
push 6
push 1
push 2
call ebx
mov dword [esi + 0xb4], eax
cmp dword [esi + 0xb4], 0xffffffff
jne 0x516693
cmp dword [ebp - 0xd4], 0x276d
jne 0x51666c
mov ebx, edi
call fcn.00511dc0
test al, al
jne 0x516643
push str.startupWSA_failed__B_
jmp 0x516683
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0xb4], eax
cmp eax, 0xffffffff
jne 0x516693
push edi
push 0
call fcn.005146c0
add esp, 8
push str.Failed_to_create_TCP_socket__AF_INET_SOCK_STREAM_
jmp 0x516683
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push edi
push 0
push eax
call fcn.005126e0
add esp, 0xc
push str.Failed_to_create_TCP_socket__AF_INET___SOCK_STREAM_
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
mov ecx, edi
call eax
mov byte [ebp - 0xc9], 0
cmp dword [esi + 0xb4], 0xffffffff
mov dword [esi + 0xb8], 2
je 0x51677a
mov ebx, dword [ebp - 0xd0]
cmp byte [ebx + 0xb1c], 0
jne 0x5166c1
push edi
mov ecx, esi
call fcn.00512240
cmp byte [ebx + 0xb24], 0
jne 0x5166d2
push edi
mov ecx, esi
call fcn.005122c0
cmp byte [ebp + 0x10], 0
je 0x51677a
add ebx, 0xb28
mov ecx, ebx
call fcn.00409da0
test eax, eax
jne 0x5166fb
mov ecx, dword [ebp - 0xd0]
cmp dword [ecx + 0xb9c], eax
je 0x51677a
push ebx
push str.bindIpAddr
mov ecx, edi
call fcn.00474890
mov edx, dword [ebp - 0xd0]
mov eax, dword [edx + 0xb9c]
test eax, eax
je 0x516725
push eax
push str.bindPort
mov ecx, edi
call fcn.00474a80
push edi
lea eax, [ebp - 0xc9]
push eax
mov ecx, ebx
mov byte [ebp - 0xc9], 0
call fcn.00409d90
mov ecx, dword [ebp - 0xd0]
movzx edx, word [ecx + 0xb9c]
push eax
push edx
mov ecx, esi
call fcn.00515070
mov byte [ebp - 0xc9], al
test al, al
jne 0x51677a
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.Failed_to_bind_to_local_IP_address
mov ecx, edi
call edx
mov ecx, esi
call fcn.00513cb0
mov dword [esi + 0xb4], 0xffffffff
lea ecx, [ebp - 0xe0]
mov dword [ebp - 4], 0xffffffff
call fcn.00474f80
mov al, byte [ebp - 0xc9]
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.0070bb4c
mov esp, ebp
pop ebp
ret 0xc