Function at 0x100158a0
Capabilities:
Get socket status
Receive data
Receive data on socket
Reference google public dns server
Reference quad9 dns server
Send data
Send data on socket

Disassembly:
mov eax, 0x22d4
call fcn.10140530
mov eax, dword [0x10189710]
xor eax, esp
mov dword [esp + 0x22cc], eax
mov eax, dword [esp + 0x22dc]
push ebx
push ebp
mov ebp, dword [esp + 0x22e0]
push esi
push edi
xor ebx, ebx
push 0x1fff
lea edx, [esp + 0x2dd]
push ebx
push edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], 0x10
mov byte [esp + 0x2e4], bl
call fcn.1012e060
add esp, 0xc
mov eax, 2
push 0x35
mov word [esp + 0x23c], ax
call sub.WS2_32.dll_htons
push ebx
push 2
push 2
mov word [esp + 0x246], ax
call sub.WS2_32.dll_socket
mov esi, eax
cmp esi, ebx
jge 0x1001594c
call fcn.1012b5d3
mov ecx, dword [eax]
push ecx
push 0x281
push str.DNSCore::sendUDPQuery
push str._s:_d_Error___Failed_to_create_socket_Errno:_d
call fcn.1011cbf0
add esp, 0x10
lea eax, [ebx - 6]
jmp 0x10015b7b
mov edx, 2
push ebx
mov word [esp + 0x24c], dx
call sub.WS2_32.dll_htonl
push ebx
mov dword [esp + 0x250], eax
call sub.WS2_32.dll_htons
mov word [esp + 0x24a], ax
push 0x10
lea eax, [esp + 0x24c]
push eax
push esi
call sub.WS2_32.dll_bind
test eax, eax
jge 0x100159b7
call fcn.1012b5d3
mov ecx, dword [eax]
push ecx
push 0x28d
push str.DNSCore::sendUDPQuery
push str._s:_d_Error___Failed_to_bind_socket_Errno:_d
call fcn.1011cbf0
add esp, 0x10
push esi
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffffa
jmp 0x10015b7b
cmp dword [ebp + 4], ebx
mov dword [esp + 0x10], ebx
jle 0x10015b73
push 0x7f
lea edx, [esp + 0x25d]
push ebx
push edx
mov byte [esp + 0x264], bl
call fcn.1012e060
mov eax, dword [ebp]
mov ecx, dword [esp + 0x1c]
mov edi, dword [eax + ecx*4]
add esp, 0xc
push edi
call sub.WS2_32.dll_inet_ntoa
cmp eax, ebx
je 0x10015a0a
lea edx, [esp + 0x258]
sub edx, eax
jmp 0x10015a00
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x10015a00
cmp dword [esp + 0x22f4], ebx
je 0x10015a87
lea edx, [esp + 0x258]
push str.8.8.8.8
push edx
call fcn.10135887
add esp, 8
test eax, eax
je 0x10015a45
lea eax, [esp + 0x258]
push str.8.8.4.4
push eax
call fcn.10135887
add esp, 8
test eax, eax
jne 0x10015a87
mov edx, dword [0x10158bb8]
mov ecx, dword [str.149.112.112.112]
mov eax, dword [0x10158bbc]
mov dword [esp + 0x25c], edx
mov dword [esp + 0x258], ecx
mov ecx, dword [0x10158bc0]
lea edx, [esp + 0x258]
push edx
mov dword [esp + 0x264], eax
mov dword [esp + 0x268], ecx
call sub.WS2_32.dll_inet_addr
mov edi, eax
mov ecx, dword [esp + 0x22f0]
mov edx, dword [esp + 0x24]
push 0x10
lea eax, [esp + 0x23c]
push eax
push ebx
push ecx
push edx
push esi
mov dword [esp + 0x254], edi
call sub.WS2_32.dll_sendto
test eax, eax
jl 0x10015b96
mov eax, 1
mov dword [esp + 0x28], eax
mov dword [esp + 0x130], eax
xor eax, eax
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 8]
lea edx, [esp + 0x134]
push edx
mov dword [esp + 0x20], eax
push ebx
lea eax, [esp + 0x34]
push eax
lea ecx, [esi + 1]
push ecx
mov dword [esp + 0x40], esi
mov dword [esp + 0x148], esi
call sub.WS2_32.dll_select
cmp eax, ebx
jge 0x10015b19
call fcn.1012b5d3
mov edx, dword [eax]
push edx
push 0x2cb
push str.DNSCore::sendUDPQuery
push str._s:_d_Error___Failed_in_select_Errno:_d
jmp 0x10015b59
je 0x10015b61
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x23c]
push ecx
push ebx
push 0x2000
lea edx, [esp + 0x2e8]
push edx
push esi
call sub.WS2_32.dll_recvfrom
mov edi, eax
cmp edi, ebx
jge 0x10015bb2
call fcn.1012b5d3
mov eax, dword [eax]
push eax
push 0x2d6
push str.DNSCore::sendUDPQuery
push str._s:_d_Error___Failed_in_receive_on_socket_Errno:_d
call fcn.1011cbf0
add esp, 0x10
mov eax, dword [esp + 0x10]
inc eax
cmp eax, dword [ebp + 4]
mov dword [esp + 0x10], eax
jl 0x100159c4
push esi
call sub.WS2_32.dll_closesocket
xor eax, eax
mov ecx, dword [esp + 0x22dc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10127db1
add esp, 0x22d4
ret 0x10
call fcn.1012b5d3
mov ecx, dword [eax]
push ecx
push 0x2bb
push str.DNSCore::sendUDPQuery
push str._s:_d_Error___Failed_to_send_on_socket_Errno:_d
jmp 0x1001599f
push esi
call sub.WS2_32.dll_closesocket
push edi
call fcn.10128320
mov esi, dword [esp + 0x18]
add esp, 4
mov dword [esi], eax
cmp eax, ebx
jne 0x10015be9
push 0x2f7
push str.DNSCore::sendUDPQuery
push str._s:_d_Error___OutOfMemory_While_tring_to_allocate_response
call fcn.1011cbf0
add esp, 0xc
mov eax, 0xfffffffd
jmp 0x10015b7b
mov edx, dword [esp + 0x10]
cmp edx, ebx
jle 0x10015c01
mov eax, dword [ebp]
mov ebx, dword [eax + edx*4]
mov ecx, dword [eax]
mov dword [eax], ebx
mov eax, dword [ebp]
mov dword [eax + edx*4], ecx
mov edx, dword [esi]
push edi
lea ecx, [esp + 0x2dc]
push ecx
push edx
call fcn.10130710
add esp, 0xc
mov eax, edi
jmp 0x10015b7b