Function at 0x4010d0
Capabilities:
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x5c8
mov eax, dword [0x404004]
xor eax, esp
mov dword [esp + 0x5c4], eax
push esi
push edi
mov edi, dword [sym.imp.WSOCK32.dll_WSAStartup]
lea eax, [esp + 0x38]
push eax
push 0x202
mov dword [esp + 0x1c], edx
mov esi, ecx
call edi
test eax, eax
je 0x401131
lea eax, [esp + 0x38]
push eax
push 0x101
call edi
test eax, eax
je 0x401131
push str.WSAStartup_Failed
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 8
xor ecx, ecx
xorps xmm0, xmm0
push esi
mov dword [esp + 0x14], ecx
movaps xmmword [esp + 0x24], xmm0
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x401151
mov dword [esp + 0x24], eax
jmp 0x40117f
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ecx, eax
test ecx, ecx
jne 0x401168
push str.gethostbyname_failed
jmp 0x4012ca
movsx eax, word [ecx + 0xa]
push eax
mov eax, dword [ecx + 0xc]
push dword [eax]
lea eax, [esp + 0x2c]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push dword [ebp + 8]
mov eax, 2
mov word [esp + 0x24], ax
call dword [sym.imp.WSOCK32.dll_htons]
push 0
push 2
push 2
mov word [esp + 0x2e], ax
call dword [sym.imp.WSOCK32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4011b4
push str.socket_failed
jmp 0x4012ca
push esi
mov esi, dword [esp + 0x18]
push esi
push str.Sending___s__to__s...
push 0x400
call fcn.00401040
mov ecx, esi
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4011d1
push 0x10
sub ecx, edx
lea eax, [esp + 0x24]
push eax
push 0
lea eax, [ecx + 1]
push eax
push esi
push edi
call dword [sym.imp.WSOCK32.dll_sendto]
test eax, eax
jns 0x401204
push edi
call dword [sym.imp.WSOCK32.dll_closesocket]
push str.sendto_failed
jmp 0x4012ca
mov eax, dword [ebp + 0xc]
test eax, eax
jg 0x401228
push edi
call dword [sym.imp.WSOCK32.dll_closesocket]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x5c4]
xor ecx, esp
call fcn.0040163a
mov esp, ebp
pop ebp
ret
mov esi, eax
nop word [eax + eax]
lea eax, [esp + 0x18]
push eax
push 0x4004667f
push edi
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x401258
push str.ioctlsocket_error
push 0x400
call fcn.00401040
add esp, 8
cmp dword [esp + 0x18], 0
jne 0x401272
test esi, esi
je 0x401345
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
dec esi
jmp 0x401230
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x10
push eax
lea eax, [esp + 0x24]
push eax
push 0
push 0x400
lea eax, [esp + 0x1d8]
push eax
push edi
call dword [sym.imp.WSOCK32.dll_recvfrom]
test eax, eax
je 0x4012b0
cmp eax, 0xffffffff
jne 0x4012ee
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2714
jne 0x401230
push edi
call dword [sym.imp.WSOCK32.dll_closesocket]
cmp dword [esp + 0x10], 0
mov eax, str.timeout__command_not_received.
mov edx, str.timeout__command_received_but_not_completed.
cmovne eax, edx
push eax
push 0x400
call fcn.00401040
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x5c4]
xor ecx, esp
call fcn.0040163a
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x10], 1
cmp eax, 1
jne 0x40130c
cmp byte [esp + 0x1c8], 0
je 0x40120b
cmp byte [esp + eax + 0x1c7], 0xa
jne 0x401317
dec eax
cmp eax, 0x400
jae 0x40137b
mov byte [esp + eax + 0x1c8], 0
lea eax, [esp + 0x1c8]
push eax
push 0x403260
push 0x400
call fcn.00401040
add esp, 0xc
jmp 0x401230
cmp dword [esp + 0x10], 0
mov edx, str.timeout__command_received_but_not_completed.
mov eax, str.timeout__command_not_received.
cmovne eax, edx
push eax
push 0x400
call fcn.00401040
mov ecx, dword [esp + 0x5d4]
add esp, 8
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0040163a
mov esp, ebp
pop ebp
ret
call fcn.0040176a
int3