Function at 0x40a310
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54db78
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x5a2740]
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, ecx
call fcn.004124b6
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x40a359
push 0x80004005
call fcn.004017c0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 0
mov dword [edi + 0xbbc], 0
mov dword [edi + 0xbc4], 0
mov eax, dword [edi + 0xbc8]
cmp dword [eax - 0xc], 0
mov ebx, dword [eax - 0x10]
lea edx, [eax - 0x10]
je 0x40a3e2
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x40a3be
cmp dword [eax - 8], 0
jge 0x40a3aa
push 0x80070057
call fcn.004017c0
mov dword [eax - 0xc], 0
mov eax, dword [edi + 0xbc8]
xor ecx, ecx
mov word [eax], cx
jmp 0x40a3e2
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40a3d2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi + 0xbc8], eax
mov eax, dword [edi + 0xbcc]
lea ebx, [edi + 0xbcc]
cmp dword [eax - 0xc], 0
mov ecx, dword [eax - 0x10]
lea edx, [eax - 0x10]
mov dword [ebp - 0x2c], ecx
je 0x40a447
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x40a426
cmp dword [eax - 8], 0
jge 0x40a416
push 0x80070057
call fcn.004017c0
mov dword [eax - 0xc], 0
mov eax, dword [ebx]
xor ecx, ecx
mov word [eax], cx
jmp 0x40a447
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40a43a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
xorps xmm0, xmm0
movq qword [edi + 0x18], xmm0
push str.224.0.0.251
movq qword [edi + 0x20], xmm0
call dword [sym.imp.WSOCK32.dll_inet_addr]
push dword [edi + 0x14]
mov dword [edi + 0x1c], eax
lea eax, [ebp - 0x24]
push str.My_IPAddress__s_n
push eax
call fcn.00401890
mov eax, dword [ebp - 0x24]
add esp, 0xc
push dword [eax - 0xc]
lea ecx, [edi + 0xbc8]
push eax
call fcn.00402e80
push dword [edi + 0x1c]
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
lea eax, [ebp - 0x24]
push str.My_Multicast__s_n
push eax
call fcn.00401890
mov eax, dword [ebp - 0x24]
add esp, 0xc
push dword [eax - 0xc]
lea ecx, [edi + 0xbc8]
push eax
call fcn.00402e80
push 2
push 0
push 0x3f
push 2
mov ecx, edi
mov byte [edi + 0xbc0], 1
call fcn.00415ecf
cmp eax, 1
sete bl
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x2c], eax
mov ecx, 0x580308
mov edx, 0x2714
cmp edx, eax
je 0x40a4f4
mov edx, dword [ecx + 8]
add ecx, 8
test edx, edx
jns 0x40a4e4
jmp 0x40a4fb
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40a4fe
mov eax, dword [ecx + 4]
push eax
movzx eax, bl
push eax
lea eax, [ebp - 0x24]
push str.Socket__d__s_n
push eax
call fcn.00401890
mov esi, dword [ebp - 0x24]
add esp, 0x10
push dword [esi - 0xc]
lea ecx, [edi + 0xbc8]
push esi
call fcn.00402e80
test bl, bl
jne 0x40a532
mov eax, dword [ebp - 0x2c]
jmp 0x40a61f
push 4
lea eax, [ebp - 0x2c]
push eax
push 4
push 0xffff
push dword [edi + 4]
mov dword [ebp - 0x2c], 1
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
setne bl
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x28], eax
mov ecx, 0x580308
mov edx, 0x2714
cmp edx, eax
je 0x40a578
mov edx, dword [ecx + 8]
add ecx, 8
test edx, edx
jns 0x40a568
jmp 0x40a57f
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40a582
mov eax, dword [ecx + 4]
push eax
movzx eax, bl
push eax
lea eax, [ebp - 0x24]
push str.SetSockOpt_SO_REUSEADDR__d__s_n
push eax
call fcn.00401890
mov esi, dword [ebp - 0x24]
add esp, 0x10
push dword [esi - 0xc]
lea ecx, [edi + 0xbc8]
push esi
call fcn.00402e80
test bl, bl
je 0x40a61c
push dword [edi + 0x14]
mov ecx, edi
push 0x14e9
call fcn.004155d2
cmp eax, 1
sete bl
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x28], eax
mov ecx, 0x580308
mov edx, 0x2714
cmp edx, eax
je 0x40a5e6
mov edx, dword [ecx + 8]
add ecx, 8
test edx, edx
jns 0x40a5d6
jmp 0x40a5ed
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40a5f0
mov eax, dword [ecx + 4]
push eax
movzx eax, bl
push eax
lea eax, [ebp - 0x24]
push str.Bind__d__s_n
push eax
call fcn.00401890
mov esi, dword [ebp - 0x24]
add esp, 0x10
push dword [esi - 0xc]
lea ecx, [edi + 0xbc8]
push esi
call fcn.00402e80
test bl, bl
jne 0x40a634
mov eax, dword [ebp - 0x28]
mov dword [edi + 0xbc4], eax
push dword [esi - 0xc]
lea ecx, [edi + 0xbcc]
push esi
call fcn.00402e80
push 0
push 0
push 0x10
lea eax, [ebp - 0x20]
push eax
push 0xffffffffffffffff
push dword [edi + 0x14]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test bl, bl
je 0x40a804
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
push 4
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push 9
push 0
push dword [edi + 4]
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
setne bl
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x2c], eax
mov ecx, 0x580308
mov edx, 0x2714
mov edi, edi
cmp edx, eax
je 0x40a6a0
mov edx, dword [ecx + 8]
add ecx, 8
test edx, edx
jns 0x40a690
jmp 0x40a6a7
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40a6aa
mov eax, dword [ecx + 4]
push eax
movzx eax, bl
push eax
lea eax, [ebp - 0x24]
push str.SetSockOpt_IP_MULTICAST_IF__d__s_n
push eax
call fcn.00401890
mov esi, dword [ebp - 0x24]
add esp, 0x10
push dword [esi - 0xc]
lea ecx, [edi + 0xbc8]
push esi
call fcn.00402e80
test bl, bl
jne 0x40a6de
mov eax, dword [ebp - 0x2c]
jmp 0x40a7ef
push 4
lea eax, [ebp - 0x28]
push eax
push 0xb
push 0
push dword [edi + 4]
mov dword [ebp - 0x28], 0
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
setne bl
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x2c], eax
mov ecx, 0x580308
mov edx, 0x2714
cmp edx, eax
je 0x40a721
mov edx, dword [ecx + 8]
add ecx, 8
test edx, edx
jns 0x40a711
jmp 0x40a728
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40a72b
mov eax, dword [ecx + 4]
push eax
movzx eax, bl
push eax
lea eax, [ebp - 0x24]
push str.SetSockOpt_IP_MULTICAST_LOOP__d__s_n
push eax
call fcn.00401890
mov esi, dword [ebp - 0x24]
add esp, 0x10
push dword [esi - 0xc]
lea ecx, [edi + 0xbc8]
push esi
call fcn.00402e80
test bl, bl
jne 0x40a75f
mov eax, dword [ebp - 0x2c]
jmp 0x40a7ef
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
movq qword [ebp - 0x30], xmm0
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi + 0x1c]
push 8
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
push 0xc
push 0
push dword [edi + 4]
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
setne bl
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x28], eax
mov ecx, 0x580308
mov edx, 0x2714
cmp edx, eax
je 0x40a7b6
mov edx, dword [ecx + 8]
add ecx, 8
test edx, edx
jns 0x40a7a6
jmp 0x40a7bd
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40a7c0
mov eax, dword [ecx + 4]
push eax
movzx eax, bl
push eax
lea eax, [ebp - 0x24]
push str.SetSockOpt_IP_ADD_MEMBERSHIP__d__s_n
push eax
call fcn.00401890
mov esi, dword [ebp - 0x24]
add esp, 0x10
push dword [esi - 0xc]
lea ecx, [edi + 0xbc8]
push esi
call fcn.00402e80
test bl, bl
jne 0x40a804
mov eax, dword [ebp - 0x28]
mov dword [edi + 0xbc4], eax
push dword [esi - 0xc]
lea ecx, [edi + 0xbcc]
push esi
call fcn.00402e80
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a825
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
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.005255c5
mov esp, ebp
pop ebp
ret