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

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6a8c63
call fcn.00640244
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 0x5125eb
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.0040f10e
pop ecx
push eax
push esi
lea ecx, [ebp + 0x40]
call fcn.0040ee87
jmp 0x5127a1
cmp esi, 1
je 0x512600
cmp esi, 2
je 0x512600
mov dword [ebp + 0x50], eax
mov byte [ebp + 0x40], al
jmp 0x5127aa
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7e15c8]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x7b961c]
cmp eax, dword [ecx + 4]
jle 0x512655
mov edi, 0x7b961c
push edi
call fcn.006403ab
cmp dword [0x7b961c], 0xffffffff
pop ecx
jne 0x512655
mov ecx, 0x7b95b8
mov byte [ebp - 4], 1
call fcn.004cdc06
push 0x6bbada
call fcn.0064022f
push edi
mov byte [ebp - 4], 0
call fcn.0064036c
pop ecx
pop ecx
lea eax, [ebp - 0x24]
push eax
call fcn.00512c32
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.00511386
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 3
push eax
call fcn.00511517
cmp byte [0x7b3702], 0
mov eax, dword [0x7b37a0]
mov byte [ebp - 4], 4
jne 0x51268f
mov eax, dword [0x7ac508]
push eax
call fcn.00512cdd
push eax
lea ecx, [ebp - 0x38]
call fcn.004cb99d
mov dword [ebp + 0x68], str.ssdp:alive
cmp esi, 1
je 0x5126b1
mov dword [ebp + 0x68], str.ssdp:byebye
push 1
push 0
lea eax, [ebp - 0x80]
push eax
call fcn.0047165a
mov esi, eax
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 5
push eax
call fcn.00494f2e
cmp dword [esi + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x5126d9
mov esi, dword [esi]
cmp dword [ebp + 0x14], 8
mov ecx, dword [ebp]
jae 0x5126e5
lea ecx, [ebp]
cmp dword [ebp + 0x2c], 0x10
mov ebx, dword [ebp + 0x18]
mov dword [ebp + 0x64], ecx
jae 0x5126f4
lea ebx, [ebp + 0x18]
cmp dword [eax + 0x14], 0x10
jb 0x5126fc
mov eax, dword [eax]
cmp dword [ebp - 0x10], 0x10
mov edi, dword [ebp - 0x24]
jae 0x512708
lea edi, [ebp - 0x24]
cmp dword [0x7b9600], 0x10
mov edx, dword [0x7b95ec]
jae 0x51271c
mov edx, 0x7b95ec
cmp dword [0x7b95d0], 0x10
mov ecx, dword [0x7b95bc]
jae 0x512730
mov ecx, 0x7b95bc
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.004654bc
add esp, 0x2c
lea ecx, [ebp + 0x40]
push eax
call fcn.0040eb52
xor ebx, ebx
lea ecx, [ebp - 0x50]
push ebx
push 1
call fcn.0040f52f
push ebx
push 1
lea ecx, [ebp - 0x68]
call fcn.0040f52f
push ebx
push 1
lea ecx, [ebp - 0x80]
call fcn.0040f52f
push ebx
push 1
lea ecx, [ebp + 0x18]
call fcn.0040f52f
push ebx
push 1
lea ecx, [ebp]
call fcn.004281f2
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.0040f52f
mov ebx, dword [ebp + 0x58]
cmp dword [ebp + 0x54], 0x10
mov eax, dword [ebp + 0x40]
jae 0x5127ad
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.0040f52f
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