Function at 0x510067
Capabilities:
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6b7685
call fcn.00651da4
sub esp, 0x74
push ebx
push esi
push edi
xor eax, eax
lea edi, [ebp + 0x30]
stosd dword es:[edi], eax
mov ebx, ecx
push 2
mov dword [ebp + 0x58], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
pop eax
push dword [ebp + 0x64]
mov word [ebp + 0x30], ax
mov eax, 0x6c07
mov word [ebp + 0x32], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp + 0x34], eax
xor eax, eax
mov dword [ebp + 0x54], 0xf
mov dword [ebp + 0x50], eax
mov byte [ebp + 0x40], al
mov esi, dword [ebp + 0x68]
mov dword [ebp - 4], eax
test esi, esi
jne 0x5100d9
mov esi, str.M_SEARCH__HTTP_1.1_r_nHOST:_239.255.255.250:1900_r_nST:upnp:rootdevice_r_nMAN:_ssdp:discover__r_nMX:3_r_n_r_n
push esi
call fcn.0040f6ae
pop ecx
push eax
push esi
lea ecx, [ebp + 0x40]
call fcn.0040f427
jmp 0x51028f
cmp esi, 1
je 0x5100ee
cmp esi, 2
je 0x5100ee
mov dword [ebp + 0x50], eax
mov byte [ebp + 0x40], al
jmp 0x510298
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7f8ad8]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x7cec6c]
cmp eax, dword [ecx + 4]
jle 0x510143
mov edi, 0x7cec6c
push edi
call fcn.00651f0b
cmp dword [0x7cec6c], 0xffffffff
pop ecx
jne 0x510143
mov ecx, 0x7cec08
mov byte [ebp - 4], 1
call fcn.004ca926
push 0x6cc075
call fcn.00651d8e
push edi
mov byte [ebp - 4], 0
call fcn.00651ecc
pop ecx
pop ecx
lea eax, [ebp - 0x24]
push eax
call fcn.00510720
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.0050ed46
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 3
push eax
call fcn.0050eed7
cmp byte [0x7c8d12], 0
mov eax, dword [0x7c8db0]
mov byte [ebp - 4], 4
jne 0x51017d
mov eax, dword [0x7c1af0]
push eax
call fcn.005107cb
push eax
lea ecx, [ebp - 0x38]
call fcn.004c86e3
mov dword [ebp + 0x68], str.ssdp:alive
cmp esi, 1
je 0x51019f
mov dword [ebp + 0x68], str.ssdp:byebye
push 1
push 0
lea eax, [ebp - 0x80]
push eax
call fcn.0046e4c6
mov esi, eax
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 5
push eax
call fcn.00491679
cmp dword [esi + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x5101c7
mov esi, dword [esi]
cmp dword [ebp + 0x14], 8
mov ecx, dword [ebp]
jae 0x5101d3
lea ecx, [ebp]
cmp dword [ebp + 0x2c], 0x10
mov ebx, dword [ebp + 0x18]
mov dword [ebp + 0x64], ecx
jae 0x5101e2
lea ebx, [ebp + 0x18]
cmp dword [eax + 0x14], 0x10
jb 0x5101ea
mov eax, dword [eax]
cmp dword [ebp - 0x10], 0x10
mov edi, dword [ebp - 0x24]
jae 0x5101f6
lea edi, [ebp - 0x24]
cmp dword [0x7cec50], 0x10
mov edx, dword [0x7cec3c]
jae 0x51020a
mov edx, 0x7cec3c
cmp dword [0x7cec20], 0x10
mov ecx, dword [0x7cec0c]
jae 0x51021e
mov ecx, 0x7cec0c
push esi
push dword [ebp + 0x64]
push ebx
push dword [ebp + 0x68]
push eax
push edi
push edx
push ecx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x50]
push str.NOTIFY__HTTP_1.1_r_nHOST:_239.255.255.250:1900_r_nLOCATION:_http:___A_r_nSERVER:__s__s_UPnP_1.1__s__s_r_nNTS:__s_r_nST:_ut:client:service:pairing_r_nUSN:_uuid:_s_r_nFRIENDLYNAME:_S_r_nHH:_s_r_n_r_n
push eax
call fcn.00461fef
add esp, 0x2c
lea ecx, [ebp + 0x40]
push eax
call fcn.0040f0f2
xor ebx, ebx
lea ecx, [ebp - 0x50]
push ebx
push 1
call fcn.0040facf
push ebx
push 1
lea ecx, [ebp - 0x68]
call fcn.0040facf
push ebx
push 1
lea ecx, [ebp - 0x80]
call fcn.0040facf
push ebx
push 1
lea ecx, [ebp + 0x18]
call fcn.0040facf
push ebx
push 1
lea ecx, [ebp]
call fcn.004284eb
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.0040facf
mov ebx, dword [ebp + 0x58]
cmp dword [ebp + 0x54], 0x10
mov eax, dword [ebp + 0x40]
jae 0x51029b
lea eax, [ebp + 0x40]
push 0x10
lea ecx, [ebp + 0x30]
push ecx
push 0
push dword [ebp + 0x50]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
lea ecx, [ebp + 0x40]
push 0
push 1
setg bl
call fcn.0040facf
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x5c]
pop ebp
ret 8