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

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x679be3
call fcn.0062921c
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 0x506af7
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.0040a79e
pop ecx
push eax
push esi
lea ecx, [ebp + 0x40]
call fcn.0040a517
jmp 0x506cab
cmp esi, 1
je 0x506b0c
cmp esi, 2
je 0x506b0c
mov dword [ebp + 0x50], eax
mov byte [ebp + 0x40], al
jmp 0x506cb4
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7a0690]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x779804]
cmp eax, dword [ecx + 4]
jle 0x506b61
mov edi, 0x779804
push edi
call fcn.006296ef
cmp dword [0x779804], 0xffffffff
pop ecx
jne 0x506b61
mov ecx, 0x7797a0
mov byte [ebp - 4], 1
call fcn.004c61ab
push 0x68a41d
call fcn.006295a6
push edi
mov byte [ebp - 4], 0
call fcn.006296b0
pop ecx
pop ecx
lea eax, [ebp - 0x24]
push eax
call fcn.0050713c
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.00505788
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 3
push eax
call fcn.00505919
cmp byte [0x77395a], 0
mov eax, dword [0x7739f8]
mov byte [ebp - 4], 4
jne 0x506b9b
mov eax, dword [0x76c880]
push eax
call fcn.005071e7
push eax
lea ecx, [ebp - 0x38]
call fcn.004c3ec7
mov dword [ebp + 0x68], str.ssdp:alive
cmp esi, 1
je 0x506bbd
mov dword [ebp + 0x68], str.ssdp:byebye
push 0
lea eax, [ebp - 0x80]
push eax
call fcn.0046c363
mov esi, eax
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 5
push eax
call fcn.0048e95c
cmp dword [esi + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x506be3
mov esi, dword [esi]
cmp dword [ebp + 0x14], 8
mov ecx, dword [ebp]
jae 0x506bef
lea ecx, [ebp]
cmp dword [ebp + 0x2c], 0x10
mov ebx, dword [ebp + 0x18]
mov dword [ebp + 0x64], ecx
jae 0x506bfe
lea ebx, [ebp + 0x18]
cmp dword [eax + 0x14], 0x10
jb 0x506c06
mov eax, dword [eax]
cmp dword [ebp - 0x10], 0x10
mov edi, dword [ebp - 0x24]
jae 0x506c12
lea edi, [ebp - 0x24]
cmp dword [0x7797e8], 0x10
mov edx, dword [0x7797d4]
jae 0x506c26
mov edx, 0x7797d4
cmp dword [0x7797b8], 0x10
mov ecx, dword [0x7797a4]
jae 0x506c3a
mov ecx, 0x7797a4
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.004607cf
add esp, 0x2c
lea ecx, [ebp + 0x40]
push eax
call fcn.0040a1e2
xor ebx, ebx
lea ecx, [ebp - 0x50]
push ebx
push 1
call fcn.0040abbf
push ebx
push 1
lea ecx, [ebp - 0x68]
call fcn.0040abbf
push ebx
push 1
lea ecx, [ebp - 0x80]
call fcn.0040abbf
push ebx
push 1
lea ecx, [ebp + 0x18]
call fcn.0040abbf
push ebx
push 1
lea ecx, [ebp]
call fcn.0042386b
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.0040abbf
mov ebx, dword [ebp + 0x58]
cmp dword [ebp + 0x54], 0x10
mov eax, dword [ebp + 0x40]
jae 0x506cb7
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.0040abbf
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