Function at 0x401270
Capabilities:
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x22c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x228], eax
push ebx
mov ebx, dword [esp + 0x234]
lea eax, [esp + 0x9c]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x4012bf
call sub.WS2_32.dll_WSACleanup
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.00401950
add esp, 0x22c
ret
push esi
push edi
push 0x11
push 2
push 2
call sub.WS2_32.dll_socket
push str.time.nist.gov
mov esi, eax
call sub.WS2_32.dll_gethostbyname
xor edi, edi
cmp eax, edi
jne 0x4012f0
push str.time.nist.gov
call sub.WS2_32.dll_gethostbyname
cmp eax, edi
je 0x40139b
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov ecx, 2
push 0x7b
mov dword [esp + 0x9c], eax
mov word [esp + 0x98], cx
call sub.WS2_32.dll_htons
push 4
lea edx, [esp + 0x2c]
push edx
push 0x1006
push 0xffff
push esi
mov word [esp + 0xaa], ax
mov dword [esp + 0x3c], 0xbb8
call sub.WS2_32.dll_setsockopt
cmp esi, 0xffffffff
je 0x4013a0
push 0xb000000
call sub.WS2_32.dll_htonl
push 0x10
mov dword [esp + 0x38], eax
lea eax, [esp + 0x98]
push eax
push edi
push 0x30
lea ecx, [esp + 0x44]
push ecx
push esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
call sub.WS2_32.dll_sendto
cmp eax, 0xffffffff
jne 0x4013ba
push esi
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.00401950
add esp, 0x22c
ret
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x98]
push eax
push edi
push 0x30
lea ecx, [esp + 0x74]
push ecx
push esi
mov dword [esp + 0x3c], 0x10
call sub.WS2_32.dll_recvfrom
push esi
cmp eax, 0xffffffff
je 0x401396
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov edx, dword [esp + 0x8c]
push edx
call sub.WS2_32.dll_ntohl
add eax, 0x7c558180
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x34], edi
call dword [sym.imp.MSVCR90.dll__localtime64]
mov ecx, 0x76c
add cx, word [eax + 0x14]
add esp, 4
mov word [esp + 0x14], cx
movzx edx, word [eax + 0x10]
inc dx
mov word [esp + 0x16], dx
movzx ecx, word [eax + 0x18]
mov word [esp + 0x18], cx
movzx edx, word [eax + 0xc]
mov word [esp + 0x1a], dx
movzx ecx, word [eax + 8]
mov word [esp + 0x1c], cx
movzx edx, word [eax + 4]
mov ecx, dword [esp + 0x90]
mov word [esp + 0x1e], dx
mov ax, word [eax]
push ecx
mov word [esp + 0x24], ax
call sub.WS2_32.dll_ntohl
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
test eax, eax
jge 0x401479
fadd dword [0x403150]
fmul dword [0x40314c]
push ebx
fnstcw word [esp + 0x12]
movzx eax, word [esp + 0x12]
fmul dword [0x403148]
or eax, 0xc00
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push eax
fldcw word [esp + 0x18]
fistp dword [esp + 0x18]
movzx edx, word [esp + 0x18]
mov word [esp + 0x2a], dx
fldcw word [esp + 0x16]
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ecx, dword [esp + 0x234]
pop edi
neg eax
pop esi
sbb eax, eax
pop ebx
xor ecx, esp
neg eax
call fcn.00401950
add esp, 0x22c
ret