Function at 0x446120
Capabilities:
Check for time delay via queryperformancecounter
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x358
mov eax, dword [ebp + 8]
mov ebx, dword [eax]
cmp word [ebx + 0x108], 0
je 0x44673c
lea edx, [esp + 0x14c]
mov ecx, ebx
call fcn.0044ac50
mov edi, eax
lea esi, [esp + 0x250]
mov ecx, ebx
mov edx, esi
call fcn.0044ac50
mov dword [esp + 0x30], 0
movzx eax, word [ebp + 0x10]
imul eax, eax, 0x3e8
mov dword [esp + 0x34], eax
inc edi
lea eax, [esp + 0x30]
push eax
push esi
push 0
lea eax, [esp + 0x158]
push eax
push edi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x4466ff
cmp word [ebx + 0x108], 0
mov edi, ebx
mov dword [esp], ebx
je 0x4464bb
lea eax, [edi + 0x10c]
mov dword [esp + 8], eax
xor esi, esi
jmp 0x44621c
mov dword [esp + 0x60], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0
push 0
lea ecx, [esp + 0x68]
push ecx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0x60]
push str.Cannot_set_socket_option_TCP_NODELAY._Error:__s
push 0
push dword [edi]
call fcn.0040aa30
add esp, 0x10
push dword [esp + 0x60]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, dword [esp]
inc esi
movzx eax, word [edi + 0x108]
cmp esi, eax
jae 0x4464bb
lea eax, [esp + 0x14c]
push eax
push dword [edi + esi*4 + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x44620c
mov dword [esp + 0x28], 0x80
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0xcc]
push eax
push dword [edi + esi*4 + 8]
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
je 0x44620c
mov ebx, eax
movzx ecx, word [edi + 6]
test cx, cx
je 0x4462d0
movzx eax, word [edi + 0x110]
cmp ax, cx
jb 0x4462d0
mov ecx, dword [esp + 8]
mov edi, dword [ecx]
test edi, edi
je 0x446202
nop word cs:[eax + eax]
cmp dword [edi + 4], 0
je 0x446292
mov edi, dword [edi + 0x38]
test edi, edi
jne 0x446280
jmp 0x446202
mov ecx, dword [edi + 0x38]
test ecx, ecx
je 0x44629f
mov edx, dword [edi + 0x3c]
mov dword [ecx + 0x3c], edx
mov edx, dword [edi + 0x3c]
mov dword [edx], ecx
dec eax
mov ecx, dword [esp]
mov word [ecx + 0x110], ax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
call dword [edi + 0x34]
mov edi, dword [esp + 4]
add esp, 4
nop word cs:[eax + eax]
mov dword [esp + 0x60], 1
lea eax, [esp + 0x60]
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [esp + 0x2c], 1
push 4
lea eax, [esp + 0x30]
push eax
push 1
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x4461b9
sub esp, 0x1c
movapd xmm0, xmmword [0x5235a0]
movupd xmmword [esp + 0xc], xmm0
lea eax, [esp + 0x7c]
mov dword [esp + 8], eax
lea eax, [esp + 0xe4]
mov dword [esp], eax
mov dword [esp + 4], 0x80
call dword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
je 0x44638c
mov dword [esp + 0x10], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0x10]
push ebx
push str.Connection__i__New_connection_over_TCP__getnameinfo_failed_with_error:__s
push 0
push dword [edi]
call fcn.0040aac0
add esp, 0x14
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4463a3
lea eax, [esp + 0x60]
push eax
push ebx
push str.Connection__i__New_connection_over_TCP_from__s
push 0
push dword [edi]
call fcn.0041b960
add esp, 0x14
push 0x40
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test eax, eax
je 0x446202
mov edi, eax
xorpd xmm0, xmm0
movupd xmmword [eax], xmm0
movupd xmmword [eax + 0x10], xmm0
movupd xmmword [eax + 0x20], xmm0
mov dword [eax + 8], ebx
mov ebx, dword [esp]
mov dword [eax + 0x18], ebx
mov dword [eax + 0x24], 0x446820
mov dword [eax + 0x30], 0x44ad40
mov dword [eax + 0x34], 0x44ad60
mov dword [eax + 0x1c], 0x446af0
mov dword [eax + 0x20], 0x446b50
mov dword [eax + 0x2c], 0x446b80
mov dword [eax], 1
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
fild qword [esp + 0x10]
fstp qword [esp + 0x48]
movsd xmm0, qword [0x5235b0]
divsd xmm0, qword [esp + 0x48]
fild qword [esp + 0x58]
fstp qword [esp + 0x50]
mulsd xmm0, qword [esp + 0x50]
movsd qword [esp + 0x20], xmm0
fld qword [esp + 0x20]
fnstcw word [esp + 4]
movzx eax, word [esp + 4]
or eax, 0xc00
mov word [esp + 0xc], ax
fldcw word [esp + 0xc]
fistp qword [esp + 0x20]
fldcw word [esp + 4]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [edi + 0x14], ecx
mov dword [edi + 0x10], eax
inc word [ebx + 0x110]
mov eax, dword [ebx + 0x10c]
mov dword [edi + 0x38], eax
test eax, eax
je 0x44648f
mov ecx, edi
add ecx, 0x38
mov dword [eax + 0x3c], ecx
mov eax, dword [esp + 8]
mov dword [eax], edi
mov dword [edi + 0x3c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
je 0x446209
movq xmm0, qword [eax]
psubd xmm0, xmmword [0x5235c0]
movq qword [eax], xmm0
jmp 0x446209
lea eax, [esp + 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
fild qword [esp + 0xc8]
fstp qword [esp + 0x38]
movsd xmm0, qword [0x5235b0]
divsd xmm0, qword [esp + 0x38]
fild qword [esp + 0x60]
fstp qword [esp + 0x40]
mulsd xmm0, qword [esp + 0x40]
movsd qword [esp + 0x18], xmm0
fld qword [esp + 0x18]
fnstcw word [esp + 6]
movzx eax, word [esp + 6]
or eax, 0xc00
mov word [esp + 0xe], ax
fldcw word [esp + 0xe]
fistp qword [esp + 0x18]
fldcw word [esp + 6]
mov ebx, dword [edi + 0x10c]
test ebx, ebx
je 0x44673c
mov eax, dword [esp + 0x18]
mov dword [esp + 8], eax
mov esi, dword [esp + 0x1c]
jmp 0x446565
mov eax, dword [edi + 4]
mov dword [edi + 4], 0
push edi
call dword [edi + 0x34]
add esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
je 0x44655d
dec dword [eax]
test ebx, ebx
je 0x44673c
mov edi, ebx
mov ebx, dword [ebx + 0x38]
cmp dword [edi], 1
jne 0x446610
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
mov edx, 0x47868c00
add ecx, edx
adc eax, 0
cmp ecx, dword [esp + 8]
sbb eax, esi
jge 0x446610
push dword [edi + 8]
push str.Connection__i__Closed_by_the_server__no_Hello_Message_
push 0
mov eax, dword [esp + 0xc]
push dword [eax]
call fcn.0041b960
add esp, 0x10
mov eax, dword [edi + 0x38]
test eax, eax
je 0x4465b4
mov ecx, dword [edi + 0x3c]
mov dword [eax + 0x3c], ecx
mov ecx, dword [edi + 0x3c]
mov dword [ecx], eax
mov eax, dword [esp]
dec word [eax + 0x110]
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [edi + 4]
test eax, eax
je 0x4465e1
mov ecx, dword [eax + 0x60]
cmp ecx, edi
jne 0x4465e1
mov dword [eax + 0x60], 0
mov eax, dword [edi + 4]
mov dword [edi + 4], 0
push edi
call dword [edi + 0x34]
add esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
je 0x44655d
inc dword [eax + 0xc]
jmp 0x44655b
lea eax, [esp + 0x250]
push eax
push dword [edi + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x44663c
lea eax, [esp + 0x14c]
push eax
push dword [edi + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x44655d
mov dword [esp + 0xcc], 0
mov dword [esp + 0xc8], 0
push 0
lea eax, [esp + 0xcc]
push eax
push edi
call fcn.00446950
add esp, 0xc
cmp eax, 0x80ae0000
je 0x4466a0
test eax, eax
jne 0x44655d
lea eax, [esp + 0xc8]
push eax
push edi
push dword [ebp + 0xc]
call fcn.00419ca0
add esp, 0xc
mov eax, dword [esp + 0xcc]
and eax, 0xfffffffe
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
jmp 0x44655d
push dword [edi + 8]
push str.Connection__i__Closed
push 0
mov eax, dword [esp + 0xc]
push dword [eax]
call fcn.0041b960
add esp, 0x10
mov eax, dword [edi + 0x38]
test eax, eax
je 0x4466c5
mov ecx, dword [edi + 0x3c]
mov dword [eax + 0x3c], ecx
mov ecx, dword [edi + 0x3c]
mov dword [ecx], eax
mov eax, dword [esp]
dec word [eax + 0x110]
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [edi + 4]
test eax, eax
je 0x446540
mov ecx, dword [eax + 0x60]
cmp ecx, edi
jne 0x446540
mov dword [eax + 0x60], 0
jmp 0x446540
mov dword [esp + 0xc8], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0xc8]
push 0
push 0
push ecx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0xc8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret