Function at 0x56e4fb
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov dword [ebp - 0x3c], edx
test eax, eax
jne 0x56e513
or eax, 0xffffffff
jmp 0x56e803
mov ebx, eax
cmp dword [eax + 4], 0
jne 0x56e50b
mov esi, ecx
cmp dword [ebp + 8], 0xff
jbe 0x56e52d
mov dword [ebp + 8], 0xff
mov eax, dword [ebp - 0x3c]
call fcn.0042a515
test eax, eax
je 0x56e50b
mov eax, 2
bt dword [ebx], 9
jae 0x56e549
mov eax, 1
xor edx, edx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 2
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
mov dword [ebx + 4], eax
bt dword [ebx], 0xb
jae 0x56e578
mov edx, 1
mov eax, ebx
call fcn.005a39bf
and dword [ebx], 0xfffffbff
mov dword [ebp - 0x30], 1
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x30]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 4
mov dword [esp + 4], 0xffff
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
inc eax
jne 0x56e5e9
cmp dword [0x5af054], 1
jbe 0x56e5e9
mov dword [0x611418], 2
mov dword [0x611414], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 4], eax
mov dword [esp], str._core__Failed_to_set_SO_REUSEADDR:_error__d_n
call fcn.004268ea
cmp dword [ebp + 0xc], 0
je 0x56e5fd
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x56e608
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htonl]
push ecx
mov edx, eax
mov dword [ebp - 0x2c], eax
mov ecx, 0xe
xor eax, eax
lea edi, [ebp - 0x26]
rep stosb byte es:[edi], al
mov word [ebp - 0x28], 2
mov dword [ebp - 0x24], edx
movzx esi, si
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_htons]
push edi
mov word [ebp - 0x26], ax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
mov edi, dword [sym.imp.WS2_32.dll_bind]
call edi
sub esp, 0xc
inc eax
jne 0x56e6d3
xor eax, eax
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htonl]
push edx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], eax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call edi
sub esp, 0xc
inc eax
je 0x56e73d
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push edx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov dword [esp + 0x10], 8
lea eax, [ebp - 0x28]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xc
xor ecx, ecx
mov dword [esp + 4], ecx
mov eax, dword [ebx + 4]
mov dword [esp], eax
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
call edi
sub esp, 0x14
inc eax
jne 0x56e747
jmp 0x56e70a
cmp dword [ebp + 0xc], 0
je 0x56e68a
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 9
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
jmp 0x56e683
cmp dword [0x5af054], 0
je 0x56e73d
mov dword [0x611418], 1
mov dword [0x611414], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 4], eax
mov dword [esp], str._core__cannot_join_multicast:_error__d_n
call fcn.004268ea
mov eax, 0xffffffd7
jmp 0x56e803
cmp dword [ebp + 8], 0
jne 0x56e781
mov dword [ebp - 0x34], 1
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x34]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xb
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call edi
sub esp, 0x14
inc eax
jne 0x56e7e1
jmp 0x56e7ae
mov dword [esp + 0x10], 4
lea eax, [ebp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xa
xor ecx, ecx
mov dword [esp + 4], ecx
mov eax, dword [ebx + 4]
mov dword [esp], eax
call edi
sub esp, 0x14
inc eax
jne 0x56e74d
jmp 0x56e73d
cmp dword [0x5af054], 1
jbe 0x56e7e1
mov dword [0x611418], 2
mov dword [0x611414], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 4], eax
mov dword [esp], str._Socket__Cannot_disale_multicast_loop:_error__d_n
call fcn.004268ea
mov word [ebx + 8], 2
mov eax, dword [ebp - 0x28]
mov dword [ebx + 0xc], eax
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_htons]
push edx
mov word [ebx + 0xa], ax
or dword [ebx], 0x5000
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret