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

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x69fc43
call fcn.006375a8
sub esp, 0x8cc
cmp byte [0x7a6382], 0
mov eax, dword [0x7a6420]
push ebx
push esi
push edi
push 0x10
pop edi
mov dword [ebp + 0x5c], ecx
mov dword [ebp + 0x58], edi
jne 0x50fa33
mov eax, dword [0x79f1e8]
push eax
call fcn.0050feec
push eax
lea ecx, [ebp - 0x50]
call fcn.004c870d
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7d3240]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x7ac33c]
cmp eax, dword [ecx + 4]
jle 0x50fa97
mov esi, 0x7ac33c
push esi
call fcn.0063772c
cmp dword [0x7ac33c], 0xffffffff
pop ecx
jne 0x50fa97
and dword [ebp - 4], 0
mov ecx, 0x7ac2d8
call fcn.004ca9ce
push 0x6b1df1
call fcn.00637590
or dword [ebp - 4], 0xffffffff
push esi
call fcn.006376ed
pop ecx
pop ecx
lea eax, [ebp - 0x3c]
push eax
call fcn.0050e469
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 1
push eax
call fcn.0050fe41
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.0050e5fa
push 0
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 3
push eax
call fcn.0046f27a
mov esi, eax
lea eax, [ebp - 0x90]
mov byte [ebp - 4], 4
push eax
call fcn.0049200e
mov byte [ebp - 4], 5
cmp dword [esi + 0x14], edi
jb 0x50faec
mov esi, dword [esi]
cmp dword [ebp - 0x28], 8
mov ecx, dword [ebp - 0x3c]
jae 0x50faf8
lea ecx, [ebp - 0x3c]
mov ebx, dword [ebp]
mov dword [ebp + 0x60], ecx
cmp dword [ebp + 0x14], edi
jae 0x50fb06
lea ebx, [ebp]
cmp dword [eax + 0x14], edi
jb 0x50fb0d
mov eax, dword [eax]
cmp dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x24]
jae 0x50fb18
lea edi, [ebp - 0x24]
cmp dword [0x7ac320], 0x10
mov edx, dword [0x7ac30c]
jae 0x50fb2c
mov edx, 0x7ac30c
cmp dword [0x7ac2f0], 0x10
mov ecx, dword [0x7ac2dc]
jae 0x50fb40
mov ecx, 0x7ac2dc
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 [0x77f9a8]
lea eax, [ebp + 0x28]
push eax
call fcn.004638c2
add esp, 0x2c
push 0
push 1
lea ecx, [ebp - 0x90]
call fcn.0040daff
push 0
push 1
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 8
call fcn.0040daff
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.004c86b9
test esi, esi
jns 0x50fbfe
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push str.recvfrom_ERROR:__d
push 1
call fcn.0050fefa
add esp, 0xc
cmp esi, 0x2738
je 0x50fdf0
cmp esi, 0x2746
jne 0x50fdff
jmp 0x50fdf0
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.0050fefa
add esp, 0x14
lea eax, [ebp - 0x8d8]
push str.M_SEARCH
push eax
call fcn.0047ab57
test al, al
je 0x50fd9e
xor ebx, ebx
lea edi, [ebp - 0x8d8]
push edi
mov esi, edi
call fcn.0047aaac
push 0x6da8d0
push esi
mov edi, eax
call fcn.0047ab57
test al, al
jne 0x50fc62
test edi, edi
jne 0x50fc43
jmp 0x50fc6d
add esi, 2
inc esi
cmp byte [esi], 0x20
je 0x50fc65
mov ebx, esi
lea eax, [ebp - 0xd8]
push eax
call fcn.0047a05c
mov esi, eax
push ebx
lea eax, [ebp - 0xc0]
mov byte [ebp - 4], 9
push eax
call fcn.00464b57
push esi
push eax
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 0xa
push eax
call fcn.0047a001
xor ebx, ebx
lea ecx, [ebp - 0xc0]
push ebx
push 1
call fcn.0040daff
push ebx
push 1
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 0xd
call fcn.0040daff
mov eax, dword [ebp + 0x40]
push 0x10
pop edi
cmp dword [ebp + 0x54], edi
jae 0x50fccb
lea eax, [ebp + 0x40]
push str.ut:client:service:pairing
push eax
call fcn.0047ab57
test al, al
jne 0x50fd13
mov eax, dword [ebp + 0x40]
cmp dword [ebp + 0x54], edi
jae 0x50fce5
lea eax, [ebp + 0x40]
push str.ssdp:all
push eax
call fcn.0047ab57
test al, al
jne 0x50fd13
mov eax, dword [ebp + 0x40]
cmp dword [ebp + 0x54], edi
jae 0x50fcff
lea eax, [ebp + 0x40]
push eax
push str.DEBUG:_UPnP:_Not_replying_to_Service_Type___S_
push ebx
call fcn.005100a8
mov ebx, dword [ebp + 0x5c]
add esp, 0xc
jmp 0x50fd8c
push str.DEBUG:_UPnP:_Got_an_m_search_event
push ebx
call fcn.0050fefa
mov eax, dword [ebp + 0x28]
pop ecx
pop ecx
cmp dword [ebp + 0x3c], edi
jae 0x50fd2b
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.004c86b9
mov ecx, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], edi
jae 0x50fd59
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.0050fefa
add esp, 0x14
cmp esi, dword [ebp + 0x38]
je 0x50fd8c
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.005100a8
add esp, 0x10
push 0
push 1
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 8
call fcn.0040daff
jmp 0x50fdf0
push str.DEBUG:_UPnP:_Got_a_reply_notify_event
push 0
call fcn.0050fefa
pop ecx
pop ecx
lea edi, [ebp - 0x8d8]
push edi
mov esi, edi
call fcn.0047aaac
push str.location:
push esi
mov edi, eax
call fcn.0047ab57
test al, al
jne 0x50fdd1
test edi, edi
jne 0x50fdb2
jmp 0x50fdf0
add esi, 8
inc esi
cmp byte [esi], 0x20
je 0x50fdd4
push esi
push str.UPnP:_Found_location_from_upnp_notify:__s_n
push 0
call fcn.0050fefa
add esp, 0xc
push esi
call fcn.0050e533
mov eax, dword [ebp + 0x60]
dec eax
mov dword [ebp + 0x60], eax
test eax, eax
jg 0x50fb90
xor ebx, ebx
lea ecx, [ebp + 0x28]
push ebx
push 1
call fcn.0040daff
push ebx
push 1
lea ecx, [ebp]
call fcn.0040daff
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.0040daff
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.004267c2
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x64]
pop ebp
ret 4