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

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6bd3e2
call fcn.0066bd6c
sub esp, 0x74
and dword [ebp + 0x38], 0
and dword [ebp + 0x3c], 0
push ebx
push esi
push 2
pop eax
push dword [ebp + 0x64]
mov word [ebp + 0x30], ax
mov ebx, ecx
mov eax, 0x6c07
mov dword [ebp + 0x40], ebx
mov word [ebp + 0x32], ax
call dword [sym.imp.WS2_32.dll_htonl]
xor edx, edx
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x44], edx
mov dword [ebp + 0x54], edx
mov dword [ebp + 0x58], 0xf
mov byte [ebp + 0x44], dl
mov esi, dword [ebp + 0x68]
mov dword [ebp - 4], edx
test esi, esi
jne 0x5139fa
push 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
mov byte [ebp + 0x64], dl
lea ecx, [ebp + 0x44]
push dword [ebp + 0x64]
push 0x62
call fcn.0040fe0b
jmp 0x513b77
cmp esi, 1
je 0x513a0f
cmp esi, 2
je 0x513a0f
mov dword [ebp + 0x54], edx
mov byte [ebp + 0x44], dl
jmp 0x513b79
mov eax, dword fs:[0x2c]
mov ecx, dword [0x7f7290]
push edi
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x7cdcd4]
cmp eax, dword [ecx + 4]
jg 0x513be8
lea eax, [ebp - 0x24]
push eax
call fcn.005140d1
lea eax, [ebp]
mov byte [ebp - 4], 2
push eax
call fcn.0051285d
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 3
push eax
call fcn.005129da
cmp byte [0x7c7dda], 0
mov eax, dword [0x7c7e78]
mov byte [ebp - 4], 4
jne 0x513a6a
mov eax, dword [0x7c0b7c]
push eax
call fcn.0051418d
push eax
lea ecx, [ebp - 0x38]
call fcn.004ccd7d
mov dword [ebp + 0x68], str.ssdp:alive
cmp esi, 1
je 0x513a8c
mov dword [ebp + 0x68], str.ssdp:byebye
push 1
push 0
lea eax, [ebp - 0x80]
push eax
call fcn.00471440
mov esi, eax
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 5
push eax
call fcn.004956c1
cmp dword [esi + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x513ab4
mov esi, dword [esi]
cmp dword [ebp + 0x14], 8
lea ebx, [ebp]
jb 0x513ac0
mov ebx, dword [ebp]
cmp dword [ebp + 0x2c], 0x10
lea ecx, [ebp + 0x18]
mov dword [ebp + 0x64], ecx
jb 0x513ad2
mov ecx, dword [ebp + 0x18]
mov dword [ebp + 0x64], ecx
cmp dword [eax + 0x14], 0x10
jb 0x513ada
mov eax, dword [eax]
cmp dword [ebp - 0x10], 0x10
lea edi, [ebp - 0x24]
jb 0x513ae6
mov edi, dword [ebp - 0x24]
cmp dword [0x7cdcb8], 0x10
mov edx, 0x7cdca4
jb 0x513afa
mov edx, dword [0x7cdca4]
cmp dword [0x7cdc88], 0x10
mov ecx, 0x7cdc74
jb 0x513b0e
mov ecx, dword [0x7cdc74]
push esi
push ebx
push dword [ebp + 0x64]
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.004646b3
add esp, 0x2c
lea ecx, [ebp + 0x44]
pop edi
cmp ecx, eax
je 0x513b44
mov byte [ebp + 0x64], 0
push dword [ebp + 0x64]
push eax
call fcn.0040fb18
lea ecx, [ebp - 0x50]
call fcn.004102c8
lea ecx, [ebp - 0x68]
call fcn.004102c8
lea ecx, [ebp - 0x80]
call fcn.004102c8
lea ecx, [ebp + 0x18]
call fcn.004102c8
lea ecx, [ebp]
call fcn.0042756c
lea ecx, [ebp - 0x24]
call fcn.004102c8
mov ebx, dword [ebp + 0x40]
xor edx, edx
cmp dword [ebp + 0x58], 0x10
lea eax, [ebp + 0x44]
jb 0x513b85
mov eax, dword [ebp + 0x44]
push 0x10
lea ecx, [ebp + 0x30]
push ecx
push edx
push dword [ebp + 0x54]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
mov eax, dword [ebp + 0x58]
setg bl
cmp eax, 0x10
jb 0x513bd3
mov ecx, dword [ebp + 0x44]
inc eax
mov dword [ebp + 0x64], eax
mov dword [ebp + 0x68], ecx
cmp eax, 0x1000
jb 0x513bca
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x68]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0x64]
mov ecx, dword [ebp + 0x68]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
mov al, bl
pop esi
pop ebx
mov dword fs:[0], ecx
add ebp, 0x5c
leave
ret 8
mov edi, 0x7cdcd4
push edi
call fcn.0066bfa5
cmp dword [0x7cdcd4], 0xffffffff
pop ecx
jne 0x513a30
mov ecx, 0x7cdc70
mov byte [ebp - 4], 1
call fcn.004cf03a
push 0x6d20f1
call fcn.0066bd54
push edi
mov byte [ebp - 4], 0
call fcn.0066bf5b
pop ecx
pop ecx
jmp 0x513a30