Function at 0x408390
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
mov eax, 0xcc4c
call fcn.0040ce80
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0xb8]
xor ebx, ebx
push str.Agent.iNet.Live
push eax
mov byte [esp + 0x1a], bl
call fcn.0040d799
lea ecx, [esp + 0xc0]
push ecx
call fcn.004086f0
add esp, 0xc
mov ebp, eax
push ebp
call sub.WSOCK32.dll_inet_ntoa
push eax
lea edx, [esp + 0x260]
push 0x41c758
push edx
call fcn.0040d799
mov al, byte [0xba81b2]
add esp, 0xc
cmp al, bl
je 0x40840c
lea eax, [esp + 0x25c]
lea ecx, [esp + 0xd8]
push eax
push str.http:___s_iNet.CDN_CmdAgentHIP
push ecx
call fcn.0040d799
add esp, 0xc
jmp 0x408421
lea edx, [esp + 0xd8]
push str.__iNet.CDN_CmdAgentHIP
push edx
call fcn.0040d799
add esp, 8
lea eax, [esp + 0x25c]
lea ecx, [esp + 0xd8]
push eax
push ecx
lea edx, [esp + 0x4c64]
push str.GET__s_HTTP_1.1_r_nAccept:___r_nAccept_Language:_en_us_r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1__Trident_4.0__GTB6__.NET_CLR_1.1.4322__.NET_CLR_2.0.50727__.NET_CLR_3.0.4506.2152__.NET_CLR_3.5.30729__r_nAccept_Encoding:_gzip__deflate_r_nHost:__s_r_nCache_Control:_no_cache_r_n_r_n
push edx
call fcn.0040d799
lea edi, [esp + 0x4c6c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
mov al, byte [0xba81b2]
mov dword [esp + 0x30], ebx
not ecx
dec ecx
cmp al, bl
mov esi, ecx
je 0x40847d
mov eax, dword [0xba80ac]
mov cx, word [0xba80b0]
mov dword [esp + 0x2c], eax
mov word [esp + 0x26], cx
jmp 0x408488
mov dword [esp + 0x2c], ebp
mov word [esp + 0x26], 0x1f90
lea edx, [esp + 0x20]
push 1
push edx
call fcn.00403fd0
add esp, 8
test al, al
je 0x4086a4
mov ecx, dword [esp + 0x3c]
push ebx
lea eax, [esp + 0x4c60]
push esi
push eax
push ecx
call sub.WSOCK32.dll_send
cmp eax, esi
jne 0x4086b1
mov byte [esp + 0x13], bl
xor ebp, ebp
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x18]
push eax
push ebx
lea ecx, [esp + 0x160]
push ebx
push ecx
push 1
mov dword [esp + 0x16c], 1
mov dword [esp + 0x170], edx
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x30], ebx
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
je 0x40863e
cmp eax, ebx
je 0x4086b1
mov ecx, dword [esp + 0x3c]
mov edx, 0x2000
sub edx, ebp
push ebx
lea eax, [esp + ebp + 0x2c60]
push edx
push eax
push ecx
call sub.WSOCK32.dll_recv
mov esi, eax
cmp esi, 0xffffffff
je 0x40868e
cmp esi, ebx
je 0x40868e
mov al, byte [esp + 0x13]
add ebp, esi
cmp al, bl
jne 0x408631
lea edx, [esp + 0x2c5c]
push str._r_n_r_n
push edx
mov byte [esp + ebp + 0x2c64], bl
call fcn.0040de00
mov edx, eax
add esp, 8
cmp edx, ebx
je 0x4084c1
mov edi, str._r_n_r_n
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x2c5c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x45c]
mov eax, ecx
lea ecx, [esp + 0x2c5c]
sub edx, ecx
mov byte [esp + 0x13], 1
add eax, edx
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, ebp
and ecx, 3
sub edx, eax
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
mov byte [esp + eax + 0x45c], bl
lea esi, [esp + eax + 0x2c5c]
mov eax, ecx
lea edi, [esp + 0x2c5c]
mov ebp, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x45c]
push ecx
call sym.Sure_XLite.exe__WS_RetCode_4
cmp eax, 0xc8
jne 0x4086b1
lea edx, [esp + 0x35c]
lea eax, [esp + 0x45c]
push edx
push str.Content_Length:
push eax
call sym.Sure_XLite.exe__WS_HeadParse_12
test eax, eax
jne 0x4086b1
lea ecx, [esp + 0x35c]
push ecx
call fcn.0040dfdf
add esp, 4
cmp eax, 0x10000
mov dword [esp + 0x14], eax
jg 0x4086b1
jmp 0x408635
mov eax, dword [esp + 0x14]
cmp ebp, eax
je 0x408645
jmp 0x4084c1
push str.Hub_Socket_Error
jmp 0x4086a9
mov ecx, eax
lea esi, [esp + 0x2c5c]
mov edx, ecx
lea edi, [esp + 0xc5c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x20
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0xc60], bl
lea eax, [esp + 0x9c]
push eax
push 0x41de2c
lea ecx, [esp + 0xc68]
push ebx
push ecx
call sym.Sure_XLite.exe__WS_XMLparm_20
mov byte [esp + 0x12], 1
jmp 0x4086b1
call sub.WSOCK32.dll_WSAGetLastError
push eax
push esi
push str.Svr_Socket_Nob_d_Err_d
call sym.Sure_XLite.exe_xLogMsg
add esp, 0xc
jmp 0x4086b1
push str.Agent_Connection_to_Portal_Error
call sym.Sure_XLite.exe_xLogMsg
add esp, 4
mov edx, dword [esp + 0x3c]
push edx
call sub.WSOCK32.dll_closesocket
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebp
cmp al, bl
pop ebx
je 0x4086db
lea eax, [esp + 0x88]
push eax
call sub.WSOCK32.dll_inet_addr
add esp, 0xcc4c
ret
push str.89.187.182.140
call sub.WSOCK32.dll_inet_addr
add esp, 0xcc4c
ret