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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, dword [0x1005ce10]
xor eax, esp
mov dword [esp + 0x60], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0xc], eax
xor eax, eax
mov word [esp + 0x50], ax
push ebx
push esi
push edi
lea edi, [esp + 0x5e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [esp + 0x4c], ax
lea edi, [esp + 0x4e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov esi, dword [ebp + 8]
stosw word es:[edi], ax
xor ebx, ebx
xor eax, eax
lea edi, [esp + 0x28]
mov dword [esp + 0x24], ebx
stosd dword es:[edi], eax
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], ebx
stosd dword es:[edi], eax
mov dword [esp + 0x38], ebx
lea edi, [esp + 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov byte [esp + 0xf], bl
mov dword [esp + 0x10], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], ebx
stosd dword es:[edi], eax
cmp byte [0x1005ee14], bl
je 0x100168ec
call fcn.10003b9a
mov byte [0x1005ee14], bl
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x1001690f
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
jne 0x10016908
or eax, 0xffffffff
jmp 0x1001690f
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov edi, dword [sym.imp.WS2_32.dll_htons]
push 2
pop esi
push dword [ebp + 0xc]
mov dword [esp + 0x64], eax
mov eax, esi
mov word [esp + 0x60], ax
call edi
push ebx
mov word [esp + 0x62], ax
call dword [sym.imp.WS2_32.dll_htonl]
push ebx
mov dword [esp + 0x54], eax
call edi
mov word [esp + 0x4e], ax
mov eax, esi
mov word [esp + 0x4c], ax
mov eax, dword [esp + 0x34]
push 1
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
push ebx
push ebx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x38]
push 0x11
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x14]
push esi
push esi
mov dword [esp + 0x3c], eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10016a36
push 0x10
pop edi
push edi
lea eax, [esp + 0x50]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x10016a36
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push ebx
push ebx
push edi
mov dword [esp + 0x54], eax
lea eax, [esp + 0x68]
push eax
push ebx
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x40]
push eax
push esi
call dword [sym.imp.WS2_32.dll_WSASendTo]
push ebx
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x38]
push eax
push esi
mov dword [esp + 0x38], edi
call dword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
jne 0x10016a27
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x10016a36
push dword [ebp + 0x20]
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x10016a36
push ebx
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x40]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov byte [esp + 0xf], 1
mov dword [ecx], eax
cmp dword [esp + 0x48], ebx
je 0x10016a46
push dword [esp + 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 0xffffffff
je 0x10016a52
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x6c]
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10032bd7
mov esp, ebp
pop ebp
ret 0x1c