Function at 0x48be01
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
cld
push esi
push ebx
xor ebx, ebx
mov esi, eax
lea edi, [ebp - 0x1c]
mov eax, ebx
sub esp, 0x250
mov dword [ebp - 0x258], edx
rep stosd dword es:[edi], eax
push esi
call sub.WS2_32.DLL_gethostbyname
mov esi, eax
test eax, eax
jne 0x48be51
push str.Failed_to_resolve_host
jmp 0x48be3c
push str.address_size_mismatch_n
push 0
push 0xa
call fcn.0043155c
jmp 0x48c05c
mov eax, edi
jmp 0x48c05f
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x25c], 0
cmp dword [eax], 0
je 0x48c05c
cmp word [esi + 8], 2
jne 0x48c05c
mov ax, word [esi + 0xa]
cmp ax, 4
ja 0x48be37
cwde
mov edx, dword [esi + 0xc]
push eax
mov eax, dword [ebp - 0x25c]
lea ebx, [ebp - 0x1c]
push dword [edx + eax*4]
lea eax, [ebp - 0x240]
push eax
call fcn.0052ef10
mov ax, word [esi + 8]
mov word [ebp - 0x1c], ax
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x18], eax
movzx eax, word [ebp - 0x258]
push eax
call sub.WS2_32.DLL_htons
add esp, 0xc
mov word [ebp - 0x1a], ax
push 6
push 1
push 2
call sub.WS2_32.DLL_socket
mov edi, eax
cmp eax, 0xffffffff
jne 0x48beda
push str.socket_failed_n
jmp 0x48bff4
lea eax, [ebp - 0x244]
mov dword [ebp - 0x244], 1
push eax
push 0x8004667e
push edi
call sub.WS2_32.DLL_ioctlsocket
inc eax
setne al
movzx eax, al
dec eax
push 0x10
mov dword [ebp - 0x254], eax
push ebx
push edi
call sub.WS2_32.DLL_connect
inc eax
jne 0x48bf26
call fcn.0048b7e3
sub eax, 0x2733
cmp eax, 1
jbe 0x48bf26
push str.error_connecting_to_HTTP_server
jmp 0x48bf89
mov eax, dword [0x58b860]
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x128], edi
mov dword [ebp - 0x12c], 1
mov dword [ebp - 0x238], edi
lea eax, [ebp - 0x24c]
lea edx, [ebp - 0x23c]
push eax
lea ebx, [ebp - 0x12c]
lea eax, [edi + 1]
push edx
mov dword [ebp - 0x23c], 1
push ebx
push 0
push eax
call sub.WS2_32.DLL_select
cmp eax, 0xffffffff
je 0x48bfa0
test eax, eax
jne 0x48bfa7
push str.Connect_attempt_timed_out
push 0
push 0xa
call fcn.0043155c
add esp, 0xc
push edi
call sub.WS2_32.DLL_closesocket
jmp 0x48c044
push str.Connect_failed
jmp 0x48bf89
push ebx
push edi
call sub.WS2_32.DLL___WSAFDIsSet
test eax, eax
jne 0x48bfc3
lea eax, [ebp - 0x23c]
push eax
push edi
call sub.WS2_32.DLL___WSAFDIsSet
test eax, eax
je 0x48c031
lea eax, [ebp - 0x250]
mov dword [ebp - 0x250], 4
push eax
lea eax, [ebp - 0x254]
push eax
push 0x1007
push 0xffff
push edi
call sub.WS2_32.DLL_getsockopt
test eax, eax
jns 0x48c002
push str.getsockopt_failed_n
push 0
push 0xa
call fcn.0043155c
add esp, 0xc
jmp 0x48c044
cmp dword [ebp - 0x254], 0
je 0x48c03b
push str.Error_connecting_to_remote_host
push 0
push 0xa
call fcn.0043155c
add esp, 0xc
push edi
call sub.WS2_32.DLL_closesocket
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x254]
mov dword [eax], edx
jmp 0x48c044
push str.select_failed_n
jmp 0x48bf89
cmp edi, 0xffffffff
jne 0x48be4a
inc dword [ebp - 0x25c]
mov eax, dword [esi + 0xc]
mov edx, dword [ebp - 0x25c]
cmp dword [eax + edx*4], 0
jmp 0x48be61
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret