Function at 0x48b360
Capabilities:
Check for time delay via gettickcount
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x62d414]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, edx
push edi
xor edi, edi
xor edx, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
cmp dx, cx
je 0x48b7c6
test esi, esi
je 0x48b7c6
test eax, eax
je 0x48b7c6
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, 2
push ecx
mov word [esp + 0x20], ax
call sub.WS2_32.dll_htons
push esi
mov word [esp + 0x22], ax
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x48b3eb
push esi
call sub.WS2_32.dll_inet_addr
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x48b407
mov edi, 0x81000004
jmp 0x48b407
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
push ecx
push eax
lea ecx, [esp + 0x28]
push ecx
call sub.MSVCR90.dll_memcpy
mov eax, dword [esp + 0x2c]
add esp, 0xc
test ebx, ebx
je 0x48b40d
mov dword [ebx], eax
test edi, edi
js 0x48b447
push 0x5fc0f0
call sub.WS2_32.dll_getprotobyname
mov esi, eax
test esi, esi
jne 0x48b44b
mov eax, dword [0x68cb64]
test eax, eax
je 0x48b440
mov edx, dword [eax]
push str.Call_to_getprotobyname_returned_0
push str.dsapiTCPClientConnect
push 2
push eax
mov eax, dword [edx]
call eax
add esp, 0x10
mov edi, connect
jmp 0x48b44b
mov esi, dword [esp + 0x14]
test edi, edi
js 0x48b59f
movsx ecx, word [esi + 8]
push ecx
push 1
push 2
call sub.WS2_32.dll_socket
mov edx, dword [esp + 0x10]
mov dword [edx], eax
cmp eax, 0xffffffff
jne 0x48b490
mov eax, dword [0x68cb64]
test eax, eax
je 0x48b48b
mov ecx, dword [eax]
mov edx, dword [ecx]
push str.Call_to_socket_returned_INVALID_SOCKET
push str.dsapiTCPClientConnect
push 2
push eax
call edx
add esp, 0x10
mov edi, 0x81000008
test edi, edi
js 0x48b59f
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
push 4
lea eax, [esp + 0x18]
push eax
push 4
push 0xffff
push edx
mov dword [esp + 0x28], 0xffffffff
call sub.WS2_32.dll_setsockopt
test eax, eax
jge 0x48b4e4
mov ecx, dword [0x68cb64]
test ecx, ecx
je 0x48b4df
mov edx, dword [ecx]
push eax
mov eax, dword [edx]
push str.Call_to_setsockopt_returned_0x_x
push str.dsapiTCPClientConnect
push 2
push ecx
call eax
add esp, 0x14
mov edi, 0x81000009
test edi, edi
js 0x48b59f
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x48b59f
xor eax, eax
mov ecx, 2
mov dword [esp + 0x2c], eax
push eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov word [esp + 0x30], cx
call sub.WS2_32.dll_htons
mov word [esp + 0x2e], ax
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push 0x10
lea edx, [esp + 0x30]
push edx
push ecx
mov dword [esp + 0x3c], ebx
call sub.WS2_32.dll_bind
mov esi, eax
test esi, esi
je 0x48b57d
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [0x68cb64]
test ecx, ecx
je 0x48b565
mov edx, dword [ecx]
push ebx
push 0
push eax
mov eax, dword [edx]
push esi
push str.Binding_failed:_returned_value_0x_x__WSAGetLastError__0x_x._Local_port___d__local_IP___d
push str.dsapiTCPClientConnect
push 2
push ecx
call eax
add esp, 0x20
mov edi, dword [esp + 0x10]
mov esi, dword [edi]
call fcn.0048b340
mov dword [edi], 0xffffffff
mov edi, 0x81000005
jmp 0x48b59f
mov eax, dword [0x68cb64]
test eax, eax
je 0x48b59f
mov ecx, dword [eax]
mov edx, dword [ecx]
push ebx
push 0
push str.Binding_succeeded__Local_port___d__local_IP___d
push str.dsapiTCPClientConnect
push 3
push eax
call edx
add esp, 0x18
mov dword [esp + 0x18], 1
test edi, edi
js 0x48b7b2
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
lea eax, [esp + 0x18]
push eax
push 0x8004667e
push edx
call sub.WS2_32.dll_ioctlsocket
mov esi, eax
test esi, esi
je 0x48b608
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [0x68cb64]
test ecx, ecx
je 0x48b5f2
mov edx, dword [ecx]
push eax
mov eax, dword [edx]
push esi
push str.Could_not_set_socket_to_nono_blocking_mode._Returned_value_is_0x_x__WSAGetLastError__0x_x
push str.dsapiTCPClientConnect
push 2
push ecx
call eax
add esp, 0x18
mov edi, dword [esp + 0x10]
mov esi, dword [edi]
call fcn.0048b340
mov dword [edi], 0xffffffff
mov edi, 0x81000009
test edi, edi
js 0x48b7b2
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [esp + 0x14], eax
mov eax, 1
cmp dword [ebp + 0x14], eax
jae 0x48b629
mov dword [ebp + 0x14], eax
mov ebx, dword [esp + 0x10]
mov edx, dword [ebx]
push 0x10
lea ecx, [esp + 0x20]
push ecx
push edx
call sub.WS2_32.dll_connect
mov edi, eax
call sub.WS2_32.dll_WSAGetLastError
cmp edi, 0xffffffff
jne 0x48b6c6
cmp eax, 0x2733
jne 0x48b773
mov eax, dword [0x68cb64]
test eax, eax
je 0x48b677
mov ecx, dword [eax]
mov edx, dword [ecx]
push 0x2733
push str.Non_blocking_call_to_connect_succeeded__WSAGetLastError__0x_x._Waiting_until_connection_is_established
push str.dsapiTCPClientConnect
push 3
push eax
call edx
add esp, 0x14
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
nop
mov eax, dword [ebx]
push eax
mov edi, 5
xor ebx, ebx
call fcn.0048b150
add esp, 4
test eax, eax
je 0x48b6d0
cmp eax, 0x80000000
je 0x48b76f
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
mov ecx, dword [ebp + 0x14]
sub eax, dword [esp + 0x14]
imul ecx, ecx, 0x3e8
cmp eax, ecx
jae 0x48b76f
mov ebx, dword [esp + 0x10]
jmp 0x48b680
test edi, edi
jne 0x48b773
jmp 0x48b6d4
mov ebx, dword [esp + 0x10]
mov eax, dword [0x68cb64]
test eax, eax
je 0x48b700
mov edi, dword [eax]
call esi
sub eax, dword [esp + 0x14]
mov edx, dword [0x68cb64]
push eax
mov eax, dword [edi]
push str.Connection_established_successfully_within__d_ms
push str.dsapiTCPClientConnect
push 3
push edx
call eax
add esp, 0x14
mov edx, dword [ebx]
lea ecx, [esp + 0x18]
push ecx
push 0x8004667e
xor edi, edi
push edx
mov dword [esp + 0x24], edi
call sub.WS2_32.dll_ioctlsocket
mov esi, eax
test esi, esi
je 0x48b7b2
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [0x68cb64]
test ecx, ecx
je 0x48b749
mov edx, dword [ecx]
push eax
mov eax, dword [edx]
push esi
push str.Closing_socket:_call_to_ioctlsocket_returned_error_code_0x_x__WSAGetLastError_returned_0x_x
push str.dsapiTCPClientConnect
push 2
push ecx
call eax
add esp, 0x18
mov esi, dword [ebx]
call fcn.0048b340
mov edi, 0x81000009
mov dword [ebx], 0xffffffff
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0051ed00
mov esp, ebp
pop ebp
ret
mov ebx, dword [esp + 0x10]
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [0x68cb64]
test ecx, ecx
je 0x48b7a6
mov edi, dword [ecx]
push eax
call esi
sub eax, dword [esp + 0x18]
mov ecx, dword [0x68cb64]
mov edx, dword [edi]
push eax
push str.Could_not_connect_within__d_ms._WSAGetLastError_returned_0x_x._Check_if_Server_Side_component_is_running_and_firewall_allows_connection_to_it
push str.dsapiTCPClientConnect
push 3
push ecx
call edx
add esp, 0x18
mov esi, dword [ebx]
mov edi, 0x81000006
call fcn.0048b340
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0051ed00
mov esp, ebp
pop ebp
ret
mov eax, dword [0x68cb64]
test eax, eax
je 0x48b7e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push str.Invalid_argument
push str.dsapiTCPClientConnect
push 2
push eax
call edx
add esp, 0x10
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, connect
call fcn.0051ed00
mov esp, ebp
pop ebp
ret