Function at 0x10015c20
Capabilities:
Connect socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov eax, 0x22cc
call fcn.10140530
mov eax, dword [0x10189710]
xor eax, esp
mov dword [esp + 0x22c4], eax
mov eax, dword [esp + 0x22d0]
push ebx
push ebp
mov ebp, dword [esp + 0x22dc]
push esi
push edi
xor ebx, ebx
push 0x1fff
mov edi, edx
lea edx, [esp + 0x2d5]
push ebx
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], ecx
or esi, 0xffffffff
mov byte [esp + 0x2dc], bl
call fcn.1012e060
lea eax, [edi + 2]
add esp, 0xc
push eax
mov dword [esp + 0x2c], eax
call fcn.10128320
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x10015f82
push edi
add eax, 2
push ebp
push eax
call fcn.10130710
add esp, 0xc
push edi
call sub.WS2_32.dll_htons
mov ecx, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
movzx eax, ax
xor edi, edi
mov byte [ecx], al
mov byte [ecx + 1], ah
cmp dword [ebp + 4], ebx
mov dword [esp + 0x18], edi
jle 0x10015ee5
cmp esi, 0xffffffff
jne 0x10015d0a
mov eax, 2
push 0x35
mov word [esp + 0x244], ax
call sub.WS2_32.dll_htons
mov word [esp + 0x242], ax
xor eax, eax
push eax
push 1
push 2
mov dword [esp + 0x254], eax
mov dword [esp + 0x258], eax
call sub.WS2_32.dll_socket
mov esi, eax
test esi, esi
jl 0x10015f15
mov ecx, dword [ebp]
mov edx, dword [ecx + edi*4]
lea eax, [ecx + edi*4]
mov dword [esp + 0x244], edx
mov edi, dword [eax]
push edi
call sub.WS2_32.dll_inet_ntoa
test eax, eax
je 0x10015d2d
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10015d26
push 0x10
lea eax, [esp + 0x244]
push eax
push esi
call sub.WS2_32.dll_connect
test eax, eax
jge 0x10015d64
push edi
call sub.WS2_32.dll_inet_ntoa
push eax
push 0x33e
push str.DNSCore::sendTCPQuery
push str._s:_d_Warning__Failed_to_connect_to_server__s
call fcn.1011cbf0
add esp, 0x10
jmp 0x10015ecf
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
push 0
push ecx
push edx
push esi
call sub.WS2_32.dll_send
test eax, eax
jge 0x10015da6
push edi
call sub.WS2_32.dll_inet_ntoa
push eax
push 0x346
push str.DNSCore::sendTCPQuery
push str._s:_d_Warning___Failed_to_send_query_to_server__s
call fcn.1011cbf0
add esp, 0x10
push esi
call sub.WS2_32.dll_closesocket
or esi, 0xffffffff
jmp 0x10015ecf
mov eax, 1
mov dword [esp + 0x30], eax
mov dword [esp + 0x138], eax
xor eax, eax
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 8]
lea edx, [esp + 0x13c]
push edx
mov dword [esp + 0x28], eax
push 0
lea eax, [esp + 0x3c]
push eax
lea ebp, [esi + 1]
push ebp
mov dword [esp + 0x48], esi
mov dword [esp + 0x150], esi
call sub.WS2_32.dll_select
test eax, eax
jl 0x10015e3b
je 0x10015e6c
push 0
mov ecx, 0x2000
sub ecx, ebx
push ecx
lea edx, [esp + ebx + 0x2d8]
push edx
push esi
call sub.WS2_32.dll_recv
test eax, eax
jl 0x10015e97
je 0x10015eca
add ebx, eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x13c]
push ecx
push 0
lea edx, [esp + 0x3c]
push edx
push ebp
call sub.WS2_32.dll_select
test eax, eax
jge 0x10015df3
call fcn.1012b5d3
mov eax, dword [eax]
push eax
push edi
call sub.WS2_32.dll_inet_ntoa
push eax
push 0x359
push str.DNSCore::sendTCPQuery
push str._s:_d_Warning___Failed_while_waiting_for_reply_from_server__s_Errno:_d
call fcn.1011cbf0
add esp, 0x14
push esi
call sub.WS2_32.dll_closesocket
or esi, 0xffffffff
jmp 0x10015ecf
push edi
call sub.WS2_32.dll_inet_ntoa
push eax
push 0x363
push str.DNSCore::sendTCPQuery
push str._s:_d_Warning___Connection_timed_out_while_waiting_for_reply_from__s
call fcn.1011cbf0
add esp, 0x10
push esi
call sub.WS2_32.dll_closesocket
or esi, 0xffffffff
xor ebx, ebx
jmp 0x10015ecf
call fcn.1012b5d3
mov ecx, dword [eax]
push ecx
push edi
call sub.WS2_32.dll_inet_ntoa
push eax
push 0x370
push str.DNSCore::sendTCPQuery
push str._s:_d_Warning___Failed_in_receive_while_reading_from_server__s_Errno:_d
call fcn.1011cbf0
add esp, 0x14
push esi
call sub.WS2_32.dll_closesocket
or esi, 0xffffffff
xor ebx, ebx
jmp 0x10015ecf
cmp esi, 0xffffffff
jne 0x10015f45
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
inc edi
cmp edi, dword [ebp + 4]
mov dword [esp + 0x18], edi
jl 0x10015cc5
push esi
call sub.WS2_32.dll_closesocket
mov edx, dword [esp + 0x14]
push edx
call fcn.10128243
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x22d4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10127db1
add esp, 0x22cc
ret 8
call fcn.1012b5d3
mov edx, dword [eax]
push edx
push 0x32f
push str.DNSCore::sendTCPQuery
push str._s:_d_Error___Failed_to_create_socket_Errno:_d
call fcn.1011cbf0
mov eax, dword [esp + 0x24]
push eax
call fcn.10128243
add esp, 0x14
mov eax, 0xfffffffa
jmp 0x10015efa
push esi
call sub.WS2_32.dll_closesocket
push ebx
call fcn.10128320
mov edi, dword [esp + 0x30]
add esp, 4
mov dword [edi], eax
test eax, eax
jne 0x10015f8c
push 0x385
push str.DNSCore::sendTCPQuery
push str._s:_d_Error___OutOfMemory_While_tring_to_allocate_response
call fcn.1011cbf0
mov ecx, dword [esp + 0x20]
add esp, 0xc
push ecx
call fcn.10128243
add esp, 4
mov eax, 0xfffffffd
jmp 0x10015efa
mov ecx, dword [esp + 0x18]
test ecx, ecx
jle 0x10015fa6
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
mov ebp, dword [eax + ecx*4]
mov edx, dword [eax]
mov dword [eax], ebp
mov eax, dword [esi]
mov dword [eax + ecx*4], edx
mov eax, dword [edi]
lea ecx, [ebx - 2]
push ecx
lea edx, [esp + 0x2d6]
push edx
push eax
call fcn.10130710
mov ecx, dword [esp + 0x20]
add esp, 0xc
push ecx
call fcn.10128243
add esp, 4
mov eax, ebx
jmp 0x10015efa