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

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x679c4d
call fcn.0062921c
sub esp, 0x8cc
cmp byte [0x77395a], 0
mov eax, dword [0x7739f8]
push ebx
push esi
push edi
push 0x10
pop edi
mov dword [ebp + 0x5c], ecx
mov dword [ebp + 0x58], edi
jne 0x506d2e
mov eax, dword [0x76c880]
push eax
call fcn.005071e7
push eax
lea ecx, [ebp - 0x50]
call fcn.004c3ec7
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7a0690]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x77986c]
cmp eax, dword [ecx + 4]
jle 0x506d92
mov esi, 0x77986c
push esi
call fcn.006296ef
cmp dword [0x77986c], 0xffffffff
pop ecx
jne 0x506d92
and dword [ebp - 4], 0
mov ecx, 0x779808
call fcn.004c61ab
push 0x68a413
call fcn.006295a6
or dword [ebp - 4], 0xffffffff
push esi
call fcn.006296b0
pop ecx
pop ecx
lea eax, [ebp - 0x3c]
push eax
call fcn.00505788
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 1
push eax
call fcn.0050713c
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.00505919
push 0
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 3
push eax
call fcn.0046c363
mov esi, eax
lea eax, [ebp - 0x90]
mov byte [ebp - 4], 4
push eax
call fcn.0048e95c
mov byte [ebp - 4], 5
cmp dword [esi + 0x14], edi
jb 0x506de7
mov esi, dword [esi]
cmp dword [ebp - 0x28], 8
mov ecx, dword [ebp - 0x3c]
jae 0x506df3
lea ecx, [ebp - 0x3c]
mov ebx, dword [ebp]
mov dword [ebp + 0x60], ecx
cmp dword [ebp + 0x14], edi
jae 0x506e01
lea ebx, [ebp]
cmp dword [eax + 0x14], edi
jb 0x506e08
mov eax, dword [eax]
cmp dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x24]
jae 0x506e13
lea edi, [ebp - 0x24]
cmp dword [0x779850], 0x10
mov edx, dword [0x77983c]
jae 0x506e27
mov edx, 0x77983c
cmp dword [0x779820], 0x10
mov ecx, dword [0x77980c]
jae 0x506e3b
mov ecx, 0x77980c
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 [0x74ee68]
lea eax, [ebp + 0x28]
push eax
call fcn.004607cf
add esp, 0x2c
push 0
push 1
lea ecx, [ebp - 0x90]
call fcn.0040abbf
push 0
push 1
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 8
call fcn.0040abbf
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.004c3e73
test esi, esi
jns 0x506ef9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push str.recvfrom_ERROR:__d
push 1
call fcn.005071f5
add esp, 0xc
cmp esi, 0x2738
je 0x5070eb
cmp esi, 0x2746
jne 0x5070fa
jmp 0x5070eb
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.005071f5
add esp, 0x14
lea eax, [ebp - 0x8d8]
push str.M_SEARCH
push eax
call fcn.00478171
test al, al
je 0x507099
xor ebx, ebx
lea edi, [ebp - 0x8d8]
push edi
mov esi, edi
call fcn.004780c6
push 0x6b21e8
push esi
mov edi, eax
call fcn.00478171
test al, al
jne 0x506f5d
test edi, edi
jne 0x506f3e
jmp 0x506f68
add esi, 2
inc esi
cmp byte [esi], 0x20
je 0x506f60
mov ebx, esi
lea eax, [ebp - 0xd8]
push eax
call fcn.00477676
mov esi, eax
push ebx
lea eax, [ebp - 0xc0]
mov byte [ebp - 4], 9
push eax
call fcn.004619ba
push esi
push eax
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 0xa
push eax
call fcn.0047761b
xor ebx, ebx
lea ecx, [ebp - 0xc0]
push ebx
push 1
call fcn.0040abbf
push ebx
push 1
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 0xd
call fcn.0040abbf
mov eax, dword [ebp + 0x40]
push 0x10
pop edi
cmp dword [ebp + 0x54], edi
jae 0x506fc6
lea eax, [ebp + 0x40]
push str.ut:client:service:pairing
push eax
call fcn.00478171
test al, al
jne 0x50700e
mov eax, dword [ebp + 0x40]
cmp dword [ebp + 0x54], edi
jae 0x506fe0
lea eax, [ebp + 0x40]
push str.ssdp:all
push eax
call fcn.00478171
test al, al
jne 0x50700e
mov eax, dword [ebp + 0x40]
cmp dword [ebp + 0x54], edi
jae 0x506ffa
lea eax, [ebp + 0x40]
push eax
push str.DEBUG:_UPnP:_Not_replying_to_Service_Type___S_
push ebx
call fcn.005073a3
mov ebx, dword [ebp + 0x5c]
add esp, 0xc
jmp 0x507087
push str.DEBUG:_UPnP:_Got_an_m_search_event
push ebx
call fcn.005071f5
mov eax, dword [ebp + 0x28]
pop ecx
pop ecx
cmp dword [ebp + 0x3c], edi
jae 0x507026
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.004c3e73
mov ecx, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], edi
jae 0x507054
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.005071f5
add esp, 0x14
cmp esi, dword [ebp + 0x38]
je 0x507087
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.005073a3
add esp, 0x10
push 0
push 1
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 8
call fcn.0040abbf
jmp 0x5070eb
push str.DEBUG:_UPnP:_Got_a_reply_notify_event
push 0
call fcn.005071f5
pop ecx
pop ecx
lea edi, [ebp - 0x8d8]
push edi
mov esi, edi
call fcn.004780c6
push str.location:
push esi
mov edi, eax
call fcn.00478171
test al, al
jne 0x5070cc
test edi, edi
jne 0x5070ad
jmp 0x5070eb
add esi, 8
inc esi
cmp byte [esi], 0x20
je 0x5070cf
push esi
push str.UPnP:_Found_location_from_upnp_notify:__s_n
push 0
call fcn.005071f5
add esp, 0xc
push esi
call fcn.00505852
mov eax, dword [ebp + 0x60]
dec eax
mov dword [ebp + 0x60], eax
test eax, eax
jg 0x506e8b
xor ebx, ebx
lea ecx, [ebp + 0x28]
push ebx
push 1
call fcn.0040abbf
push ebx
push 1
lea ecx, [ebp]
call fcn.0040abbf
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.0040abbf
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.0042386b
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x64]
pop ebp
ret 4