Function at 0x5127f1
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Send http request

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x6a8ccd
call fcn.00640244
sub esp, 0x8cc
cmp byte [0x7b3702], 0
mov eax, dword [0x7b37a0]
push ebx
push esi
push edi
push 0x10
pop edi
mov dword [ebp + 0x5c], ecx
mov dword [ebp + 0x58], edi
jne 0x512824
mov eax, dword [0x7ac508]
push eax
call fcn.00512cdd
push eax
lea ecx, [ebp - 0x50]
call fcn.004cb99d
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7e15c8]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x7b9684]
cmp eax, dword [ecx + 4]
jle 0x512888
mov esi, 0x7b9684
push esi
call fcn.006403ab
cmp dword [0x7b9684], 0xffffffff
pop ecx
jne 0x512888
and dword [ebp - 4], 0
mov ecx, 0x7b9620
call fcn.004cdc06
push 0x6bbad0
call fcn.0064022f
or dword [ebp - 4], 0xffffffff
push esi
call fcn.0064036c
pop ecx
pop ecx
lea eax, [ebp - 0x3c]
push eax
call fcn.00511386
xor ebx, ebx
lea eax, [ebp - 0x24]
inc ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00512c32
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.00511517
push ebx
push 0
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 3
push eax
call fcn.0047165a
mov esi, eax
lea eax, [ebp - 0x90]
mov byte [ebp - 4], 4
push eax
call fcn.00494f2e
mov byte [ebp - 4], 5
cmp dword [esi + 0x14], edi
jb 0x5128dd
mov esi, dword [esi]
cmp dword [ebp - 0x28], 8
mov ecx, dword [ebp - 0x3c]
jae 0x5128e9
lea ecx, [ebp - 0x3c]
mov ebx, dword [ebp]
mov dword [ebp + 0x60], ecx
cmp dword [ebp + 0x14], edi
jae 0x5128f7
lea ebx, [ebp]
cmp dword [eax + 0x14], edi
jb 0x5128fe
mov eax, dword [eax]
cmp dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x24]
jae 0x512909
lea edi, [ebp - 0x24]
cmp dword [0x7b9668], 0x10
mov edx, dword [0x7b9654]
jae 0x51291d
mov edx, 0x7b9654
cmp dword [0x7b9638], 0x10
mov ecx, dword [0x7b9624]
jae 0x512931
mov ecx, 0x7b9624
push esi
push dword [ebp + 0x60]
push ebx
push eax
push edi
push edx
push ecx
lea eax, [ebp - 0x50]
push eax
push 0x4b0
push dword [0x78bbe8]
lea eax, [ebp + 0x28]
push eax
call fcn.004654bc
add esp, 0x2c
push 0
push 1
lea ecx, [ebp - 0x90]
call fcn.0040f52f
push 0
push 1
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 8
call fcn.0040f52f
mov ebx, dword [ebp + 0x5c]
mov dword [ebp + 0x60], 0xa
xor eax, eax
lea edi, [ebp + 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp + 0x18]
push eax
push 0
push 0x7ff
lea eax, [ebp - 0x8d8]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov esi, eax
lea ecx, [ebp - 0x64]
lea eax, [ebp + 0x18]
push eax
call fcn.004cb949
test esi, esi
jns 0x5129ef
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push str.recvfrom_ERROR:__d
push 1
call fcn.00512ceb
add esp, 0xc
cmp esi, 0x2738
je 0x512be1
cmp esi, 0x2746
jne 0x512bf0
jmp 0x512be1
lea eax, [ebp - 0x8d8]
mov byte [ebp + esi - 0x8d8], 0
push eax
push dword [ebx]
lea eax, [ebp - 0x64]
push eax
push str.DEBUG:_UPnP:_Received_UPnP_packet__from__A___socket__p_:_n_s
push 0
call fcn.00512ceb
add esp, 0x14
lea eax, [ebp - 0x8d8]
push str.M_SEARCH
push eax
call fcn.0047db9b
test al, al
je 0x512b8f
xor ebx, ebx
lea edi, [ebp - 0x8d8]
push edi
mov esi, edi
call fcn.0047daf0
push 0x6e5138
push esi
mov edi, eax
call fcn.0047db9b
test al, al
jne 0x512a53
test edi, edi
jne 0x512a34
jmp 0x512a5e
add esi, 2
inc esi
cmp byte [esi], 0x20
je 0x512a56
mov ebx, esi
lea eax, [ebp - 0xd8]
push eax
call fcn.0047d0a0
mov esi, eax
push ebx
lea eax, [ebp - 0xc0]
mov byte [ebp - 4], 9
push eax
call fcn.004666a7
push esi
push eax
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 0xa
push eax
call fcn.0047d045
xor ebx, ebx
lea ecx, [ebp - 0xc0]
push ebx
push 1
call fcn.0040f52f
push ebx
push 1
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 0xd
call fcn.0040f52f
mov eax, dword [ebp + 0x40]
push 0x10
pop edi
cmp dword [ebp + 0x54], edi
jae 0x512abc
lea eax, [ebp + 0x40]
push str.ut:client:service:pairing
push eax
call fcn.0047db9b
test al, al
jne 0x512b04
mov eax, dword [ebp + 0x40]
cmp dword [ebp + 0x54], edi
jae 0x512ad6
lea eax, [ebp + 0x40]
push str.ssdp:all
push eax
call fcn.0047db9b
test al, al
jne 0x512b04
mov eax, dword [ebp + 0x40]
cmp dword [ebp + 0x54], edi
jae 0x512af0
lea eax, [ebp + 0x40]
push eax
push str.DEBUG:_UPnP:_Not_replying_to_Service_Type___S_
push ebx
call fcn.00512e99
mov ebx, dword [ebp + 0x5c]
add esp, 0xc
jmp 0x512b7d
push str.DEBUG:_UPnP:_Got_an_m_search_event
push ebx
call fcn.00512ceb
mov eax, dword [ebp + 0x28]
pop ecx
pop ecx
cmp dword [ebp + 0x3c], edi
jae 0x512b1c
lea eax, [ebp + 0x28]
push edi
lea ecx, [ebp + 0x18]
push ecx
push ebx
push dword [ebp + 0x38]
mov ebx, dword [ebp + 0x5c]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_sendto]
mov esi, eax
lea ecx, [ebp - 0x78]
lea eax, [ebp + 0x18]
push eax
call fcn.004cb949
mov ecx, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], edi
jae 0x512b4a
lea ecx, [ebp + 0x28]
push ecx
push dword [ebx]
lea eax, [ebp - 0x78]
push eax
push str.SENDING_RESPONSE__to__A___socket__p_:_n_s
push 0
call fcn.00512ceb
add esp, 0x14
cmp esi, dword [ebp + 0x38]
je 0x512b7d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebx]
push str.DEBUG:_UPnP:_Send_error__socket__p_:__d
push 0
call fcn.00512e99
add esp, 0x10
push 0
push 1
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 8
call fcn.0040f52f
jmp 0x512be1
push str.DEBUG:_UPnP:_Got_a_reply_notify_event
push 0
call fcn.00512ceb
pop ecx
pop ecx
lea edi, [ebp - 0x8d8]
push edi
mov esi, edi
call fcn.0047daf0
push str.location:
push esi
mov edi, eax
call fcn.0047db9b
test al, al
jne 0x512bc2
test edi, edi
jne 0x512ba3
jmp 0x512be1
add esi, 8
inc esi
cmp byte [esi], 0x20
je 0x512bc5
push esi
push str.UPnP:_Found_location_from_upnp_notify:__s_n
push 0
call fcn.00512ceb
add esp, 0xc
push esi
call fcn.00511450
mov eax, dword [ebp + 0x60]
dec eax
mov dword [ebp + 0x60], eax
test eax, eax
jg 0x512981
xor ebx, ebx
lea ecx, [ebp + 0x28]
push ebx
push 1
call fcn.0040f52f
push ebx
push 1
lea ecx, [ebp]
call fcn.0040f52f
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.0040f52f
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.004281f2
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x64]
pop ebp
ret 4