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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push 0x11
push 2
push 2
mov dword [ebp - 0xc], 4
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x42d4cb
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x273f
je 0x42d4c4
call fcn.0042cda0
push eax
push 0x4000
push str.WARNING:_UDP_OpenSocket:_socket:__s_n
call fcn.0041ac50
add esp, 0xc
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x8b3ec8]
mov ecx, dword [eax + 0x20]
push 4
lea edx, [ebp - 4]
push edx
push 0x1002
push 0xffff
shl ecx, 0xa
push esi
mov dword [ebp - 4], ecx
call sub.WSOCK32.dll_setsockopt
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 8]
push ecx
push 0x1002
push 0xffff
push esi
call sub.WSOCK32.dll_getsockopt
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x42d525
push ecx
push eax
push 0x4000
push str.WARNING:_Setting_SO_RCVBUF:_wanted__d__got__d_n
call fcn.0041ac50
add esp, 0x10
mov edx, dword [0x8b40a8]
mov eax, dword [edx + 0x20]
push 4
lea ecx, [ebp - 4]
push ecx
push 0x1001
push 0xffff
shl eax, 0xa
push esi
mov dword [ebp - 4], eax
call sub.WSOCK32.dll_setsockopt
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push esi
call sub.WSOCK32.dll_getsockopt
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x42d580
push ecx
push eax
push 0x4000
push str.WARNING:_Setting_SO_SNDBUF:_wanted__d__got__d_n
call fcn.0041ac50
add esp, 0x10
push 0x47cf9c
push 0x8004667e
push esi
mov dword [ebp - 4], 1
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x42d5bb
call fcn.0042cda0
push eax
push 0x4000
push str.UDP_OpenSocket:_Couldnt_make_non_blocking:__s_n
call fcn.0041ac50
add esp, 0xc
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push 4
lea ecx, [ebp - 4]
push ecx
push 0x20
push 0xffff
push esi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x42d5f2
call fcn.0042cda0
push eax
push 0x4000
push str.UDP_OpenSocket:_setsockopt_SO_BROADCAST:__s_n
call fcn.0041ac50
add esp, 0xc
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push 4
lea edx, [ebp - 4]
push edx
push 8
push 0
push esi
mov dword [ebp - 4], 0x10
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x42d626
call fcn.0042cda0
push eax
push 0x4000
push str.WARNING:_UDP_OpenSocket:_setsockopt_IP_TOS:__s_n
call fcn.0041ac50
add esp, 0xc
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x42d654
cmp byte [edi], 0
je 0x42d654
push str.localhost
push edi
call fcn.00455a93
add esp, 8
test eax, eax
je 0x42d654
lea eax, [ebp - 0x1c]
push eax
push edi
call fcn.0042c740
add esp, 8
jmp 0x42d65b
mov dword [ebp - 0x18], 0
mov edi, dword [ebp + 0xc]
cmp edi, 0xffffffff
jne 0x42d66b
mov word [ebp - 0x1a], 0
jmp 0x42d675
push edi
call sub.WSOCK32.dll_htons
mov word [ebp - 0x1a], ax
push 0x10
lea ecx, [ebp - 0x1c]
push ecx
push esi
mov word [ebp - 0x1c], 2
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x42d6b3
call fcn.0042cda0
push eax
push edi
push 0x4000
push str.UDP_OpenSocket:_Couldnt_bind_to_UDP_port__d:__s_n
call fcn.0041ac50
add esp, 0x10
push esi
call sub.WSOCK32.dll_closesocket
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret