Function at 0x422d90
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Get socket status
Receive data
Receive data on 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
push 0xffffffffffffffff
push 0x471562
mov eax, dword fs:[0]
push eax
sub esp, 0x764
mov eax, dword [0x4915c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x4962c8]
mov dword [ebp - 0x654], ebx
call dword [0x49297c]
xor edi, edi
push edi
push 2
push 2
mov dword [ebp - 0x634], eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x422ef7
mov ebx, dword [ebx + 0x74]
xor eax, eax
cmp ebx, edi
mov dword [ebp - 0x618], eax
mov dword [ebp - 0x614], eax
mov dword [ebp - 0x610], eax
mov dword [ebp - 0x60c], eax
mov word [ebp - 0x618], 2
je 0x422e4a
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x422e2d
xor eax, eax
jmp 0x422e4a
lea edi, [eax + eax]
mov eax, edi
call fcn.0045a170
mov ecx, dword [ebp - 0x634]
mov eax, esp
push ecx
push edi
push ebx
push eax
call fcn.00403150
xor edi, edi
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x76c
mov dword [ebp - 0x614], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x5dc
lea edx, [ebp - 0x607]
push edi
push edx
mov word [ebp - 0x616], ax
mov byte [ebp - 0x608], 0
call fcn.00457910
push str.M_SEARCH__HTTP_1.1_r_nHost:_239.255.255.250:1900_r_nST:_urn:schemas_upnp_org:device:InternetGatewayDevice:1_r_nMan:__ssdp:discover__r_nMX:_3_r_n_r_n
lea eax, [ebp - 0x608]
push 0x47ea10
push eax
call fcn.0045673e
add esp, 0x18
push 4
lea ecx, [ebp - 0x65c]
push ecx
push 0x1006
push 0xffff
push esi
mov dword [ebp - 0x65c], 0x1f40
call dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 0x608]
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x422ec8
push 0x10
lea edx, [ebp - 0x618]
push edx
push edi
sub eax, ecx
push eax
lea eax, [ebp - 0x608]
push eax
push esi
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, edi
jg 0x422eff
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x42363e
xor eax, eax
push 0x5dd
lea ecx, [ebp - 0x608]
push edi
push ecx
mov dword [ebp - 0x628], eax
mov dword [ebp - 0x624], eax
mov dword [ebp - 0x620], eax
mov dword [ebp - 0x61c], eax
mov dword [ebp - 0x658], 0x10
call fcn.00457910
add esp, 0xc
lea edx, [ebp - 0x658]
push edx
lea eax, [ebp - 0x628]
push eax
push edi
push 0x5dc
lea ecx, [ebp - 0x608]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, edi
push esi
jle 0x422ef1
call dword [sym.imp.WS2_32.dll_closesocket]
lea edx, [ebp - 0x608]
push edx
lea ecx, [ebp - 0x62c]
call fcn.004256d0
mov dword [ebp - 4], edi
mov edx, dword [ebp - 0x62c]
cmp dword [edx - 0xc], edi
jl 0x422fa6
push str.LOCATION:
push edx
call fcn.004560a2
mov edx, dword [ebp - 0x62c]
add esp, 8
cmp eax, edi
je 0x422fa6
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
jne 0x422fd1
lea eax, [edx - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422fc9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
jmp 0x42363e
mov ecx, eax
mov edx, str.http:__
lea esi, [ebp - 0x62c]
call fcn.00406050
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x422ffd
lea ecx, [ebp - 0x62c]
call fcn.00403700
or eax, 0xffffffff
jmp 0x42363e
mov ecx, ebx
mov edx, 0x47baf4
lea esi, [ebp - 0x62c]
call fcn.00406050
cmp eax, 0xffffffff
jne 0x423020
mov ecx, ebx
mov edx, 0x48039c
call fcn.00406050
add ebx, 7
sub eax, ebx
push eax
push ebx
lea ecx, [ebp - 0x638]
push ecx
lea ecx, [ebp - 0x62c]
call fcn.004061f0
push eax
lea ecx, [ebp - 0x62c]
mov byte [ebp - 4], 1
call fcn.00403630
lea ecx, [ebp - 0x638]
mov byte [ebp - 4], 0
call fcn.00403700
xor eax, eax
push 0x5dd
lea edx, [ebp - 0x608]
push edi
push edx
mov dword [ebp - 0x650], edi
mov dword [ebp - 0x64c], eax
mov dword [ebp - 0x648], eax
mov dword [ebp - 0x644], eax
mov byte [ebp - 0x24], al
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
mov dword [ebp - 0x63c], 0xffffffff
call fcn.00457910
mov ecx, dword [ebp - 0x62c]
mov eax, dword [ecx - 0xc]
add esp, 0xc
cmp eax, edi
jle 0x42328a
push 0x3a
push ecx
call fcn.004576b6
mov ecx, dword [ebp - 0x62c]
add esp, 8
cmp eax, edi
je 0x42328a
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x42328a
cmp ecx, edi
mov ebx, ecx
jne 0x4230e8
xor eax, eax
jmp 0x423118
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x4230fd
xor eax, eax
jmp 0x423118
lea esi, [eax + eax]
mov eax, esi
call fcn.0045a170
mov ecx, dword [ebp - 0x634]
mov eax, esp
push ecx
push esi
push ebx
push eax
call fcn.00403150
lea edx, [ebp - 0x608]
push edx
lea ecx, [ebp - 0x63c]
push ecx
lea edx, [ebp - 0x644]
push edx
lea ecx, [ebp - 0x648]
push ecx
lea edx, [ebp - 0x64c]
push edx
lea ecx, [ebp - 0x650]
push ecx
push str._d._d._d._d:_d_s
push eax
call fcn.00456d69
add esp, 0x20
cmp dword [ebp - 0x63c], edi
jle 0x422fea
mov edx, dword [ebp - 0x644]
mov eax, dword [ebp - 0x648]
mov ecx, dword [ebp - 0x64c]
push edx
mov edx, dword [ebp - 0x650]
push eax
push ecx
push edx
lea eax, [ebp - 0x24]
push str._d._d._d._d
push eax
call fcn.0045673e
add esp, 0x18
push edi
xor eax, eax
push 1
push 2
mov dword [ebp - 0x618], eax
mov dword [ebp - 0x614], eax
mov dword [ebp - 0x610], eax
mov dword [ebp - 0x60c], eax
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x422fea
lea ecx, [ebp - 0x24]
push ecx
mov word [ebp - 0x618], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, dword [ebp - 0x63c]
push edx
mov dword [ebp - 0x614], eax
call dword [sym.imp.WS2_32.dll_htons]
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
mov word [ebp - 0x616], ax
lea eax, [ebp - 0x640]
push eax
push 0x8004667e
push ebx
mov dword [ebp - 0x640], 1
call esi
push 0x10
lea ecx, [ebp - 0x618]
push ecx
push ebx
mov dword [ebp - 0x668], 0x14
mov dword [ebp - 0x664], edi
call dword [sym.imp.WS2_32.dll_connect]
lea edx, [ebp - 0x668]
push edx
push edi
lea eax, [ebp - 0x770]
push eax
push edi
push ebx
mov dword [ebp - 0x76c], ebx
mov dword [ebp - 0x770], 1
call dword [sym.imp.WS2_32.dll_select]
lea ecx, [ebp - 0x770]
push ecx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x423304
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x62c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x422fbd
cmp ecx, edi
mov ebx, ecx
jne 0x423294
xor eax, eax
jmp 0x4232c4
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x4232a9
xor eax, eax
jmp 0x4232c4
lea esi, [eax + eax]
mov eax, esi
call fcn.0045a170
mov edx, dword [ebp - 0x634]
mov eax, esp
push edx
push esi
push ebx
push eax
call fcn.00403150
lea ecx, [ebp - 0x608]
push ecx
lea edx, [ebp - 0x644]
push edx
lea ecx, [ebp - 0x648]
push ecx
lea edx, [ebp - 0x64c]
push edx
lea ecx, [ebp - 0x650]
push ecx
push str._d._d._d._d_s
push eax
call fcn.00456d69
add esp, 0x1c
mov dword [ebp - 0x63c], 0x50
jmp 0x42315c
lea ecx, [ebp - 0x640]
push ecx
push 0x8004667e
push ebx
mov dword [ebp - 0x640], edi
call esi
push 4
lea edx, [ebp - 0x660]
push edx
push 0x1006
push 0xffff
push ebx
mov dword [ebp - 0x660], 0x2710
call dword [sym.imp.WS2_32.dll_setsockopt]
call fcn.00442657
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x423357
push 0x80004005
call fcn.004029c0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x634], eax
lea ecx, [ebp - 0x608]
push ecx
push str.GET__s_HTTP_1.1_r_n_r_n
lea edi, [ebp - 0x634]
mov byte [ebp - 4], 2
call fcn.00424fc0
mov esi, dword [ebp - 0x634]
mov eax, esi
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x423392
push 0
sub eax, edx
push eax
push esi
push ebx
call dword [sym.imp.WS2_32.dll_send]
push 0x47b6d0
lea ecx, [ebp - 0x630]
mov dword [ebp - 0x638], 0
call fcn.004031e0
mov byte [ebp - 4], 3
jmp 0x4233d0
push 0x5dd
lea edx, [ebp - 0x608]
push 0
push edx
call fcn.00457910
add esp, 0xc
push 0
push 0x5dc
lea eax, [ebp - 0x608]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jle 0x42341d
lea ecx, [ebp - 0x608]
push ecx
lea esi, [ebp - 0x630]
mov byte [ebp + edi - 0x608], 0
call fcn.00423940
jmp 0x423422
cmp edi, 0xffffffff
je 0x423428
test edi, edi
jg 0x4233d0
jmp 0x423432
mov dword [ebp - 0x638], 0xffffffff
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
or esi, 0xffffffff
cmp dword [ebp - 0x638], esi
jne 0x4234b9
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x423469
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x634]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42348e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x62c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4234b2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
jmp 0x42363e
lea edi, [ebp - 0x630]
call fcn.0040d350
mov eax, dword [ebp - 0x630]
cmp dword [eax - 0xc], 0
jl 0x4234ee
push str._presentationurl_
push eax
call fcn.004560a2
add esp, 8
test eax, eax
je 0x4234ee
sub eax, dword [ebp - 0x630]
sar eax, 1
cmp eax, esi
jne 0x423516
lea ecx, [ebp - 0x630]
call fcn.00403700
lea ecx, [ebp - 0x634]
call fcn.00403700
lea ecx, [ebp - 0x62c]
call fcn.00403700
mov eax, esi
jmp 0x42363e
mov ecx, eax
mov edx, str.http:__
lea esi, [ebp - 0x630]
call fcn.00406050
mov edi, eax
cmp edi, 0xffffffff
jne 0x423553
mov ecx, esi
call fcn.00403700
lea ecx, [ebp - 0x634]
call fcn.00403700
lea ecx, [ebp - 0x62c]
call fcn.00403700
or eax, edi
jmp 0x42363e
add edi, 7
mov ecx, edi
mov edx, 0x4804a8
lea esi, [ebp - 0x630]
call fcn.00406050
sub eax, edi
push eax
push edi
lea ecx, [ebp - 0x638]
push ecx
mov ecx, esi
call fcn.004061f0
push eax
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.00403630
lea ecx, [ebp - 0x638]
mov byte [ebp - 4], 3
call fcn.00403700
mov eax, dword [ebp - 0x630]
cmp dword [eax - 0xc], 0
jle 0x4235bd
push 0x3a
push eax
call fcn.004576b6
add esp, 8
test eax, eax
je 0x4235bd
sub eax, dword [ebp - 0x630]
sar eax, 1
cmp eax, 0xffffffff
jne 0x4235cf
mov edx, dword [ebp - 0x654]
mov dword [edx + 0x4b8], 0x50
jmp 0x42361b
add eax, 1
push eax
lea eax, [ebp - 0x638]
push eax
lea ecx, [ebp - 0x630]
call fcn.00406080
push eax
lea ecx, [ebp - 0x630]
mov byte [ebp - 4], 5
call fcn.00403630
lea ecx, [ebp - 0x638]
call fcn.00403700
mov ecx, dword [ebp - 0x630]
push ecx
call fcn.00456015
mov edx, dword [ebp - 0x654]
add esp, 4
mov dword [edx + 0x4b8], eax
lea ecx, [ebp - 0x630]
call fcn.00403700
lea ecx, [ebp - 0x634]
call fcn.00403700
lea ecx, [ebp - 0x62c]
call fcn.00403700
xor eax, eax
lea esp, [ebp - 0x780]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00455843
mov esp, ebp
pop ebp
ret