Function at 0x4134b0
Capabilities:
Connect socket
Connect udp socket
Convert ip address from string
Create udp socket
Reference google public dns server
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, 0x50
mov word [ebp - 0x2c], ax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x7d64]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x7d8c]
mov dword [ebp - 0x40], ecx
cmp dword [ebp - 0x40], 0
je 0x413516
cmp dword [ebp - 0x40], 1
je 0x4134ef
jmp 0x41354d
mov edx, dword [ebp + 8]
cmp dword [edx + 0x7dd4], 0
jne 0x413506
mov eax, dword [ebp + 8]
add eax, 0x7d90
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 0x7dd0]
mov word [ebp - 0x2c], dx
jmp 0x41354d
mov eax, dword [ebp + 8]
add eax, 0x7d90
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 0x7dd0]
mov word [ebp - 0x2c], dx
xor eax, eax
je 0x413549
movzx ecx, word [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x38]
push edx
push str.Using_proxy:__s_:__hu_n
call fcn.0040e5a0
add esp, 0xc
xor eax, eax
jne 0x41352f
xor ecx, ecx
jne 0x41354d
mov edx, dword [ebp + 8]
push edx
call fcn.0040d5c0
add esp, 4
test eax, eax
je 0x413563
jmp 0x413577
push 0x2f
push 0x4b8f60
push str.pb_valid_ctx_ptr_pb_
call fcn.0040f4e0
add esp, 0xc
xor eax, eax
jne 0x41354d
xor ecx, ecx
jne 0x41357b
mov edx, dword [ebp + 8]
cmp dword [edx + 0x7d44], 2
je 0x4135b7
mov eax, dword [ebp + 8]
cmp dword [eax + 0x7d44], 3
je 0x4135b7
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x7d44], 4
je 0x4135b7
push 0x30
push str...lib_socketspbpal_resolv_and_connect_sockets.c
push str._pb__state__PBS_READY____pb__state__PBS_WAIT_DNS_SEND____pb__state__PBS_WAIT_DNS_RCV_
call fcn.0040f4e0
add esp, 0xc
xor edx, edx
jne 0x41357b
xor eax, eax
je 0x413674
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x4135df
xor eax, eax
jmp 0x41382f
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x7d6c]
and edx, 0xfffffffe
mov eax, dword [ebp + 8]
mov dword [eax + 0x7d6c], edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.004121c0
add esp, 4
mov edx, 2
mov word [ebp - 0x28], dx
push 0x35
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x26], ax
lea eax, [ebp - 0x24]
push eax
push str.8.8.8.8
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
mov dword [ebp - 0x34], 0xffffffff
cmp dword [ebp - 0x34], 0
jge 0x413649
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
jmp 0x41382f
cmp dword [ebp - 0x34], 0
jle 0x413659
mov eax, 2
jmp 0x41382f
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x3c]
mov dword [edx + 0x7d68], eax
mov eax, 3
jmp 0x41382f
mov dword [ebp - 0x64], 1
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x5c], 0
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x6c]
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x50], 0
movzx eax, word [ebp - 0x2c]
push eax
push 0x4b9048
push 0x14
lea ecx, [ebp - 0x18]
push ecx
call fcn.0040f450
add esp, 0x10
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x4136eb
mov eax, 6
jmp 0x41382f
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x30], eax
jmp 0x4136fc
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0x30], 0
je 0x4137cf
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x7d68], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x7d68], 0xffffffff
jne 0x413738
jmp 0x4136f3
mov eax, dword [ebp + 8]
push eax
call fcn.004121c0
add esp, 4
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x7d68]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4137c8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x413781
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
jne 0x41378c
mov dword [ebp - 0x34], 1
jmp 0x4137cf
mov ecx, 1
test ecx, ecx
je 0x4137a2
push str.socket_connect___failed__will_try_another_IP_address__if_available_n
call fcn.0040e5a0
add esp, 4
xor edx, edx
jne 0x41378c
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x7d68]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp + 8]
mov dword [edx + 0x7d68], 0xffffffff
jmp 0x4136f3
jmp 0x4137cf
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 0x30], 0
jne 0x4137e6
mov eax, 8
jmp 0x41382f
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x7d88]
mov dword [ebp - 0x4c], edx
push 4
lea eax, [ebp - 0x4c]
push eax
push 0x1006
push 0xffff
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x7d68]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
xor eax, eax
jne 0x4137e6
cmp dword [ebp - 0x34], 0
je 0x413825
mov dword [ebp - 0x48], 9
jmp 0x41382c
mov dword [ebp - 0x48], 0xa
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004099c0
mov esp, ebp
pop ebp
ret