Function at 0x407500
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Send http request

Disassembly:
mov eax, 0x4d80
call fcn.0040ce80
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x4d98]
lea eax, [esp + 0x28]
push eax
push edi
call sym.Sure_XLite.exe__xGetFileTime_8
cmp eax, 0xffffffff
jne 0x407547
call sub.WSOCK32.dll_WSAGetLastError
push edi
push eax
push str.PQ_PushChk_GetFileTime_Err_d_on__s
call sym.Sure_XLite.exe_xLogMsg
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4d80
ret
lea ecx, [esp + 0x4c]
lea edx, [esp + 0x28]
push ecx
push edx
call sym.Sure_XLite.exe__WS_TimeBan_8
mov al, byte [esp + 0x4da4]
xor ebx, ebx
cmp al, bl
je 0x40757e
mov eax, dword [esp + 0x4d9c]
mov esi, 1
mov dword [eax], 0x540be400
mov dword [eax + 4], 2
jmp 0x4075d8
push 1
push 1
lea eax, [esp + 0x18]
push edi
push eax
call sym.Sure_XLite.exe__xFileOpen_16
cmp dword [esp + 0x10], 0xffffffff
jne 0x4075b6
call sub.WSOCK32.dll_WSAGetLastError
push edi
push eax
push str.PQ_Push_Chk_Err_d_opening_file_s
call sym.Sure_XLite.exe_xLogMsg
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4d80
ret
lea ecx, [esp + 0x10]
push ecx
call sym.Sure_XLite.exe__xGetFileSize_4
mov ecx, dword [esp + 0x4d9c]
mov dword [ecx], eax
mov dword [ecx + 4], edx
lea edx, [esp + 0x10]
push edx
call sym.Sure_XLite.exe__xFileClose_4
xor esi, esi
lea eax, [esp + 0x18c]
push eax
push edi
call sym.Sure_XLite.exe__xStripPath_8
lea ecx, [esp + 0x24]
push ecx
call fcn.0040c91f
lea edx, [esp + 0x28]
push edx
call fcn.0040c7bf
push eax
push str._Y_m_d_H_M_S
lea eax, [esp + 0x3c]
push 0x20
push eax
call fcn.0040dfea
mov al, byte [0xba81b2]
mov ebp, dword [esp + 0x4dac]
add esp, 0x18
cmp al, bl
je 0x407684
mov ecx, dword [0xba80a8]
mov ax, word [ebp + 6]
push esi
push ecx
lea edx, [esp + 0x194]
cmp ax, 0x50
push 0xba7df8
push edx
jne 0x40765e
lea eax, [esp + 0x3c]
lea ecx, [ebp + 0x38]
push eax
push ecx
lea edx, [esp + 0xa4]
push str.http:___s__s_Sure_X_FileX_MPost__s_MAC_sNID_dPID_dVID777SrcAgent
push edx
call fcn.0040d799
add esp, 0x20
jmp 0x4076b3
lea ecx, [esp + 0x3c]
and eax, 0xffff
push ecx
lea edx, [ebp + 0x38]
push eax
push edx
lea eax, [esp + 0xa8]
push str.http:___s:_d__s_Sure_X_FileX_MPost__s_MAC_sNID_dPID_dVID777SrcAgent
push eax
call fcn.0040d799
add esp, 0x24
jmp 0x4076b3
mov ecx, dword [0xba80a8]
push esi
push ecx
lea edx, [esp + 0x194]
push 0xba7df8
lea eax, [esp + 0x38]
push edx
push eax
lea ecx, [esp + 0xa0]
push str.__s_Sure_X_FileX_MPost__s_MAC_sNID_dPID_dVID777SrcAgent
push ecx
call fcn.0040d799
add esp, 0x1c
lea edx, [esp + 0x8c]
push edx
push str.PQ_Push_Chk_Url_s
call sym.Sure_XLite.exe_xLogMsg
lea eax, [esp + 0x94]
lea ecx, [esp + 0x494]
push eax
push str.HEAD__s_HTTP_1.1
push ecx
call fcn.0040d799
mov edi, str._r_nAccept:___r_nUser_Agent:_Sure_X_VOD_r_nAccept_Encoding:_gzip__deflate
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x4a0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x60]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x9a8]
push str._r_nIf_Modified_Since:__s
push ecx
call fcn.0040d799
lea edi, [esp + 0x9b0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x4ac]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x4dbc]
mov ecx, edx
and ecx, 3
mov edx, dword [eax]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 4]
lea eax, [esp + 0x9b0]
push ecx
push edx
push str._r_nETag:__I64d
push eax
call fcn.0040d799
lea edi, [esp + 0x9c0]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x30
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x48c]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
lea edx, [esp + 0x48c]
rep movsb byte es:[edi], byte [esi]
mov edi, str._r_nConnection:_Keep_Alive_r_n_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x490]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x490]
push ecx
mov ecx, dword [ebp + 0x1c]
push eax
push ecx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x40782a
push str.Push_Tx_ERR___transmit_fail
call sym.Sure_XLite.exe_xLogMsg
mov edx, dword [ebp + 0x1c]
add esp, 4
push edx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x4d80
ret
mov al, byte [0xba85c4]
xor esi, esi
cmp al, bl
jne 0x407946
mov edi, 0xa
mov eax, dword [ebp + 0x1c]
lea ecx, [esp + 0x1c]
push ecx
push ebx
lea edx, [esp + 0x894]
push ebx
push edx
push 1
mov dword [esp + 0x8a0], 1
mov dword [esp + 0x8a4], eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], ebx
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
je 0x4078db
cmp eax, ebx
je 0x4078ce
mov edx, dword [ebp + 0x1c]
mov eax, 0x4000
sub eax, esi
push ebx
lea ecx, [esp + esi + 0xd94]
push eax
push ecx
push edx
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x4078db
cmp eax, ebx
je 0x4078db
add esi, eax
lea eax, [esp + 0xd90]
push str._r_n_r_n
push eax
mov byte [esp + esi + 0xd98], bl
call fcn.0040de00
mov edx, eax
add esp, 8
cmp edx, ebx
jne 0x407905
cmp byte [0xba85c4], bl
jne 0x407946
jmp 0x40783e
push str.PQ_Push_Chk_Host_Read_TimeOut
call sym.Sure_XLite.exe_xLogMsg
add esp, 4
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.PQ_PushChk_ERR___read_fail_d
call sym.Sure_XLite.exe_xLogMsg
mov ecx, dword [ebp + 0x1c]
add esp, 8
push ecx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x4d80
ret
mov edi, str._r_n_r_n
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0xd90]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x48c]
mov eax, ecx
lea ecx, [esp + 0xd90]
sub edx, ecx
add eax, edx
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x48c], bl
mov esi, dword [esp + 0x4da0]
lea eax, [esp + 0x48c]
push eax
mov dword [esi], ebx
mov dword [esi + 4], ebx
call sym.Sure_XLite.exe__WS_RetCode_4
cmp eax, 0xc8
jne 0x407a5d
lea ecx, [esp + 0x28c]
lea edx, [esp + 0x48c]
push ecx
push str.Last_Modified:
push edx
call sym.Sure_XLite.exe__WS_HeadParse_12
test eax, eax
jne 0x407a1c
lea eax, [esp + 0x28c]
push eax
call sym.Sure_XLite.exe__WS_BanTime_4
mov edx, dword [esp + 0x4d98]
lea ecx, [esp + 0x1c]
push ecx
push edx
mov edi, eax
call sym.Sure_XLite.exe__xGetFileTime_8
cmp edi, dword [esp + 0x1c]
jne 0x407a1c
lea eax, [esp + 0x28c]
lea ecx, [esp + 0x48c]
push eax
push str.Content_Length:
push ecx
call sym.Sure_XLite.exe__WS_HeadParse_12
lea edx, [esp + 0x14]
lea eax, [esp + 0x28c]
push edx
push str._I64d
push eax
call fcn.0040e94a
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push ecx
push edx
push str.PQ_PushChk_Partial_Existing_Offset_I64d
call sym.Sure_XLite.exe_xLogMsg
mov edx, dword [esp + 0x4db4]
mov eax, dword [esp + 0x30]
add esp, 0x18
mov ecx, dword [edx + 4]
cmp eax, ecx
mov ecx, dword [esp + 0x14]
jg 0x407a1c
jl 0x407a17
cmp ecx, dword [edx]
ja 0x407a1c
mov dword [esi], ecx
mov dword [esi + 4], eax
lea eax, [esp + 0x28c]
lea ecx, [esp + 0x48c]
push eax
push str.ETag:
push ecx
call sym.Sure_XLite.exe__WS_HeadParse_12
lea edx, [esp + 0x28c]
push 0x460170
push edx
call fcn.0040eb50
add esp, 8
test eax, eax
jne 0x407a71
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x4d80
ret
cmp eax, 0x130
jne 0x407a1c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4d80
ret
lea eax, [esp + 0x28c]
push eax
call fcn.0040dfdf
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4d80
ret