Function at 0x46b240
Capabilities:
Convert ip address from string
Get socket status
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc78
mov eax, dword [0x62aabc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ecx, 0x62d164
mov dword [ebp - 0xc50], 0
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
push edi
mov dword [ebp - 0xc54], esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46b273
mov edi, dword [sym.imp.WS2_32.dll_inet_pton]
sub ecx, edx
je 0x46b298
lea eax, [ebp - 0xc5c]
push eax
push 0x62d164
push 2
call edi
test eax, eax
je 0x46b2c4
xorps xmm0, xmm0
mov dword [ebp - 0xc60], ebx
push esi
movups xmmword [ebp - 0xc78], xmm0
movq qword [ebp - 0xc68], xmm0
call fcn.0046ab50
add esp, 4
mov dword [ebp - 0xc58], eax
cmp eax, 0xffffffff
jne 0x46b2da
pop edi
pop esi
mov eax, 0xffffff9b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054f742
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
cmp eax, 2
jge 0x46b2e9
mov eax, 2
jmp 0x46b2f3
mov ecx, 0x50
cmp eax, ecx
cmovg eax, ecx
push 2
push esi
push eax
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0xac8]
push 0x9c4
push eax
call fcn.0046af40
add esp, 0x14
test eax, eax
jne 0x46b5a7
push 0x7e
push eax
lea eax, [ebp - 0xb46]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, 2
mov word [ebp - 0xb48], ax
lea eax, [ebp - 0xb44]
push eax
push str.239.255.255.250
push 2
call edi
push 0x76c
call dword [sym.imp.WS2_32.dll_htons]
push 0x631434
mov word [ebp - 0xb46], ax
call fcn.00475660
lea eax, [ebp - 0xc50]
push eax
push dword [ebp + 8]
call fcn.0045c5f0
add esp, 0xc
test eax, eax
je 0x46b399
push 0x631434
call fcn.00475760
add esp, 4
mov eax, 0xfffffc71
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054f742
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x10
call esi
push dword [ebp - 0xc54]
mov edi, eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov ecx, dword [ebp + 0x14]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0xc58]
push 8
mov dword [edi + 8], ecx
mov dword [edi + 0xc], eax
call esi
mov ecx, dword [ebp + 8]
push eax
push 0x46b5c0
mov dword [eax], ecx
lea esi, [eax + 4]
lea eax, [ebp - 0xc78]
push eax
call fcn.00463720
lea eax, [ebp - 0xc78]
push 1
push eax
call fcn.00463760
push dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea eax, [ebp - 0xc78]
push eax
call fcn.00463700
push esi
push 0
lea eax, [ebp - 0xc78]
push eax
mov eax, dword [ebp + 0xc]
push 1
cdq
push edx
push eax
push 0x631440
call fcn.00464670
mov eax, dword [esi]
add esp, 0x44
mov dword [edi], eax
mov eax, dword [ebp - 0xc50]
add eax, 0x264
push edi
push eax
call fcn.00462da0
push 0x631434
call fcn.00475760
mov eax, dword [0x627c04]
add esp, 0xc
mov dword [ebp - 0xc4c], ebx
cmp eax, 0xffffffff
je 0x46b4a4
push 4
lea ecx, [ebp - 0xc5c]
push ecx
push 9
push 0
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 0xc4c]
xor eax, eax
mov ebx, dword [0x627c04]
test ecx, ecx
je 0x46b48e
nop dword [eax]
cmp dword [ebp + eax*4 - 0xc48], ebx
je 0x46b48e
inc eax
cmp eax, ecx
jb 0x46b480
cmp eax, ecx
jne 0x46b4a4
cmp ecx, 0x40
jae 0x46b4a4
mov dword [ebp + eax*4 - 0xc48], ebx
inc dword [ebp - 0xc4c]
push 0
push 0
lea eax, [ebp - 0xc4c]
push eax
push 0
lea eax, [ebx + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x46b51e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
lea eax, [ebp - 0x104]
push 0x100
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror_s]
lea eax, [ebp - 0x104]
push eax
push str.SSDP_LIB:_Error_in_select__:__s_n
push 0x2c0
push str.D:UsersphiliDropboxDevelopmentlibpupnppupnpupnp_src_ssdp_ssdp_ctrlpt.c
push 0
push 2
call fcn.00417540
add esp, 0x24
push dword [0x627c04]
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0xfffffc71
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054f742
mov esp, ebp
pop ebp
ret
mov eax, dword [0x627c04]
cmp eax, 0xffffffff
je 0x46b5a2
lea ecx, [ebp - 0xc4c]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x46b5a2
mov edi, dword [sym.imp.WS2_32.dll_sendto]
mov esi, 2
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
nop word [eax + eax]
lea eax, [ebp - 0xac8]
push eax
push str.____SSDP_SEND_M_SEARCH_____n_s_n
push 0x2f9
push str.D:UsersphiliDropboxDevelopmentlibpupnppupnpupnp_src_ssdp_ssdp_ctrlpt.c
push 0
push 2
call fcn.00417540
add esp, 0x18
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x46b575
push 0x10
lea ecx, [ebp - 0xb48]
sub eax, edx
push ecx
push 0
push eax
lea eax, [ebp - 0xac8]
push eax
push dword [0x627c04]
call edi
push 0x64
call ebx
sub esi, 1
jne 0x46b550
mov eax, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054f742
mov esp, ebp
pop ebp
ret