Function at 0x48d210
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ecx, 4
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x268
mov dword [ebp - 0x264], edx
cld
xor edx, edx
mov ebx, eax
lea edi, [ebp - 0x28]
mov eax, edx
rep stosd dword es:[edi], eax
push ebx
call sub.ws2_32.dll_gethostbyname
add esp, 0xc
mov ebx, eax
test eax, eax
je 0x48d4b8
mov edx, dword [eax + 0xc]
xor esi, esi
cmp dword [edx], 0
jmp 0x48d327
lea eax, [ebp - 0x250]
mov dword [ebp - 0x250], 1
push ecx
push eax
push 0x8004667e
push edi
call sub.ws2_32.dll_ioctlsocket
inc eax
setne al
and eax, 0xff
push 0x10
dec eax
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x28]
push eax
push edi
call sub.ws2_32.dll_connect
pop edx
inc eax
je 0x48d430
mov eax, dword [0x69a7e0]
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x258], eax
xor eax, eax
mov dword [ebp - 0x138], 1
mov dword [ebp + eax*4 - 0x134], edi
mov dword [ebp + eax*4 - 0x244], edi
sub esp, 0xc
lea eax, [ebp - 0x258]
mov dword [ebp - 0x248], 1
push eax
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x138]
push eax
lea eax, [edi + 1]
push 0
push eax
call sub.ws2_32.dll_select
add esp, 0xc
cmp eax, 0xffffffff
je 0x48d46b
test eax, eax
jne 0x48d3b1
push eax
push str.Connect_attempt_timed_out
push 0
push 0xa
call fcn.0041e020
mov dword [esp], edi
call sub.ws2_32.dll_closesocket
add esp, 0xc
inc esi
mov edx, dword [ebx + 0xc]
mov ecx, dword [edx + esi*4]
test ecx, ecx
je 0x48d460
cmp word [ebx + 8], 2
jne 0x48d460
mov ax, word [ebx + 0xa]
cmp ax, 4
ja 0x48d44e
cwde
push ecx
push eax
mov eax, dword [edx + esi*4]
push eax
lea eax, [ebp - 0x24c]
push eax
call fcn.0058e948
mov ax, word [ebx + 8]
mov word [ebp - 0x28], ax
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x264]
and eax, 0xffff
mov dword [esp], eax
call sub.ws2_32.dll_htons
pop ecx
pop edi
push 6
mov word [ebp - 0x26], ax
push 1
push 2
call sub.ws2_32.dll_socket
pop edx
mov edi, eax
cmp eax, 0xffffffff
jne 0x48d253
push edi
push str.socket_failed_n
push 0
push 0xa
call fcn.0041e020
add esp, 0x10
jmp 0x48d31e
push eax
push eax
lea eax, [ebp - 0x138]
push eax
push edi
call sub.ws2_32.dll___WSAFDIsSet
pop edx
test eax, eax
pop ecx
jne 0x48d3df
push eax
push eax
lea eax, [ebp - 0x248]
push eax
push edi
call sub.ws2_32.dll___WSAFDIsSet
pop edx
test eax, eax
pop ecx
je 0x48d4a2
sub esp, 0xc
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x25c], 4
push eax
lea eax, [ebp - 0x260]
push eax
push 0x1007
push 0xffff
push edi
call sub.ws2_32.dll_getsockopt
add esp, 0xc
test eax, eax
js 0x48d4ad
mov eax, dword [ebp - 0x260]
test eax, eax
jne 0x48d476
cmp edi, 0xffffffff
je 0x48d31e
mov eax, edi
jmp 0x48d463
call fcn.0048c990
sub eax, 0x2733
cmp eax, 1
jbe 0x48d294
push eax
push str.error_connecting_to_HTTP_server
jmp 0x48d30a
push ebx
push str.address_size_mismatch_n
push 0
push 0xa
call fcn.0041e020
lea esi, [esi]
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push eax
push str.Connect_failed
jmp 0x48d30a
push eax
push str.Error_connecting_to_remote_host
push 0
push 0xa
call fcn.0041e020
mov dword [esp], edi
call sub.ws2_32.dll_closesocket
add esp, 0xc
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x260]
mov dword [eax], edx
jmp 0x48d31e
push eax
push str.select_failed_n
jmp 0x48d30a
push eax
push str.getsockopt_failed_n
jmp 0x48d3a0
push esi
push str.Failed_to_resolve_host
jmp 0x48d454