Function at 0x4597c0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x51df40]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0xc], 1
mov byte [ebp - 6], 1
mov byte [ebp - 5], 0xff
test esi, esi
jns 0x459812
push 0x4e4ea0
push 1
call fcn.0045a0c0
add esp, 8
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
push ebx
push edi
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 0xc]
push 4
push eax
push 4
push 0xffff
push esi
call edi
mov ebx, eax
test ebx, ebx
jns 0x459852
push str.recv_setsockopt_SO_REUSEADDR_:__m_n
push 1
call fcn.0045a0c0
add esp, 8
mov eax, ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
mov eax, 2
push 0x14e9
movlpd qword [ebp - 0x1c], xmm0
mov word [ebp - 0x24], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0
mov word [ebp - 0x22], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
mov ebx, eax
test ebx, ebx
jns 0x4598b2
push str.recv_bind__:__m_n
push 1
call fcn.0045a0c0
add esp, 8
mov eax, ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push 4
movlpd qword [ebp - 0x14], xmm0
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 9
push 0
push esi
call edi
mov ebx, eax
test ebx, ebx
jns 0x4598f5
push str.recv_setsockopt_IP_PROTO_IP_:__m_n
push 1
call fcn.0045a0c0
add esp, 8
mov eax, ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
push 1
lea eax, [ebp - 5]
push eax
push 0xa
push 0
push esi
call edi
mov ebx, eax
test ebx, ebx
jns 0x45992a
push str.recv_setsockopt_IP_MULTICAST_IP_:__m_n
push 1
call fcn.0045a0c0
add esp, 8
mov eax, ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
push str.224.0.0.251
call dword [sym.imp.WS2_32.dll_inet_addr]
push 8
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 0xc
push 0
push esi
call edi
mov ebx, eax
test ebx, ebx
jns 0x45996d
push str.recv_setsockopt_IP_ADD_MEMBERSHIP_:__m_n
push 1
call fcn.0045a0c0
add esp, 8
mov eax, ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
push 1
lea eax, [ebp - 6]
push eax
push 0xb
push 0
push esi
call edi
mov ebx, eax
test ebx, ebx
jns 0x4599a2
push str.recv_setsockopt_IP_MULTICAST_LOOP_:__m_n
push 1
call fcn.0045a0c0
add esp, 8
mov eax, ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
push 4
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 1
push eax
push 0x13
push 0
push esi
call edi
mov edi, eax
test edi, edi
jns 0x4599de
push str.recv_setsockopt_IP_PKTINFO_:__m_n
push 1
call fcn.0045a0c0
add esp, 8
mov eax, edi
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret