Function at 0x5891d0
Capabilities:
Create udp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x6480b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, 2
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
movsx eax, byte [esi]
push eax
call fcn.005d4660
add esp, 4
push esi
test eax, eax
je 0x589325
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x589337
movzx ecx, word [eax + 0xa]
mov edx, 4
cmp dx, cx
jge 0x589235
mov ecx, edx
jmp 0x589238
movsx ecx, cx
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 0x10]
push eax
call fcn.005c9900
add esp, 0xc
movzx eax, word [ebp - 0x14]
push 0x11
push 2
push eax
mov dword [ebp - 0x1c], 0
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x5893e0
mov ecx, ebx
mov edi, eax
mov eax, 0x301
mov dword [ebp - 0x2c], edi
mov word [ebp - 0x28], ax
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x589280
sub ecx, edx
lea esi, [ecx + 4]
push esi
mov dword [ebp - 0x24], esi
call fcn.00479f2b
add esp, 4
mov dword [ebp - 0x18], eax
test eax, eax
je 0x5893c5
xor ecx, ecx
mov word [eax], cx
lea ecx, [esi - 4]
push ecx
lea ecx, [eax + 2]
push ebx
push ecx
call fcn.0055dcc0
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x20], eax
cmp eax, 3
jae 0x5893ba
push 0x10
lea eax, [ebp - 0x14]
push eax
push 0
push esi
push dword [ebp - 0x18]
push edi
call dword [sym.imp.WS2_32.dll_sendto]
mov esi, eax
cmp esi, dword [ebp - 0x24]
jne 0x58938a
push 0x7d0
lea eax, [ebp - 0x2c]
push 1
push eax
call fcn.005ed310
add esp, 0xc
test eax, eax
jle 0x589371
push 0
push 0
push 0
push 8
lea eax, [ebp - 0x34]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recvfrom]
mov esi, eax
cmp esi, 8
je 0x589382
cmp esi, 0xffffffff
jne 0x58934a
call ebx
jmp 0x58934c
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x58924a
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
xor eax, eax
push eax
push esi
push str.recvfrom_result__d_ignored___d_
push 9
call fcn.004da370
push 0x7d0
lea eax, [ebp - 0x2c]
push 1
push eax
call fcn.005ed310
add esp, 0x1c
test eax, eax
jg 0x589302
push str.timeout_or_error_waiting_for_resolver_n
push 9
call fcn.004da370
add esp, 8
jmp 0x5893a6
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
jmp 0x5893a6
cmp esi, 0xffffffff
jne 0x589393
call ebx
jmp 0x589395
xor eax, eax
push eax
push esi
push str.Failed_to_send_resolver_request___d___d__n
push 9
call fcn.004da370
add esp, 0x10
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
inc eax
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], eax
je 0x5892c4
push dword [ebp - 0x18]
call fcn.0058bb5f
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
push edi
push esi
push str.resolver_socket_failure_for__s__d_n
push 9
call fcn.004da370
mov ecx, dword [ebp - 4]
add esp, 0x10
mov eax, dword [ebp - 0x1c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0058bb64
mov esp, ebp
pop ebp
ret