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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x60cbf8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x70635c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 0x48]
push ecx
push str.createSocket_ipv4
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x18]
call fcn.004f5440
mov dword [ebp - 4], 0
call fcn.00517380
movzx eax, al
test eax, eax
jne 0x5181ef
mov byte [ebp - 0x21], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.004f54a0
mov al, byte [ebp - 0x21]
jmp 0x518405
mov ecx, dword [ebp - 0x28]
call fcn.0051d5b0
mov byte [ebp - 0x19], 1
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0xa4], eax
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0xa4], 0xffffffff
jne 0x518255
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x2726
jne 0x518255
push 0x69823c
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
mov ecx, dword [ebp + 0xc]
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 - 0x28]
mov dword [ecx + 0xa4], eax
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0xa4], 0xffffffff
jne 0x518304
cmp dword [ebp - 0x20], 0x276d
jne 0x5182e0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00517420
add esp, 4
movzx ecx, al
test ecx, ecx
jne 0x518299
push str.startupWSA_failed__B_
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax + 0x14]
call edx
mov byte [ebp - 0x19], 0
jmp 0x5182de
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0xa4], eax
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0xa4], 0xffffffff
jne 0x5182de
mov eax, dword [ebp + 0xc]
push eax
push 0
call fcn.00518ec0
add esp, 8
push str.Failed_to_create_TCP_socket__AF_INET_SOCK_STREAM_
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
call eax
mov byte [ebp - 0x19], 0
jmp 0x518304
mov ecx, dword [ebp + 0xc]
push ecx
push 0
call fcn.00518ec0
add esp, 8
push str.Failed_to_create_TCP_socket__AF_INET___SOCK_STREAM_
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax + 0x14]
call edx
mov byte [ebp - 0x19], 0
mov eax, dword [ebp - 0x28]
mov dword [eax + 0xa8], 2
mov ecx, dword [ebp - 0x28]
cmp dword [ecx + 0xa4], 0xffffffff
je 0x5183ed
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp - 0x28]
call fcn.00517b10
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x5183ed
mov ecx, dword [ebp + 8]
add ecx, 0xadc
call fcn.004e9da0
test eax, eax
jne 0x51835b
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0xb50], 0
je 0x5183ed
mov edx, dword [ebp + 8]
add edx, 0xadc
push edx
push 0x6982ec
mov ecx, dword [ebp + 0xc]
call fcn.004f5070
mov eax, dword [ebp + 8]
cmp dword [eax + 0xb50], 0
je 0x518395
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb50]
push edx
push 0x6982f8
mov ecx, dword [ebp + 0xc]
call fcn.004f50b0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0xadc
call fcn.005d1cb0
push eax
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0xb50]
push edx
mov ecx, dword [ebp - 0x28]
call fcn.0051cd70
mov byte [ebp - 0x19], al
movzx eax, byte [ebp - 0x19]
test eax, eax
jne 0x5183ed
push 0x698304
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp - 0x28]
call fcn.0051d5b0
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0xa4], 0xffffffff
mov dl, byte [ebp - 0x19]
mov byte [ebp - 0x22], dl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.004f54a0
mov al, byte [ebp - 0x22]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 0xc