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

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x6b76ef
call fcn.00651da4
sub esp, 0x8cc
cmp byte [0x7c8d12], 0
mov eax, dword [0x7c8db0]
push ebx
push esi
push edi
push 0x10
pop edi
mov dword [ebp + 0x5c], ecx
mov dword [ebp + 0x58], edi
jne 0x510312
mov eax, dword [0x7c1af0]
push eax
call fcn.005107cb
push eax
lea ecx, [ebp - 0x50]
call fcn.004c86e3
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7f8ad8]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x7cecd4]
cmp eax, dword [ecx + 4]
jle 0x510376
mov esi, 0x7cecd4
push esi
call fcn.00651f0b
cmp dword [0x7cecd4], 0xffffffff
pop ecx
jne 0x510376
and dword [ebp - 4], 0
mov ecx, 0x7cec70
call fcn.004ca926
push 0x6cc06b
call fcn.00651d8e
or dword [ebp - 4], 0xffffffff
push esi
call fcn.00651ecc
pop ecx
pop ecx
lea eax, [ebp - 0x3c]
push eax
call fcn.0050ed46
xor ebx, ebx
lea eax, [ebp - 0x24]
inc ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00510720
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.0050eed7
push ebx
push 0
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 3
push eax
call fcn.0046e4c6
mov esi, eax
lea eax, [ebp - 0x90]
mov byte [ebp - 4], 4
push eax
call fcn.00491679
mov byte [ebp - 4], 5
cmp dword [esi + 0x14], edi
jb 0x5103cb
mov esi, dword [esi]
cmp dword [ebp - 0x28], 8
mov ecx, dword [ebp - 0x3c]
jae 0x5103d7
lea ecx, [ebp - 0x3c]
mov ebx, dword [ebp]
mov dword [ebp + 0x60], ecx
cmp dword [ebp + 0x14], edi
jae 0x5103e5
lea ebx, [ebp]
cmp dword [eax + 0x14], edi
jb 0x5103ec
mov eax, dword [eax]
cmp dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x24]
jae 0x5103f7
lea edi, [ebp - 0x24]
cmp dword [0x7cecb8], 0x10
mov edx, dword [0x7ceca4]
jae 0x51040b
mov edx, 0x7ceca4
cmp dword [0x7cec88], 0x10
mov ecx, dword [0x7cec74]
jae 0x51041f
mov ecx, 0x7cec74
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 [0x7a0c28]
lea eax, [ebp + 0x28]
push eax
call fcn.00461fef
add esp, 0x2c
push 0
push 1
lea ecx, [ebp - 0x90]
call fcn.0040facf
push 0
push 1
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 8
call fcn.0040facf
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.004c868f
test esi, esi
jns 0x5104dd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push str.recvfrom_ERROR:__d
push 1
call fcn.005107d9
add esp, 0xc
cmp esi, 0x2738
je 0x5106cf
cmp esi, 0x2746
jne 0x5106de
jmp 0x5106cf
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.005107d9
add esp, 0x14
lea eax, [ebp - 0x8d8]
push str.M_SEARCH
push eax
call fcn.0047a878
test al, al
je 0x51067d
xor ebx, ebx
lea edi, [ebp - 0x8d8]
push edi
mov esi, edi
call fcn.0047a7cd
push 0x6f4cb0
push esi
mov edi, eax
call fcn.0047a878
test al, al
jne 0x510541
test edi, edi
jne 0x510522
jmp 0x51054c
add esi, 2
inc esi
cmp byte [esi], 0x20
je 0x510544
mov ebx, esi
lea eax, [ebp - 0xd8]
push eax
call fcn.00479d7d
mov esi, eax
push ebx
lea eax, [ebp - 0xc0]
mov byte [ebp - 4], 9
push eax
call fcn.00463651
push esi
push eax
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 0xa
push eax
call fcn.00479d22
xor ebx, ebx
lea ecx, [ebp - 0xc0]
push ebx
push 1
call fcn.0040facf
push ebx
push 1
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 0xd
call fcn.0040facf
mov eax, dword [ebp + 0x40]
push 0x10
pop edi
cmp dword [ebp + 0x54], edi
jae 0x5105aa
lea eax, [ebp + 0x40]
push str.ut:client:service:pairing
push eax
call fcn.0047a878
test al, al
jne 0x5105f2
mov eax, dword [ebp + 0x40]
cmp dword [ebp + 0x54], edi
jae 0x5105c4
lea eax, [ebp + 0x40]
push str.ssdp:all
push eax
call fcn.0047a878
test al, al
jne 0x5105f2
mov eax, dword [ebp + 0x40]
cmp dword [ebp + 0x54], edi
jae 0x5105de
lea eax, [ebp + 0x40]
push eax
push str.DEBUG:_UPnP:_Not_replying_to_Service_Type___S_
push ebx
call fcn.00510987
mov ebx, dword [ebp + 0x5c]
add esp, 0xc
jmp 0x51066b
push str.DEBUG:_UPnP:_Got_an_m_search_event
push ebx
call fcn.005107d9
mov eax, dword [ebp + 0x28]
pop ecx
pop ecx
cmp dword [ebp + 0x3c], edi
jae 0x51060a
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.004c868f
mov ecx, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], edi
jae 0x510638
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.005107d9
add esp, 0x14
cmp esi, dword [ebp + 0x38]
je 0x51066b
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.00510987
add esp, 0x10
push 0
push 1
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 8
call fcn.0040facf
jmp 0x5106cf
push str.DEBUG:_UPnP:_Got_a_reply_notify_event
push 0
call fcn.005107d9
pop ecx
pop ecx
lea edi, [ebp - 0x8d8]
push edi
mov esi, edi
call fcn.0047a7cd
push str.location:
push esi
mov edi, eax
call fcn.0047a878
test al, al
jne 0x5106b0
test edi, edi
jne 0x510691
jmp 0x5106cf
add esi, 8
inc esi
cmp byte [esi], 0x20
je 0x5106b3
push esi
push str.UPnP:_Found_location_from_upnp_notify:__s_n
push 0
call fcn.005107d9
add esp, 0xc
push esi
call fcn.0050ee10
mov eax, dword [ebp + 0x60]
dec eax
mov dword [ebp + 0x60], eax
test eax, eax
jg 0x51046f
xor ebx, ebx
lea ecx, [ebp + 0x28]
push ebx
push 1
call fcn.0040facf
push ebx
push 1
lea ecx, [ebp]
call fcn.0040facf
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.0040facf
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.004284eb
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x64]
pop ebp
ret 4