Function at 0x41fa40
Capabilities:
Create udp socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x660
mov eax, dword [0x4c07e0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x604]
xor esi, esi
mov dword [ebp - 0x63c], 1
push 0x600
push esi
push eax
mov dword [ebp - 0x634], esi
call fcn.00466b60
add esp, 0xc
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
mov dword [ebp - 0x640], ebx
test ebx, ebx
jns 0x41fac4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket
push str.Socket_error:__s___d_n
call fcn.0041e0d0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00464e2f
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
mov eax, 2
movups xmmword [ebp - 0x614], xmm0
mov word [ebp - 0x614], ax
cmp dword [ebp + 0x14], esi
je 0x41faf1
push 0x76c
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x612], ax
push 4
lea eax, [ebp - 0x63c]
mov dword [ebp - 0x610], esi
push eax
push 4
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x41fb3e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.setsockopt
push str.Socket_error:__s___d_n
call fcn.0041e0d0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00464e2f
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x41fb86
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
push 4
mov dword [ebp - 0x624], eax
mov dword [ebp - 0x610], eax
lea eax, [ebp - 0x624]
push eax
push 9
push 0
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x41fb86
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.setsockopt
push str.Socket_error:__s___d_n
call fcn.0041e0d0
add esp, 0xc
push 0x10
lea eax, [ebp - 0x614]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x41fbcd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.bind
push str.Socket_error:__s___d_n
call fcn.0041e0d0
add esp, 0xc
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00464e2f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov eax, 0x10624dd3
mul ecx
mov edi, 0x49708c
shr edx, 6
xor eax, eax
mov dword [ebp - 0x620], edx
mov dword [ebp - 0x61c], edi
nop dword [eax]
test eax, eax
jne 0x41fcd1
push edx
push dword [edi]
lea eax, [ebp - 0x604]
push str.M_SEARCH__HTTP_1.1_r_nHOST:_239.255.255.250:1900_r_nST:__s_r_nMAN:__ssdp:discover__r_nMX:__u_r_n_r_n
push 0x600
push eax
call fcn.0041ee00
add dword [ebp - 0x61c], 4
add esp, 0x14
mov edi, eax
xorps xmm0, xmm0
lea eax, [ebp - 0x638]
movups xmmword [ebp - 0x660], xmm0
push eax
lea eax, [ebp - 0x660]
mov dword [ebp - 0x65c], 0
push eax
push str.1900
push str.239.255.255.250
movups xmmword [ebp - 0x650], xmm0
mov dword [ebp - 0x658], 2
call fcn.0041e310
test eax, eax
jne 0x41fe3d
mov esi, dword [ebp - 0x638]
test esi, esi
je 0x41fcb4
push dword [esi + 0x10]
lea eax, [ebp - 0x604]
push dword [esi + 0x18]
push 0
push edi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_sendto]
mov edi, eax
test edi, edi
jns 0x41fca7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.sendto
push str.Socket_error:__s___d_n
call fcn.0041e0d0
add esp, 0xc
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x41fc71
mov esi, dword [ebp - 0x638]
push esi
call fcn.0041e2c0
test edi, edi
js 0x41fe1f
mov esi, dword [ebp - 0x634]
mov edi, dword [ebp - 0x61c]
mov ecx, dword [ebp + 8]
push ecx
push 0x600
lea eax, [ebp - 0x604]
push eax
push ebx
call fcn.004202b0
add esp, 0x10
mov dword [ebp - 0x630], eax
test eax, eax
js 0x41fe69
jne 0x41fd15
test esi, esi
jne 0x41fe69
cmp dword [edi], esi
je 0x41fe69
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x620]
jmp 0x41fbf0
lea ecx, [ebp - 0x624]
mov dword [ebp - 0x628], 0
push ecx
lea ecx, [ebp - 0x62c]
mov dword [ebp - 0x618], 0
push ecx
lea ecx, [ebp - 0x618]
mov dword [ebp - 0x62c], 0
push ecx
lea ecx, [ebp - 0x628]
mov dword [ebp - 0x624], 0
push ecx
push eax
lea eax, [ebp - 0x604]
push eax
call fcn.004205b0
mov eax, dword [ebp - 0x630]
add esp, 0x18
cmp dword [ebp - 0x62c], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x620]
je 0x41fbf0
cmp dword [ebp - 0x628], 0
je 0x41fbf0
mov eax, dword [ebp - 0x618]
mov ebx, dword [ebp - 0x624]
add eax, 0x10
add eax, ebx
push eax
call fcn.0046b4f9
mov ecx, dword [ebp - 0x618]
mov edi, eax
push ecx
push dword [ebp - 0x628]
mov dword [edi], esi
lea eax, [edi + 0xc]
lea esi, [ecx + 0xd]
mov dword [edi + 4], eax
add esi, edi
push eax
mov dword [edi + 8], esi
call fcn.00466cc0
mov eax, dword [ebp - 0x618]
push ebx
push dword [ebp - 0x62c]
push esi
mov byte [edi + eax + 0xc], 0
call fcn.00466cc0
mov ecx, dword [ebp - 0x618]
lea eax, [edi + ebx]
mov ebx, dword [ebp - 0x640]
mov esi, edi
mov edi, dword [ebp - 0x61c]
add esp, 0x1c
mov edx, dword [ebp - 0x620]
mov byte [eax + ecx + 0xd], 0
mov eax, dword [ebp - 0x630]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x634], esi
jmp 0x41fbf0
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x634]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00464e2f
mov esp, ebp
pop ebp
ret
push eax
push str.getaddrinfo___failed:__d_n
push 2
call fcn.00471428
add esp, 4
push eax
call fcn.00403a60
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00464e2f
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00464e2f
mov esp, ebp
pop ebp
ret