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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6261c8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x70bddc]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], ecx
movzx eax, byte [0x703afc]
test eax, eax
je 0x51d4bf
mov ecx, dword [ebp + 8]
push ecx
call fcn.0051d710
add esp, 4
movzx edx, al
test edx, edx
jne 0x51d4bf
push str.startupWSA_failed__A_
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x51d6f0
mov ecx, dword [ebp + 8]
push ecx
push 1
mov ecx, dword [ebp - 0x1c]
call fcn.00523540
mov byte [ebp - 0xd], 1
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edx, dword [ebp - 0x1c]
mov dword [edx + 0xa4], eax
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0xa4], 0xffffffff
jne 0x51d52b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x2726
jne 0x51d52b
push 0x689e94
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
call eax
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 0xa4], eax
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0xa4], 0xffffffff
jne 0x51d5d6
cmp dword [ebp - 0x14], 0x276d
jne 0x51d5b4
mov eax, dword [ebp + 8]
push eax
call fcn.0051d710
add esp, 4
movzx ecx, al
test ecx, ecx
jne 0x51d56f
push str.startupWSA_failed__B_
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x14]
call edx
mov byte [ebp - 0xd], 0
jmp 0x51d5b2
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 0xa4], eax
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0xa4], 0xffffffff
jne 0x51d5b2
mov eax, dword [ebp + 8]
push eax
call fcn.0051e2b0
add esp, 4
push str.Failed_to_create_TCP_socket__AF_INET_SOCK_STREAM_
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
call eax
mov byte [ebp - 0xd], 0
jmp 0x51d5d6
mov ecx, dword [ebp + 8]
push ecx
call fcn.0051e2b0
add esp, 4
push str.Failed_to_create_TCP_socket__AF_INET___SOCK_STREAM_
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x14]
call edx
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0xa8], 2
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx + 0xa4], 0xffffffff
je 0x51d6ed
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x1c]
call fcn.0051d0f0
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x51d6ed
mov ecx, dword [ebp - 0x1c]
add ecx, 0x140
call fcn.00475bf0
test eax, eax
jne 0x51d62d
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx + 0x168], 0
je 0x51d6ed
mov ecx, dword [ebp - 0x1c]
add ecx, 0x140
call fcn.00510620
push eax
push 0x689f44
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x2c]
call edx
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x168], 0
je 0x51d671
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x168]
push edx
push 0x689f50
mov ecx, dword [ebp + 8]
call fcn.004903d0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x140
call fcn.00510620
push eax
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + 0x168]
push edx
mov ecx, dword [ebp - 0x1c]
call fcn.00523120
mov byte [ebp - 0xd], al
movzx eax, byte [ebp - 0xd]
test eax, eax
jne 0x51d6ed
push 0x689f5c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
call eax
lea ecx, [ebp - 0x18]
call fcn.004726b0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x18]
push ecx
push 2
mov ecx, dword [ebp - 0x1c]
call fcn.00523540
mov edx, dword [ebp - 0x1c]
mov dword [edx + 0xa4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00472700
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 8