Function at 0x40fa80
Capabilities:
Get socket status
Send data
Send data on socket
Send http request
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xba8
mov eax, dword [0x5e8e00]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xa48], ecx
mov dword [ebp - 0x80c], 0
mov byte [ebp - 0x808], 0
push 0x7ff
push 0
lea eax, [ebp - 0x807]
push eax
call fcn.0055ca00
add esp, 0xc
mov dword [ebp - 0x810], 0
mov byte [ebp - 0x928], 0
push 0xff
push 0
lea ecx, [ebp - 0x927]
push ecx
call fcn.0055ca00
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x824], edx
mov dword [ebp - 0x820], edx
mov dword [ebp - 0x81c], edx
mov dword [ebp - 0x818], edx
mov eax, 2
mov word [ebp - 0x824], ax
push 0x1f42
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x822], ax
push 0x5bc4c8
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x820], eax
lea ecx, [ebp + 0x28]
mov dword [ebp - 0xa4c], ecx
mov edx, dword [ebp - 0xa4c]
add edx, 1
mov dword [ebp - 0xa50], edx
mov eax, dword [ebp - 0xa4c]
mov cl, byte [eax]
mov byte [ebp - 0xa51], cl
add dword [ebp - 0xa4c], 1
cmp byte [ebp - 0xa51], 0
jne 0x40fb48
mov edx, dword [ebp - 0xa4c]
sub edx, dword [ebp - 0xa50]
mov dword [ebp - 0xa58], edx
jne 0x40fcb8
lea eax, [ebp + 0x9c]
mov dword [ebp - 0xa5c], eax
mov ecx, dword [ebp - 0xa5c]
add ecx, 1
mov dword [ebp - 0xa60], ecx
mov edx, dword [ebp - 0xa5c]
mov al, byte [edx]
mov byte [ebp - 0xa61], al
add dword [ebp - 0xa5c], 1
cmp byte [ebp - 0xa61], 0
jne 0x40fb99
mov ecx, dword [ebp - 0xa5c]
sub ecx, dword [ebp - 0xa60]
mov dword [ebp - 0xa68], ecx
jne 0x40fcb8
lea edx, [ebp + 0x88]
mov dword [ebp - 0xa6c], edx
mov eax, dword [ebp - 0xa6c]
add eax, 1
mov dword [ebp - 0xa70], eax
mov ecx, dword [ebp - 0xa6c]
mov dl, byte [ecx]
mov byte [ebp - 0xa71], dl
add dword [ebp - 0xa6c], 1
cmp byte [ebp - 0xa71], 0
jne 0x40fbea
mov eax, dword [ebp - 0xa6c]
sub eax, dword [ebp - 0xa70]
mov dword [ebp - 0xa78], eax
jne 0x40fcb8
lea ecx, [ebp + 0x48]
mov dword [ebp - 0xa7c], ecx
mov edx, dword [ebp - 0xa7c]
add edx, 1
mov dword [ebp - 0xa80], edx
mov eax, dword [ebp - 0xa7c]
mov cl, byte [eax]
mov byte [ebp - 0xa81], cl
add dword [ebp - 0xa7c], 1
cmp byte [ebp - 0xa81], 0
jne 0x40fc38
mov edx, dword [ebp - 0xa7c]
sub edx, dword [ebp - 0xa80]
mov dword [ebp - 0xa88], edx
jne 0x40fcb8
lea eax, [ebp + 0x68]
mov dword [ebp - 0xa8c], eax
mov ecx, dword [ebp - 0xa8c]
add ecx, 1
mov dword [ebp - 0xa90], ecx
mov edx, dword [ebp - 0xa8c]
mov al, byte [edx]
mov byte [ebp - 0xa91], al
add dword [ebp - 0xa8c], 1
cmp byte [ebp - 0xa91], 0
jne 0x40fc82
mov ecx, dword [ebp - 0xa8c]
sub ecx, dword [ebp - 0xa90]
mov dword [ebp - 0xa98], ecx
je 0x41042e
lea edx, [ebp + 0x28]
mov dword [ebp - 0xa9c], edx
mov eax, dword [ebp - 0xa9c]
add eax, 1
mov dword [ebp - 0xaa0], eax
mov ecx, dword [ebp - 0xa9c]
mov dl, byte [ecx]
mov byte [ebp - 0xaa1], dl
add dword [ebp - 0xa9c], 1
cmp byte [ebp - 0xaa1], 0
jne 0x40fcd0
mov eax, dword [ebp - 0xa9c]
sub eax, dword [ebp - 0xaa0]
mov dword [ebp - 0xaa8], eax
jne 0x40fdeb
lea ecx, [ebp + 0x9c]
mov dword [ebp - 0xaac], ecx
mov edx, dword [ebp - 0xaac]
add edx, 1
mov dword [ebp - 0xab0], edx
mov eax, dword [ebp - 0xaac]
mov cl, byte [eax]
mov byte [ebp - 0xab1], cl
add dword [ebp - 0xaac], 1
cmp byte [ebp - 0xab1], 0
jne 0x40fd21
mov edx, dword [ebp - 0xaac]
sub edx, dword [ebp - 0xab0]
mov dword [ebp - 0xab8], edx
jne 0x40fdeb
lea eax, [ebp + 0x48]
mov dword [ebp - 0xabc], eax
mov ecx, dword [ebp - 0xabc]
add ecx, 1
mov dword [ebp - 0xac0], ecx
mov edx, dword [ebp - 0xabc]
mov al, byte [edx]
mov byte [ebp - 0xac1], al
add dword [ebp - 0xabc], 1
cmp byte [ebp - 0xac1], 0
jne 0x40fd6f
mov ecx, dword [ebp - 0xabc]
sub ecx, dword [ebp - 0xac0]
mov dword [ebp - 0xac8], ecx
jne 0x40fdeb
lea edx, [ebp + 0x68]
mov dword [ebp - 0xacc], edx
mov eax, dword [ebp - 0xacc]
add eax, 1
mov dword [ebp - 0xad0], eax
mov ecx, dword [ebp - 0xacc]
mov dl, byte [ecx]
mov byte [ebp - 0xad1], dl
add dword [ebp - 0xacc], 1
cmp byte [ebp - 0xad1], 0
jne 0x40fdb9
mov eax, dword [ebp - 0xacc]
sub eax, dword [ebp - 0xad0]
mov dword [ebp - 0xad8], eax
je 0x40fe0e
mov ecx, dword [0x5bc2bc]
mov dword [ebp - 0x928], ecx
mov edx, dword [0x5bc2c0]
mov dword [ebp - 0x924], edx
mov eax, dword [0x5bc2c4]
mov dword [ebp - 0x920], eax
lea ecx, [ebp + 0x28]
mov dword [ebp - 0xadc], ecx
mov edx, dword [ebp - 0xadc]
add edx, 1
mov dword [ebp - 0xae0], edx
mov eax, dword [ebp - 0xadc]
mov cl, byte [eax]
mov byte [ebp - 0xae1], cl
add dword [ebp - 0xadc], 1
cmp byte [ebp - 0xae1], 0
jne 0x40fe26
mov edx, dword [ebp - 0xadc]
sub edx, dword [ebp - 0xae0]
mov dword [ebp - 0xae8], edx
je 0x40fec2
lea eax, [ebp - 0x928]
mov dword [ebp - 0xaec], eax
mov ecx, dword [ebp - 0xaec]
add ecx, 1
mov dword [ebp - 0xaf0], ecx
mov edx, dword [ebp - 0xaec]
mov al, byte [edx]
mov byte [ebp - 0xaf1], al
add dword [ebp - 0xaec], 1
cmp byte [ebp - 0xaf1], 0
jne 0x40fe73
mov ecx, dword [ebp - 0xaec]
sub ecx, dword [ebp - 0xaf0]
mov dword [ebp - 0xaf8], ecx
lea edx, [ebp + 0x28]
push edx
push 0x5bc344
mov eax, dword [ebp - 0xaf8]
lea ecx, [ebp + eax - 0x928]
push ecx
call fcn.00556a42
add esp, 0xc
lea edx, [ebp + 0x48]
mov dword [ebp - 0xafc], edx
mov eax, dword [ebp - 0xafc]
add eax, 1
mov dword [ebp - 0xb00], eax
mov ecx, dword [ebp - 0xafc]
mov dl, byte [ecx]
mov byte [ebp - 0xb01], dl
add dword [ebp - 0xafc], 1
cmp byte [ebp - 0xb01], 0
jne 0x40feda
mov eax, dword [ebp - 0xafc]
sub eax, dword [ebp - 0xb00]
mov dword [ebp - 0xb08], eax
je 0x40ff76
lea ecx, [ebp - 0x928]
mov dword [ebp - 0xb0c], ecx
mov edx, dword [ebp - 0xb0c]
add edx, 1
mov dword [ebp - 0xb10], edx
mov eax, dword [ebp - 0xb0c]
mov cl, byte [eax]
mov byte [ebp - 0xb11], cl
add dword [ebp - 0xb0c], 1
cmp byte [ebp - 0xb11], 0
jne 0x40ff27
mov edx, dword [ebp - 0xb0c]
sub edx, dword [ebp - 0xb10]
mov dword [ebp - 0xb18], edx
lea eax, [ebp + 0x48]
push eax
push 0x5bc4d8
mov ecx, dword [ebp - 0xb18]
lea edx, [ebp + ecx - 0x928]
push edx
call fcn.00556a42
add esp, 0xc
lea eax, [ebp + 0x68]
mov dword [ebp - 0xb1c], eax
mov ecx, dword [ebp - 0xb1c]
add ecx, 1
mov dword [ebp - 0xb20], ecx
mov edx, dword [ebp - 0xb1c]
mov al, byte [edx]
mov byte [ebp - 0xb21], al
add dword [ebp - 0xb1c], 1
cmp byte [ebp - 0xb21], 0
jne 0x40ff8e
mov ecx, dword [ebp - 0xb1c]
sub ecx, dword [ebp - 0xb20]
mov dword [ebp - 0xb28], ecx
je 0x41002a
lea edx, [ebp - 0x928]
mov dword [ebp - 0xb2c], edx
mov eax, dword [ebp - 0xb2c]
add eax, 1
mov dword [ebp - 0xb30], eax
mov ecx, dword [ebp - 0xb2c]
mov dl, byte [ecx]
mov byte [ebp - 0xb31], dl
add dword [ebp - 0xb2c], 1
cmp byte [ebp - 0xb31], 0
jne 0x40ffdb
mov eax, dword [ebp - 0xb2c]
sub eax, dword [ebp - 0xb30]
mov dword [ebp - 0xb38], eax
lea ecx, [ebp + 0x68]
push ecx
push 0x5bc4e8
mov edx, dword [ebp - 0xb38]
lea eax, [ebp + edx - 0x928]
push eax
call fcn.00556a42
add esp, 0xc
lea ecx, [ebp + 0x9c]
mov dword [ebp - 0xb3c], ecx
mov edx, dword [ebp - 0xb3c]
add edx, 1
mov dword [ebp - 0xb40], edx
mov eax, dword [ebp - 0xb3c]
mov cl, byte [eax]
mov byte [ebp - 0xb41], cl
add dword [ebp - 0xb3c], 1
cmp byte [ebp - 0xb41], 0
jne 0x410045
mov edx, dword [ebp - 0xb3c]
sub edx, dword [ebp - 0xb40]
mov dword [ebp - 0xb48], edx
je 0x4100e4
lea eax, [ebp - 0x928]
mov dword [ebp - 0xb4c], eax
mov ecx, dword [ebp - 0xb4c]
add ecx, 1
mov dword [ebp - 0xb50], ecx
mov edx, dword [ebp - 0xb4c]
mov al, byte [edx]
mov byte [ebp - 0xb51], al
add dword [ebp - 0xb4c], 1
cmp byte [ebp - 0xb51], 0
jne 0x410092
mov ecx, dword [ebp - 0xb4c]
sub ecx, dword [ebp - 0xb50]
mov dword [ebp - 0xb58], ecx
lea edx, [ebp + 0x9c]
push edx
push 0x5bc3ec
mov eax, dword [ebp - 0xb58]
lea ecx, [ebp + eax - 0x928]
push ecx
call fcn.00556a42
add esp, 0xc
lea edx, [ebp + 0x88]
mov dword [ebp - 0xb5c], edx
mov eax, dword [ebp - 0xb5c]
add eax, 1
mov dword [ebp - 0xb60], eax
mov ecx, dword [ebp - 0xb5c]
mov dl, byte [ecx]
mov byte [ebp - 0xb61], dl
add dword [ebp - 0xb5c], 1
cmp byte [ebp - 0xb61], 0
jne 0x4100ff
mov eax, dword [ebp - 0xb5c]
sub eax, dword [ebp - 0xb60]
mov dword [ebp - 0xb68], eax
je 0x41019e
lea ecx, [ebp - 0x928]
mov dword [ebp - 0xb6c], ecx
mov edx, dword [ebp - 0xb6c]
add edx, 1
mov dword [ebp - 0xb70], edx
mov eax, dword [ebp - 0xb6c]
mov cl, byte [eax]
mov byte [ebp - 0xb71], cl
add dword [ebp - 0xb6c], 1
cmp byte [ebp - 0xb71], 0
jne 0x41014c
mov edx, dword [ebp - 0xb6c]
sub edx, dword [ebp - 0xb70]
mov dword [ebp - 0xb78], edx
lea eax, [ebp + 0x88]
push eax
push 0x5bc4f8
mov ecx, dword [ebp - 0xb78]
lea edx, [ebp + ecx - 0x928]
push edx
call fcn.00556a42
add esp, 0xc
lea eax, [ebp - 0x928]
mov dword [ebp - 0xb7c], eax
mov ecx, dword [ebp - 0xb7c]
add ecx, 1
mov dword [ebp - 0xb80], ecx
mov edx, dword [ebp - 0xb7c]
mov al, byte [edx]
mov byte [ebp - 0xb81], al
add dword [ebp - 0xb7c], 1
cmp byte [ebp - 0xb81], 0
jne 0x4101b9
mov ecx, dword [ebp - 0xb7c]
sub ecx, dword [ebp - 0xb80]
mov dword [ebp - 0xb88], ecx
lea edx, [ebp - 0x928]
push edx
mov eax, dword [ebp - 0xb88]
push eax
lea ecx, [ebp + 0xbc]
push ecx
lea edx, [ebp + 0x15c]
push edx
lea eax, [ebp + 0x13c]
push eax
mov ecx, dword [ebp - 0x810]
push ecx
push str.CMD__HDS_1.0_r_nCSeq:_d_r_nClient_ID:nvmOPxEnYfQRAeLFdsMrpBbnMDbEPiMC_r_nAccept_Type:text_HDP_r_nX_Modify_Type:_soft_r_nAuthorization:Basic__s:_s_r_nDevice_ID:_s_r_nContent_Length:_d_r_n_r_n_s_r_n
push 0x800
lea edx, [ebp - 0x808]
push edx
call fcn.00559374
add esp, 0x24
lea eax, [ebp - 0x808]
mov dword [ebp - 0xb8c], eax
mov ecx, dword [ebp - 0xb8c]
add ecx, 1
mov dword [ebp - 0xb90], ecx
mov edx, dword [ebp - 0xb8c]
mov al, byte [edx]
mov byte [ebp - 0xb91], al
add dword [ebp - 0xb8c], 1
cmp byte [ebp - 0xb91], 0
jne 0x410247
mov ecx, dword [ebp - 0xb8c]
sub ecx, dword [ebp - 0xb90]
mov dword [ebp - 0xb98], ecx
mov edx, dword [ebp - 0xb98]
mov dword [ebp - 0xa34], edx
mov dword [ebp - 0xa30], 0
mov dword [ebp - 0xa3c], 0
mov dword [ebp - 0xa38], 0x14
mov dword [ebp - 0xa40], 0
jmp 0x4102bc
mov eax, dword [ebp - 0xa40]
add eax, 1
mov dword [ebp - 0xa40], eax
mov ecx, dword [ebp - 0xa40]
cmp ecx, dword [ebp - 0xa30]
jae 0x4102e8
mov edx, dword [ebp - 0xa48]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0xa40]
mov edx, dword [ebp + ecx*4 - 0xa2c]
cmp edx, dword [eax]
jne 0x4102e6
jmp 0x4102e8
jmp 0x4102ad
mov eax, dword [ebp - 0xa40]
cmp eax, dword [ebp - 0xa30]
jne 0x410326
cmp dword [ebp - 0xa30], 0x40
jae 0x410326
mov ecx, dword [ebp - 0xa48]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0xa40]
mov ecx, dword [edx]
mov dword [ebp + eax*4 - 0xa2c], ecx
mov edx, dword [ebp - 0xa30]
add edx, 1
mov dword [ebp - 0xa30], edx
xor eax, eax
jne 0x4102a1
lea ecx, [ebp - 0xa3c]
push ecx
push 0
lea edx, [ebp - 0xa30]
push edx
push 0
push 0
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0x814], eax
cmp dword [ebp - 0x814], 0
jne 0x410361
or eax, 0xffffffff
jmp 0x410430
cmp dword [ebp - 0x814], 0xffffffff
jne 0x41037e
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0xa44], eax
or eax, 0xffffffff
jmp 0x410430
lea eax, [ebp - 0xa30]
push eax
mov ecx, dword [ebp - 0xa48]
mov edx, dword [ecx + 4]
mov eax, dword [edx]
push eax
call dword [sym.imp.WSOCK32.dll___WSAFDIsSet]
test eax, eax
je 0x410417
lea ecx, [ebp - 0x808]
mov dword [ebp - 0xb9c], ecx
mov edx, dword [ebp - 0xb9c]
add edx, 1
mov dword [ebp - 0xba0], edx
mov eax, dword [ebp - 0xb9c]
mov cl, byte [eax]
mov byte [ebp - 0xba1], cl
add dword [ebp - 0xb9c], 1
cmp byte [ebp - 0xba1], 0
jne 0x4103b6
mov edx, dword [ebp - 0xb9c]
sub edx, dword [ebp - 0xba0]
mov dword [ebp - 0xba8], edx
push 0x10
lea eax, [ebp - 0x824]
push eax
push 0
mov ecx, dword [ebp - 0xba8]
push ecx
lea edx, [ebp - 0x808]
push edx
mov eax, dword [ebp - 0xa48]
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WSOCK32.dll_sendto]
mov dword [ebp - 0x814], eax
mov eax, dword [ebp - 0x810]
add eax, 1
mov dword [ebp - 0x810], eax
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005562bb
mov esp, ebp
pop ebp
ret 0x174