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

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6b396f
call fcn.00664608
sub esp, 0x74
and dword [ebp + 0x38], 0
and dword [ebp + 0x3c], 0
push ebx
push esi
push 2
pop eax
push dword [ebp + 0x64]
mov word [ebp + 0x30], ax
mov ebx, ecx
mov eax, 0x6c07
mov dword [ebp + 0x40], ebx
mov word [ebp + 0x32], ax
call dword [sym.imp.WS2_32.dll_htonl]
xor edx, edx
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x44], edx
mov dword [ebp + 0x54], edx
mov dword [ebp + 0x58], 0xf
mov byte [ebp + 0x44], dl
mov esi, dword [ebp + 0x68]
mov dword [ebp - 4], edx
test esi, esi
jne 0x506c3e
push 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
mov byte [ebp + 0x64], dl
lea ecx, [ebp + 0x44]
push dword [ebp + 0x64]
push 0x62
call fcn.0041039b
jmp 0x506dbb
cmp esi, 1
je 0x506c53
cmp esi, 2
je 0x506c53
mov dword [ebp + 0x54], edx
mov byte [ebp + 0x44], dl
jmp 0x506dbd
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7ec658]
push edi
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x7c3004]
cmp eax, dword [ecx + 4]
jg 0x506e2c
lea eax, [ebp - 0x24]
push eax
call fcn.00507315
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.00505aa1
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 3
push eax
call fcn.00505c1e
cmp byte [0x7bd10a], 0
mov eax, dword [0x7bd1a8]
mov byte [ebp - 4], 4
jne 0x506cae
mov eax, dword [0x7b5eac]
push eax
call fcn.005073d1
push eax
lea ecx, [ebp - 0x38]
call fcn.004bfece
mov dword [ebp + 0x68], str.ssdp:alive
cmp esi, 1
je 0x506cd0
mov dword [ebp + 0x68], str.ssdp:byebye
push 1
push 0
lea eax, [ebp - 0x80]
push eax
call fcn.00464561
mov esi, eax
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 5
push eax
call fcn.004887f2
cmp dword [esi + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x506cf8
mov esi, dword [esi]
cmp dword [ebp + 0x14], 8
lea ebx, [ebp]
jb 0x506d04
mov ebx, dword [ebp]
cmp dword [ebp + 0x2c], 0x10
lea ecx, [ebp + 0x18]
mov dword [ebp + 0x64], ecx
jb 0x506d16
mov ecx, dword [ebp + 0x18]
mov dword [ebp + 0x64], ecx
cmp dword [eax + 0x14], 0x10
jb 0x506d1e
mov eax, dword [eax]
cmp dword [ebp - 0x10], 0x10
lea edi, [ebp - 0x24]
jb 0x506d2a
mov edi, dword [ebp - 0x24]
cmp dword [0x7c2fe8], 0x10
mov edx, 0x7c2fd4
jb 0x506d3e
mov edx, dword [0x7c2fd4]
cmp dword [0x7c2fb8], 0x10
mov ecx, 0x7c2fa4
jb 0x506d52
mov ecx, dword [0x7c2fa4]
push esi
push ebx
push dword [ebp + 0x64]
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.004577d4
add esp, 0x2c
lea ecx, [ebp + 0x44]
pop edi
cmp ecx, eax
je 0x506d88
mov byte [ebp + 0x64], 0
push dword [ebp + 0x64]
push eax
call fcn.004100a8
lea ecx, [ebp - 0x50]
call fcn.00410858
lea ecx, [ebp - 0x68]
call fcn.00410858
lea ecx, [ebp - 0x80]
call fcn.00410858
lea ecx, [ebp + 0x18]
call fcn.00410858
lea ecx, [ebp]
call fcn.00427afc
lea ecx, [ebp - 0x24]
call fcn.00410858
mov ebx, dword [ebp + 0x40]
xor edx, edx
cmp dword [ebp + 0x58], 0x10
lea eax, [ebp + 0x44]
jb 0x506dc9
mov eax, dword [ebp + 0x44]
push 0x10
lea ecx, [ebp + 0x30]
push ecx
push edx
push dword [ebp + 0x54]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
mov eax, dword [ebp + 0x58]
setg bl
cmp eax, 0x10
jb 0x506e17
mov ecx, dword [ebp + 0x44]
inc eax
mov dword [ebp + 0x64], eax
mov dword [ebp + 0x68], ecx
cmp eax, 0x1000
jb 0x506e0e
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x68]
push eax
call fcn.004279ae
mov eax, dword [ebp + 0x64]
mov ecx, dword [ebp + 0x68]
push eax
push ecx
call fcn.006643a9
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
mov al, bl
pop esi
pop ebx
mov dword fs:[0], ecx
add ebp, 0x5c
leave
ret 8
mov edi, 0x7c3004
push edi
call fcn.00664835
cmp dword [0x7c3004], 0xffffffff
pop ecx
jne 0x506c74
mov ecx, 0x7c2fa0
mov byte [ebp - 4], 1
call fcn.004c218b
push 0x6c8f13
call fcn.006645f3
push edi
mov byte [ebp - 4], 0
call fcn.006647eb
pop ecx
pop ecx
jmp 0x506c74