Function at 0x4056b0
Capabilities:
Create udp socket
Get hostname
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x9c
push esi
push edi
mov esi, ecx
push 0x40eef4
call fcn.00401430
add esp, 4
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x4056e7
pop edi
xor al, al
pop esi
add esp, 0x9c
ret 8
push eax
push 0x40eedc
call fcn.00401430
mov edi, dword [esp + 0xb0]
add esp, 8
mov word [esp + 0x14], 2
push edi
call sub.WSOCK32.dll_htons
push 0
mov word [esp + 0x1a], ax
call sub.WSOCK32.dll_htonl
push edi
push 0x40eeb0
mov dword [esp + 0x20], eax
call fcn.00401430
mov ecx, dword [esi + 4]
add esp, 8
lea eax, [esp + 0x14]
push 0x10
push eax
push ecx
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x4057df
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x40ee90
call fcn.00401430
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push eax
push 0x40ecec
call fcn.00401430
mov eax, dword [esi + 0x20]
add esp, 0x14
test eax, eax
je 0x4057a6
mov ecx, dword [esi + 0x14]
mov edx, dword [ecx]
push edx
call fcn.0040649a
mov eax, dword [esi + 0x20]
add esp, 4
test eax, eax
jle 0x40579f
lea ecx, [eax - 1]
xor eax, eax
test ecx, ecx
mov dword [esi + 0x20], ecx
jle 0x40579f
mov ecx, dword [esi + 0x14]
inc eax
mov edx, dword [ecx + eax*4]
mov dword [ecx + eax*4 - 4], edx
mov ecx, dword [esi + 0x20]
cmp eax, ecx
jl 0x40578d
mov eax, dword [esi + 0x20]
test eax, eax
jne 0x40576c
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4057d2
push eax
call sub.WSOCK32.dll_closesocket
test eax, eax
je 0x4057cb
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x40ecc4
call fcn.00401430
add esp, 8
mov dword [esi + 4], 0xffffffff
pop edi
xor al, al
pop esi
add esp, 0x9c
ret 8
push 0x40ee7c
call fcn.00401430
mov eax, dword [esp + 0xb0]
push 0x40ee5c
mov dword [esi + 8], edi
mov dword [esi + 0xc], eax
call fcn.00401430
add esp, 8
lea ecx, [esp + 0x24]
push 0x80
push ecx
call sub.WSOCK32.dll_gethostname
test eax, eax
jne 0x405828
lea edx, [esp + 0x24]
push edx
push 0x40ee48
call fcn.00401430
add esp, 8
push 0x40ee28
call fcn.00401430
add esp, 4
lea eax, [esp + 0x24]
push eax
call sub.WSOCK32.dll_gethostbyname
mov edi, eax
test edi, edi
jne 0x405858
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x40ee00
call fcn.00401430
add esp, 8
mov eax, dword [esi + 0x20]
test eax, eax
je 0x405899
mov ecx, dword [esi + 0x14]
mov edx, dword [ecx]
push edx
call fcn.0040649a
mov eax, dword [esi + 0x20]
add esp, 4
test eax, eax
jle 0x405892
lea ecx, [eax - 1]
xor eax, eax
test ecx, ecx
mov dword [esi + 0x20], ecx
jle 0x405892
mov ecx, dword [esi + 0x14]
inc eax
mov edx, dword [ecx + eax*4]
mov dword [ecx + eax*4 - 4], edx
mov ecx, dword [esi + 0x20]
cmp eax, ecx
jl 0x405880
mov eax, dword [esi + 0x20]
test eax, eax
jne 0x40585f
mov edi, dword [edi + 0xc]
mov dword [esp + 8], edi
mov eax, dword [edi]
test eax, eax
je 0x40593c
push ebx
push ebp
lea edi, [esi + 0x10]
mov ebx, dword [eax]
mov edx, dword [esp + 0x10]
mov eax, ebx
add edx, 4
shr eax, 0x18
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], edx
xor ecx, ecx
push eax
mov cl, byte [esp + 0x1e]
xor edx, edx
mov eax, ebx
mov dl, bh
push ecx
and eax, 0xff
push edx
push eax
push 0x40eddc
call fcn.00401430
push 4
call fcn.004064a5
mov ebp, eax
add esp, 0x18
mov dword [ebp], ebx
mov eax, dword [edi + 8]
cmp dword [edi + 0x10], eax
jl 0x40591d
mov cl, byte [edi + 0xd]
test cl, cl
jne 0x405906
test eax, eax
jne 0x40592c
mov ecx, dword [edi + 0x14]
test ecx, ecx
jle 0x40592c
mov edx, dword [edi]
add ecx, eax
push 0
push ecx
mov ecx, edi
call dword [edx + 8]
test al, al
je 0x40592c
mov eax, dword [edi + 0x10]
mov edx, dword [edi + 4]
lea ecx, [eax + 1]
mov dword [edi + 0x10], ecx
mov dword [edx + eax*4], ebp
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
test eax, eax
jne 0x4058af
pop ebp
pop ebx
mov edx, dword [esi + 4]
lea ecx, [esp + 0xc]
push 4
push ecx
push 0x80
xor eax, eax
push 0xffff
push edx
mov word [esp + 0x20], ax
mov word [esp + 0x22], ax
call sub.WSOCK32.dll_setsockopt
mov eax, dword [esi + 4]
push 4
push 0x40ecc0
push 0x1002
push 0xffff
push eax
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x405996
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x40eda4
call fcn.00401430
add esp, 8
jmp 0x4059a3
push 0x40ed84
call fcn.00401430
add esp, 4
mov ecx, dword [esi + 4]
push 4
push 0x40ecbc
push 0x1001
push 0xffff
push ecx
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x4059d7
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x40ed4c
call fcn.00401430
add esp, 8
jmp 0x4059e4
push 0x40ed2c
call fcn.00401430
add esp, 4
push 0x40ed10
call fcn.00401430
add esp, 4
mov al, 1
pop edi
pop esi
add esp, 0x9c
ret 8