Function at 0x418ed0
Capabilities:
Act as tcp client
Check for time delay via queryperformancecounter
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x15c
mov eax, dword [0x5e4a44]
xor eax, esp
mov dword [esp + 0x154], eax
mov eax, dword [esp + 0x168]
push ebx
push ebp
mov ebp, dword [esp + 0x174]
push esi
push edi
mov edi, dword [esp + 0x174]
push 0
push 1
push 2
mov esi, edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], 0x1000
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x418f4c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x10]
push eax
push 0x5afb0c
push edx
mov dword [ebp], eax
call fcn.00403110
add esp, 0xc
mov eax, 0xfffffffe
jmp 0x419384
xor eax, eax
mov dword [esp + 0x154], eax
mov dword [esp + 0x158], eax
mov dword [esp + 0x15c], eax
mov dword [esp + 0x160], eax
mov eax, 2
mov word [esp + 0x154], ax
mov eax, dword [esi]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x158], eax
cmp eax, 0xffffffff
jne 0x418fa7
mov eax, dword [esi]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x419011
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0x158], eax
mov eax, dword [esp + 0x170]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ebp, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [esp + 0x20]
push ecx
push 0x1002
push 0xffff
push ebx
mov word [esp + 0x16a], ax
call ebp
cmp eax, 0xffffffff
jne 0x419041
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ecx
push eax
mov dword [edx], eax
mov edx, dword [esp + 0x18]
push 0x5afb34
push edx
call fcn.00403110
add esp, 0x10
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffc
jmp 0x419384
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x10]
mov dword [ebp], eax
mov ecx, dword [esi]
push ecx
push eax
push 0x5afb20
push edx
call fcn.00403110
add esp, 0x10
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffd
jmp 0x419384
push 4
lea eax, [esp + 0x20]
push eax
push 0x1001
push 0xffff
push ebx
call ebp
cmp eax, 0xffffffff
jne 0x41908f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push edx
push eax
mov dword [ecx], eax
mov eax, dword [esp + 0x18]
push 0x5afb4c
push eax
call fcn.00403110
add esp, 0x10
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffb
jmp 0x419384
push 0x10
lea ecx, [esp + 0x158]
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4190f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
movzx ecx, word [esp + 0x156]
mov edx, dword [esp + 0x18]
push ecx
movzx ecx, word [esp + 0x174]
mov dword [edx], eax
mov edx, dword [esp + 0x15c]
push edx
mov edx, dword [esi]
push ecx
push edx
push eax
mov eax, dword [esp + 0x24]
push 0x5afb64
push eax
call fcn.00403110
add esp, 0x1c
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffa
jmp 0x419384
mov esi, dword [esp + 0x2c]
mov ecx, dword [esi]
push 4
push ecx
push edi
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x41913d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [esp + 0x18]
push ebx
mov dword [edi], eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [esi]
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
push edx
push eax
push 0x5afbac
push ecx
call fcn.00403110
add esp, 0x10
mov eax, 0xfffffff9
jmp 0x419384
mov edx, dword [esp + 0x1c]
push edx
push 0
push edi
call fcn.00557650
add esp, 0xc
lea eax, [esp + 0x20]
push eax
mov dword [esi], 0
xor ebp, ebp
mov byte [esp + 0x1b], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
test eax, eax
jg 0x41918b
jl 0x41917f
test ecx, ecx
ja 0x41918b
mov dword [esp + 0x30], 0x2dc6c0
mov dword [esp + 0x34], ebp
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea ecx, [esp + 0x38]
push ecx
call esi
lea edx, [esp + 0x20]
push edx
call esi
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x24]
sbb ecx, dword [esp + 0x3c]
push 0
push 0x3e8
push ecx
push eax
call fcn.00559830
mov ecx, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x34]
push ecx
push edx
push eax
call fcn.00559870
cmp edx, dword [esp + 0x184]
jg 0x41939d
jl 0x4191f0
cmp eax, dword [esp + 0x180]
ja 0x41939d
lea ebx, [ebx]
lea edx, [esp + 0x40]
push edx
push 0
push 0
lea eax, [esp + 0x54]
push eax
push 0
mov dword [esp + 0x5c], 1
mov dword [esp + 0x60], ebx
mov dword [esp + 0x54], 2
mov dword [esp + 0x58], 0
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
cmp esi, 0xffffffff
je 0x4193f7
test esi, esi
jne 0x41926e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
test eax, eax
jne 0x419422
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [esp + 0x20]
sub edx, dword [esp + 0x38]
mov eax, dword [esp + 0x24]
sbb eax, dword [esp + 0x3c]
push 0
push 0x3e8
push eax
push edx
jmp 0x4191b8
jge 0x41928c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x10]
push esi
push eax
push str.select
push edx
call fcn.00403110
add esp, 0x10
jmp 0x419245
mov eax, dword [esp + 0x1c]
push 0
sub eax, ebp
push eax
lea ecx, [edi + ebp]
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
je 0x419301
test esi, esi
jl 0x419328
je 0x419245
mov eax, dword [esp + 0x1c]
add ebp, esi
cmp byte [esp + 0x17], 0
je 0x4192de
cmp ebp, 4
jb 0x4192ea
mov ecx, dword [edi]
mov edx, dword [esp + 0x2c]
mov dword [edx], ecx
cmp ecx, eax
jae 0x41934f
cmp ebp, ecx
jae 0x419376
mov byte [esp + 0x17], 0
jmp 0x4192ea
mov edx, dword [esp + 0x2c]
cmp ebp, dword [edx]
jae 0x419376
push 0
sub eax, ebp
push eax
lea eax, [edi + ebp]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4192a7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x18]
push esi
push eax
mov dword [edx], eax
mov eax, dword [esp + 0x18]
push 0x5afbd4
push eax
call fcn.00403110
add esp, 0x10
mov esi, 0xfffffff6
jmp 0x41937b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push esi
push eax
push 0x5afbd4
push edx
mov dword [ecx], eax
call fcn.00403110
add esp, 0x10
mov esi, 0xfffffff5
jmp 0x41937b
mov ecx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
mov dword [ecx], 0xfffffff4
mov edx, dword [edx]
push edx
push 0x5afe04
push eax
call fcn.00403110
add esp, 0x10
mov esi, 0xfffffff4
jmp 0x41937b
xor esi, esi
add dword [edx], 0xfffffffc
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005509f8
add esp, 0x15c
ret
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
mov dword [ecx], 0xffffffff
push 0x5afde0
mov ecx, edi
call fcn.00402eb0
mov edx, dword [esp + 0x184]
mov eax, dword [esp + 0x180]
mov ecx, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push edx
push eax
push str.:__I64d___I64d___I64d___d
call fcn.00419850
add esp, 0x24
or esi, 0xffffffff
jmp 0x41937b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push 0xffffffffffffffff
push eax
push str.select
push edx
mov dword [ecx], eax
call fcn.00403110
add esp, 0x10
mov esi, 0xfffffff8
jmp 0x41937b
push 0
push eax
mov eax, dword [esp + 0x18]
push str.select
push eax
call fcn.00403110
add esp, 0x10
mov esi, 0xfffffff7
jmp 0x41937b