Function at 0x4024f0
Capabilities:
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xc014
call fcn.00404070
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 2
push 2
mov dword [0x40601c], 1
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402698
lea eax, [ebp - 0xc010]
mov dword [ebp - 0xc010], 1
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, dword [sym.imp.MSVCR120.dll_sprintf]
xor esi, esi
xor ecx, ecx
mov dword [ebp - 0xc00c], ecx
jmp 0x402560
cmp ecx, 0xfa0
jge 0x40261d
mov eax, 0x51eb851f
imul ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x190
sub ecx, eax
jne 0x4025e9
mov esi, 0x4056e4
lea esp, [esp]
push dword [0x40601c]
push dword [esi - 4]
push dword [esi]
push str.urn:schemas_upnp_org:
push str._s_s:_s:_d
push 0x408390
call edi
push 0x408390
push 6
lea eax, [ebp - 0x9808]
push str.M_SEARCH__HTTP_1.1_r_nHOST:_239.255.255.250:1900_r_nMAN:__ssdp:discover__r_nMX:__d_r_nST:__s_r_n_r_n
push eax
call edi
add esp, 0x28
lea eax, [ebp - 0x9808]
push eax
push ecx
mov ecx, ebx
call fcn.00401ad0
add esp, 8
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, 8
cmp esi, 0x4056fc
jl 0x402590
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x2800
lea eax, [ebp - 0x7008]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [ebp - 0xc00c]
mov esi, eax
inc ecx
mov dword [ebp - 0xc00c], ecx
test esi, esi
jle 0x402560
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
test esi, esi
jle 0x402698
cmp esi, 0x2800
jae 0x40281c
lea edx, [ebp - 0xc008]
mov byte [ebp + esi - 0x7008], 0
lea ecx, [ebp - 0x7008]
call fcn.004019d0
test al, al
je 0x402698
mov ebx, dword [sym.imp.MSVCR120.dll_strstr]
mov esi, 0x4056e4
lea esp, [esp]
push 1
push dword [esi - 4]
push dword [esi]
push str.urn:schemas_upnp_org:
push str._s_s:_s:_d
push 0x408390
call edi
lea eax, [ebp - 0xc008]
push 0x408390
push eax
call ebx
add esp, 0x20
test eax, eax
jne 0x4026ab
add esi, 8
cmp esi, 0x4056fc
jl 0x402660
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040374c
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2808]
mov dword [ebp - 0xc00c], 0
push eax
lea eax, [ebp - 0xc00c]
mov edx, 0x4052fc
push eax
lea ecx, [ebp - 0xc008]
call fcn.00401850
lea ecx, [ebp - 0x2808]
add esp, 8
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4026e0
sub ecx, edx
je 0x402698
mov esi, dword [sym.imp.MSVCR120.dll__strupr]
mov eax, dword [ebp - 0x2808]
mov dword [ebp - 0x4808], eax
mov eax, dword [ebp - 0x2804]
mov dword [ebp - 0x4804], eax
mov al, byte [ebp - 0x2800]
mov byte [ebp - 0x4800], al
lea eax, [ebp - 0x4808]
push eax
mov byte [ebp - 0x47ff], 0
call esi
add esp, 4
lea ecx, [ebp - 0x4808]
mov eax, str.LOCATION:
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x402753
test dl, dl
je 0x40274f
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x402753
add ecx, 2
add eax, 2
test dl, dl
jne 0x402733
xor eax, eax
jmp 0x402758
sbb eax, eax
or eax, 1
test eax, eax
je 0x4027a6
lea eax, [ebp - 0x2808]
mov edx, 0x4052fc
push eax
lea eax, [ebp - 0xc00c]
push eax
lea ecx, [ebp - 0xc008]
call fcn.00401850
lea ecx, [ebp - 0x2808]
add esp, 8
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402786
sub ecx, edx
jne 0x4026f1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040374c
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x2808]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4027b0
sub ecx, edx
lea eax, [ecx - 8]
push eax
lea eax, [ebp - 0x27ff]
push eax
lea eax, [ebp - 0x2808]
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
xor ecx, ecx
mov al, byte [ebp + ecx - 0x2808]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x9809], al
test al, al
jne 0x4027d5
lea ecx, [ebp - 0x9808]
call fcn.00401920
lea ecx, [ebp - 0x9808]
call fcn.00401970
lea ecx, [ebp - 0x9808]
call fcn.00402180
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040374c
mov esp, ebp
pop ebp
ret
call fcn.00403994
int3