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
push 0xffffffffffffffff
push 0x58617b
mov eax, dword fs:[0]
push eax
sub esp, 0xc30
mov eax, dword [0x5e8e00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xadc], ecx
mov dword [ebp - 0x898], 0
mov byte [ebp - 0x814], 0
push 0x7ff
push 0
lea eax, [ebp - 0x813]
push eax
call fcn.0055b7e0
add esp, 0xc
mov dword [ebp - 0x89c], 0
mov byte [ebp - 0x9b4], 0
push 0xff
push 0
lea ecx, [ebp - 0x9b3]
push ecx
call fcn.0055b7e0
add esp, 0xc
push 0x5bb784
lea ecx, [ebp - 0x8a0]
call fcn.00403840
mov dword [ebp - 4], 0
xor edx, edx
mov dword [ebp - 0x8b4], edx
mov dword [ebp - 0x8b0], edx
mov dword [ebp - 0x8ac], edx
mov dword [ebp - 0x8a8], edx
mov eax, 2
mov word [ebp - 0x8b4], ax
push 0x1f42
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x8b2], ax
push 0x5bb794
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x8b0], eax
mov byte [ebp - 0x894], 0
push 0x7f
push 0
lea ecx, [ebp - 0x893]
push ecx
call fcn.0055b7e0
add esp, 0xc
lea edx, [ebp - 0x894]
push edx
sub esp, 0x240
mov ecx, 0x90
lea esi, [ebp + 8]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0xadc]
call fcn.00410540
lea eax, [ebp + 0x68]
mov dword [ebp - 0xae0], eax
mov ecx, dword [ebp - 0xae0]
add ecx, 1
mov dword [ebp - 0xae4], ecx
mov edx, dword [ebp - 0xae0]
mov al, byte [edx]
mov byte [ebp - 0xae5], al
add dword [ebp - 0xae0], 1
cmp byte [ebp - 0xae5], 0
jne 0x40fbb7
mov ecx, dword [ebp - 0xae0]
sub ecx, dword [ebp - 0xae4]
mov dword [ebp - 0xaec], ecx
jne 0x40fd2d
lea edx, [ebp + 0xe8]
mov dword [ebp - 0xaf0], edx
mov eax, dword [ebp - 0xaf0]
add eax, 1
mov dword [ebp - 0xaf4], eax
mov ecx, dword [ebp - 0xaf0]
mov dl, byte [ecx]
mov byte [ebp - 0xaf5], dl
add dword [ebp - 0xaf0], 1
cmp byte [ebp - 0xaf5], 0
jne 0x40fc08
mov eax, dword [ebp - 0xaf0]
sub eax, dword [ebp - 0xaf4]
mov dword [ebp - 0xafc], eax
jne 0x40fd2d
lea ecx, [ebp + 0xc8]
mov dword [ebp - 0xb00], ecx
mov edx, dword [ebp - 0xb00]
add edx, 1
mov dword [ebp - 0xb04], edx
mov eax, dword [ebp - 0xb00]
mov cl, byte [eax]
mov byte [ebp - 0xb05], cl
add dword [ebp - 0xb00], 1
cmp byte [ebp - 0xb05], 0
jne 0x40fc59
mov edx, dword [ebp - 0xb00]
sub edx, dword [ebp - 0xb04]
mov dword [ebp - 0xb0c], edx
jne 0x40fd2d
lea eax, [ebp + 0x88]
mov dword [ebp - 0xb10], eax
mov ecx, dword [ebp - 0xb10]
add ecx, 1
mov dword [ebp - 0xb14], ecx
mov edx, dword [ebp - 0xb10]
mov al, byte [edx]
mov byte [ebp - 0xb15], al
add dword [ebp - 0xb10], 1
cmp byte [ebp - 0xb15], 0
jne 0x40fcaa
mov ecx, dword [ebp - 0xb10]
sub ecx, dword [ebp - 0xb14]
mov dword [ebp - 0xb1c], ecx
jne 0x40fd2d
lea edx, [ebp + 0xa8]
mov dword [ebp - 0xb20], edx
mov eax, dword [ebp - 0xb20]
add eax, 1
mov dword [ebp - 0xb24], eax
mov ecx, dword [ebp - 0xb20]
mov dl, byte [ecx]
mov byte [ebp - 0xb25], dl
add dword [ebp - 0xb20], 1
cmp byte [ebp - 0xb25], 0
jne 0x40fcf7
mov eax, dword [ebp - 0xb20]
sub eax, dword [ebp - 0xb24]
mov dword [ebp - 0xb2c], eax
je 0x4104fd
lea ecx, [ebp + 0x68]
mov dword [ebp - 0xb30], ecx
mov edx, dword [ebp - 0xb30]
add edx, 1
mov dword [ebp - 0xb34], edx
mov eax, dword [ebp - 0xb30]
mov cl, byte [eax]
mov byte [ebp - 0xb35], cl
add dword [ebp - 0xb30], 1
cmp byte [ebp - 0xb35], 0
jne 0x40fd45
mov edx, dword [ebp - 0xb30]
sub edx, dword [ebp - 0xb34]
mov dword [ebp - 0xb3c], edx
jne 0x40fe66
lea eax, [ebp + 0xe8]
mov dword [ebp - 0xb40], eax
mov ecx, dword [ebp - 0xb40]
add ecx, 1
mov dword [ebp - 0xb44], ecx
mov edx, dword [ebp - 0xb40]
mov al, byte [edx]
mov byte [ebp - 0xb45], al
add dword [ebp - 0xb40], 1
cmp byte [ebp - 0xb45], 0
jne 0x40fd96
mov ecx, dword [ebp - 0xb40]
sub ecx, dword [ebp - 0xb44]
mov dword [ebp - 0xb4c], ecx
jne 0x40fe66
lea edx, [ebp + 0x88]
mov dword [ebp - 0xb50], edx
mov eax, dword [ebp - 0xb50]
add eax, 1
mov dword [ebp - 0xb54], eax
mov ecx, dword [ebp - 0xb50]
mov dl, byte [ecx]
mov byte [ebp - 0xb55], dl
add dword [ebp - 0xb50], 1
cmp byte [ebp - 0xb55], 0
jne 0x40fde7
mov eax, dword [ebp - 0xb50]
sub eax, dword [ebp - 0xb54]
mov dword [ebp - 0xb5c], eax
jne 0x40fe66
lea ecx, [ebp + 0xa8]
mov dword [ebp - 0xb60], ecx
mov edx, dword [ebp - 0xb60]
add edx, 1
mov dword [ebp - 0xb64], edx
mov eax, dword [ebp - 0xb60]
mov cl, byte [eax]
mov byte [ebp - 0xb65], cl
add dword [ebp - 0xb60], 1
cmp byte [ebp - 0xb65], 0
jne 0x40fe34
mov edx, dword [ebp - 0xb60]
sub edx, dword [ebp - 0xb64]
mov dword [ebp - 0xb6c], edx
je 0x40fe89
mov eax, dword [str.netconf_set]
mov dword [ebp - 0x9b4], eax
mov ecx, dword [0x5bb6d8]
mov dword [ebp - 0x9b0], ecx
mov edx, dword [0x5bb6dc]
mov dword [ebp - 0x9ac], edx
lea eax, [ebp + 0x68]
mov dword [ebp - 0xb70], eax
mov ecx, dword [ebp - 0xb70]
add ecx, 1
mov dword [ebp - 0xb74], ecx
mov edx, dword [ebp - 0xb70]
mov al, byte [edx]
mov byte [ebp - 0xb75], al
add dword [ebp - 0xb70], 1
cmp byte [ebp - 0xb75], 0
jne 0x40fea1
mov ecx, dword [ebp - 0xb70]
sub ecx, dword [ebp - 0xb74]
mov dword [ebp - 0xb7c], ecx
je 0x40ff3d
lea edx, [ebp - 0x9b4]
mov dword [ebp - 0xb80], edx
mov eax, dword [ebp - 0xb80]
add eax, 1
mov dword [ebp - 0xb84], eax
mov ecx, dword [ebp - 0xb80]
mov dl, byte [ecx]
mov byte [ebp - 0xb85], dl
add dword [ebp - 0xb80], 1
cmp byte [ebp - 0xb85], 0
jne 0x40feee
mov eax, dword [ebp - 0xb80]
sub eax, dword [ebp - 0xb84]
mov dword [ebp - 0xb8c], eax
lea ecx, [ebp + 0x68]
push ecx
push str.__ipaddr__s
mov edx, dword [ebp - 0xb8c]
lea eax, [ebp + edx - 0x9b4]
push eax
call fcn.00555824
add esp, 0xc
lea ecx, [ebp + 0x88]
mov dword [ebp - 0xb90], ecx
mov edx, dword [ebp - 0xb90]
add edx, 1
mov dword [ebp - 0xb94], edx
mov eax, dword [ebp - 0xb90]
mov cl, byte [eax]
mov byte [ebp - 0xb95], cl
add dword [ebp - 0xb90], 1
cmp byte [ebp - 0xb95], 0
jne 0x40ff58
mov edx, dword [ebp - 0xb90]
sub edx, dword [ebp - 0xb94]
mov dword [ebp - 0xb9c], edx
je 0x40fff7
lea eax, [ebp - 0x9b4]
mov dword [ebp - 0xba0], eax
mov ecx, dword [ebp - 0xba0]
add ecx, 1
mov dword [ebp - 0xba4], ecx
mov edx, dword [ebp - 0xba0]
mov al, byte [edx]
mov byte [ebp - 0xba5], al
add dword [ebp - 0xba0], 1
cmp byte [ebp - 0xba5], 0
jne 0x40ffa5
mov ecx, dword [ebp - 0xba0]
sub ecx, dword [ebp - 0xba4]
mov dword [ebp - 0xbac], ecx
lea edx, [ebp + 0x88]
push edx
push str.__netmask__s
mov eax, dword [ebp - 0xbac]
lea ecx, [ebp + eax - 0x9b4]
push ecx
call fcn.00555824
add esp, 0xc
lea edx, [ebp + 0xa8]
mov dword [ebp - 0xbb0], edx
mov eax, dword [ebp - 0xbb0]
add eax, 1
mov dword [ebp - 0xbb4], eax
mov ecx, dword [ebp - 0xbb0]
mov dl, byte [ecx]
mov byte [ebp - 0xbb5], dl
add dword [ebp - 0xbb0], 1
cmp byte [ebp - 0xbb5], 0
jne 0x410012
mov eax, dword [ebp - 0xbb0]
sub eax, dword [ebp - 0xbb4]
mov dword [ebp - 0xbbc], eax
je 0x4100b1
lea ecx, [ebp - 0x9b4]
mov dword [ebp - 0xbc0], ecx
mov edx, dword [ebp - 0xbc0]
add edx, 1
mov dword [ebp - 0xbc4], edx
mov eax, dword [ebp - 0xbc0]
mov cl, byte [eax]
mov byte [ebp - 0xbc5], cl
add dword [ebp - 0xbc0], 1
cmp byte [ebp - 0xbc5], 0
jne 0x41005f
mov edx, dword [ebp - 0xbc0]
sub edx, dword [ebp - 0xbc4]
mov dword [ebp - 0xbcc], edx
lea eax, [ebp + 0xa8]
push eax
push str.__gateway__s
mov ecx, dword [ebp - 0xbcc]
lea edx, [ebp + ecx - 0x9b4]
push edx
call fcn.00555824
add esp, 0xc
lea eax, [ebp + 0xe8]
mov dword [ebp - 0xbd0], eax
mov ecx, dword [ebp - 0xbd0]
add ecx, 1
mov dword [ebp - 0xbd4], ecx
mov edx, dword [ebp - 0xbd0]
mov al, byte [edx]
mov byte [ebp - 0xbd5], al
add dword [ebp - 0xbd0], 1
cmp byte [ebp - 0xbd5], 0
jne 0x4100cc
mov ecx, dword [ebp - 0xbd0]
sub ecx, dword [ebp - 0xbd4]
mov dword [ebp - 0xbdc], ecx
je 0x41016b
lea edx, [ebp - 0x9b4]
mov dword [ebp - 0xbe0], edx
mov eax, dword [ebp - 0xbe0]
add eax, 1
mov dword [ebp - 0xbe4], eax
mov ecx, dword [ebp - 0xbe0]
mov dl, byte [ecx]
mov byte [ebp - 0xbe5], dl
add dword [ebp - 0xbe0], 1
cmp byte [ebp - 0xbe5], 0
jne 0x410119
mov eax, dword [ebp - 0xbe0]
sub eax, dword [ebp - 0xbe4]
mov dword [ebp - 0xbec], eax
lea ecx, [ebp + 0xe8]
push ecx
push str.__hwaddr__s
mov edx, dword [ebp - 0xbec]
lea eax, [ebp + edx - 0x9b4]
push eax
call fcn.00555824
add esp, 0xc
lea ecx, [ebp + 0xc8]
mov dword [ebp - 0xbf0], ecx
mov edx, dword [ebp - 0xbf0]
add edx, 1
mov dword [ebp - 0xbf4], edx
mov eax, dword [ebp - 0xbf0]
mov cl, byte [eax]
mov byte [ebp - 0xbf5], cl
add dword [ebp - 0xbf0], 1
cmp byte [ebp - 0xbf5], 0
jne 0x410186
mov edx, dword [ebp - 0xbf0]
sub edx, dword [ebp - 0xbf4]
mov dword [ebp - 0xbfc], edx
je 0x410225
lea eax, [ebp - 0x9b4]
mov dword [ebp - 0xc00], eax
mov ecx, dword [ebp - 0xc00]
add ecx, 1
mov dword [ebp - 0xc04], ecx
mov edx, dword [ebp - 0xc00]
mov al, byte [edx]
mov byte [ebp - 0xc05], al
add dword [ebp - 0xc00], 1
cmp byte [ebp - 0xc05], 0
jne 0x4101d3
mov ecx, dword [ebp - 0xc00]
sub ecx, dword [ebp - 0xc04]
mov dword [ebp - 0xc0c], ecx
lea edx, [ebp + 0xc8]
push edx
push str._r_nhttpport_set__httpport__s
mov eax, dword [ebp - 0xc0c]
lea ecx, [ebp + eax - 0x9b4]
push ecx
call fcn.00555824
add esp, 0xc
lea edx, [ebp - 0x9b4]
mov dword [ebp - 0xc10], edx
mov eax, dword [ebp - 0xc10]
add eax, 1
mov dword [ebp - 0xc14], eax
mov ecx, dword [ebp - 0xc10]
mov dl, byte [ecx]
mov byte [ebp - 0xc15], dl
add dword [ebp - 0xc10], 1
cmp byte [ebp - 0xc15], 0
jne 0x410240
mov eax, dword [ebp - 0xc10]
sub eax, dword [ebp - 0xc14]
mov dword [ebp - 0xc1c], eax
lea ecx, [ebp - 0x9b4]
push ecx
mov edx, dword [ebp - 0xc1c]
push edx
lea eax, [ebp + 0x108]
push eax
lea ecx, [ebp - 0x894]
push ecx
lea edx, [ebp + 0x188]
push edx
mov eax, dword [ebp - 0x8a0]
push eax
lea ecx, [ebp + 0x28]
push ecx
lea edx, [ebp + 0x1c8]
push edx
lea eax, [ebp + 0x68]
push eax
mov ecx, dword [ebp - 0x89c]
push ecx
push str.CMD__HDS_1.0_r_nCSeq:_d_r_nClient_ID:nvmOPxEnYfQRAeLFdsMrpBbnMDbEPiMC_r_nAccept_Type:text_HDP_r_nVirtual_IP:_s_r_nAuthorization:Digest_username__s__realm__s__uri__s__nonce__s__response__s__algorithm_MD5__r_nDevice_ID:_s_r_nContent_Length:_d_r_n_r_n_s_r_n
push 0x800
lea edx, [ebp - 0x814]
push edx
call fcn.00558154
add esp, 0x34
lea eax, [ebp - 0x814]
mov dword [ebp - 0xc20], eax
mov ecx, dword [ebp - 0xc20]
add ecx, 1
mov dword [ebp - 0xc24], ecx
mov edx, dword [ebp - 0xc20]
mov al, byte [edx]
mov byte [ebp - 0xc25], al
add dword [ebp - 0xc20], 1
cmp byte [ebp - 0xc25], 0
jne 0x4102e4
mov ecx, dword [ebp - 0xc20]
sub ecx, dword [ebp - 0xc24]
mov dword [ebp - 0xc2c], ecx
mov edx, dword [ebp - 0xc2c]
mov dword [ebp - 0xac0], edx
mov dword [ebp - 0xabc], 0
mov dword [ebp - 0xac8], 0
mov dword [ebp - 0xac4], 0x14
mov dword [ebp - 0xacc], 0
jmp 0x410359
mov eax, dword [ebp - 0xacc]
add eax, 1
mov dword [ebp - 0xacc], eax
mov ecx, dword [ebp - 0xacc]
cmp ecx, dword [ebp - 0xabc]
jae 0x410385
mov edx, dword [ebp - 0xadc]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0xacc]
mov edx, dword [ebp + ecx*4 - 0xab8]
cmp edx, dword [eax]
jne 0x410383
jmp 0x410385
jmp 0x41034a
mov eax, dword [ebp - 0xacc]
cmp eax, dword [ebp - 0xabc]
jne 0x4103c3
cmp dword [ebp - 0xabc], 0x40
jae 0x4103c3
mov ecx, dword [ebp - 0xadc]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0xacc]
mov ecx, dword [edx]
mov dword [ebp + eax*4 - 0xab8], ecx
mov edx, dword [ebp - 0xabc]
add edx, 1
mov dword [ebp - 0xabc], edx
xor eax, eax
jne 0x41033e
lea ecx, [ebp - 0xac8]
push ecx
push 0
lea edx, [ebp - 0xabc]
push edx
push 0
push 0
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0x8a4], eax
cmp dword [ebp - 0x8a4], 0
jne 0x41041d
mov dword [ebp - 0xad0], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8a0]
call fcn.00401a00
mov eax, dword [ebp - 0xad0]
jmp 0x41051f
cmp dword [ebp - 0x8a4], 0xffffffff
jne 0x41044d
mov dword [ebp - 0xad4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8a0]
call fcn.00401a00
mov eax, dword [ebp - 0xad4]
jmp 0x41051f
lea eax, [ebp - 0xabc]
push eax
mov ecx, dword [ebp - 0xadc]
mov edx, dword [ecx + 4]
mov eax, dword [edx]
push eax
call dword [sym.imp.WSOCK32.dll___WSAFDIsSet]
test eax, eax
je 0x4104e6
lea ecx, [ebp - 0x814]
mov dword [ebp - 0xc30], ecx
mov edx, dword [ebp - 0xc30]
add edx, 1
mov dword [ebp - 0xc34], edx
mov eax, dword [ebp - 0xc30]
mov cl, byte [eax]
mov byte [ebp - 0xc35], cl
add dword [ebp - 0xc30], 1
cmp byte [ebp - 0xc35], 0
jne 0x410485
mov edx, dword [ebp - 0xc30]
sub edx, dword [ebp - 0xc34]
mov dword [ebp - 0xc3c], edx
push 0x10
lea eax, [ebp - 0x8b4]
push eax
push 0
mov ecx, dword [ebp - 0xc3c]
push ecx
lea edx, [ebp - 0x814]
push edx
mov eax, dword [ebp - 0xadc]
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WSOCK32.dll_sendto]
mov dword [ebp - 0x8a4], eax
mov eax, dword [ebp - 0x89c]
add eax, 1
mov dword [ebp - 0x89c], eax
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0xad8], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8a0]
call fcn.00401a00
mov eax, dword [ebp - 0xad8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055509d
mov esp, ebp
pop ebp
ret 0x240