Function at 0x10117de0
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x20
mov eax, dword [0x101c3584]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
mov bx, word [esp + 0x2c]
push ebp
mov ebp, dword [esp + 0x2c]
xor eax, eax
push esi
xor esi, esi
test bx, bx
setne al
cmp word [ebp], 2
mov word [esp + 0xe], bx
mov dword [esp + 0x10], eax
jne 0x10118051
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi], eax
test eax, eax
jge 0x10117e60
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp word [ebp], 2
mov esi, eax
mov eax, str.socket_AF_INET
je 0x10117e43
mov eax, str.socket_AF_INET6
push eax
call fcn.101467f1
add esp, 4
mov eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.1013d581
add esp, 0x20
ret
test bx, bx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
je 0x10117e97
push 4
push 0x1019b118
push 4
push 0xffff
push eax
call ebx
mov esi, eax
test esi, esi
jge 0x10117e97
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.setsockopt___SO_REUSExxxx
mov esi, eax
call fcn.101467f1
add esp, 4
cmp word [ebp], 2
jne 0x10117ff6
test esi, esi
jne 0x10118029
cmp dword [esp + 0x10], esi
je 0x10117f29
mov ecx, dword [0x1019b3f8]
mov edx, dword [ebp + 4]
push 8
lea eax, [esp + 0x14]
push eax
push 0xc
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi]
add ebp, 4
push esi
push ecx
mov dword [esp + 0x28], edx
call ebx
mov esi, eax
test esi, esi
jge 0x10117ef0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.setsockopt___IP_ADD_MEMBERSHIP
mov esi, eax
call fcn.101467f1
add esp, 4
test esi, esi
jne 0x10118029
mov edx, dword [edi]
push 4
push ebp
push 9
push 0
push edx
call ebx
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
test esi, esi
jge 0x10117f21
call ebp
push str.setsockopt___IP_MULTICAST_IF
mov esi, eax
call fcn.101467f1
add esp, 4
test esi, esi
jne 0x10118029
jmp 0x10117f2f
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov eax, dword [edi]
push 4
push 0x1019b11c
push 4
push 0
push eax
call ebx
mov esi, eax
test esi, esi
jge 0x10117f58
call ebp
push str.setsockopt___IP_TTL
mov esi, eax
call fcn.101467f1
add esp, 4
test esi, esi
jne 0x10118029
mov ecx, dword [edi]
push 1
push 0x1019b120
push 0xa
push 0
push ecx
call ebx
mov esi, eax
test esi, esi
jge 0x10117f9d
mov edx, dword [edi]
push 4
push 0x1019b11c
push 0xa
push 0
push edx
call ebx
mov esi, eax
test esi, esi
jge 0x10117f9d
call ebp
push str.setsockopt___IP_MULTICAST_TTL
mov esi, eax
call fcn.101467f1
add esp, 4
test esi, esi
jne 0x10118029
mov cx, word [esp + 0xe]
mov eax, 2
push 0x10
lea edx, [esp + 0x1c]
mov word [esp + 0x1c], ax
mov eax, dword [edi]
push edx
push eax
mov word [esp + 0x26], cx
mov dword [esp + 0x28], 0
call dword [sym.imp.WS2_32.dll_bind]
mov esi, eax
test esi, esi
jge 0x10117ffe
call ebp
push str.bind
mov esi, eax
call fcn.101467f1
call fcn.10001120
add eax, 0x40
push eax
call fcn.101401b3
add esp, 8
jmp 0x10117ffc
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x10118029
mov edx, dword [edi]
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x1c], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
test esi, esi
jge 0x10118027
call ebp
mov esi, eax
test esi, esi
je 0x1011803d
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x1011803d
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
mov eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.1013d581
add esp, 0x20
ret
mov ecx, dword [esp + 0x28]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 0x16
call fcn.1013d581
add esp, 0x20
ret