Function at 0x404e50
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, 0xa440
call fcn.004068a0
mov eax, dword [esp + 0xa444]
push ebx
push ebp
push esi
xor esi, esi
push edi
cmp eax, esi
jg 0x404e76
mov dword [esp + 0xa454], 1
mov eax, dword [esp + 0xa454]
push esi
push 2
push 2
mov dword [0x409c64], eax
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x405079
mov al, byte [esp + 0xa458]
mov dword [esp + 0x1c], esi
test al, al
je 0x404ec2
lea ecx, [esp + 0x1c]
push ecx
call fcn.00404dc0
add esp, 4
test al, al
je 0x404ec2
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x18], edi
jmp 0x404ece
mov dword [esp + 0x18], 0xfaffffef
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], esi
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
push 1
push eax
push ebx
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
mov dword [esp + 0x20], esi
mov esi, 0x409c50
mov edx, dword [0x409c64]
mov eax, dword [esi - 4]
mov ecx, dword [esi]
push edx
mov edx, dword [str.urn:schemas_upnp_org:]
push eax
push ecx
push edx
push str._s_s:_s:_d
push 0x739124
call ebp
add esp, 0x18
lea eax, [esp + 0x5450]
push 0x739124
push 6
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 ebp
lea ecx, [esp + 0x5460]
push ecx
push 0x76c
push edi
push ebx
call fcn.00404330
add esp, 0x20
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, 8
cmp esi, 0x409c68
jl 0x404ef5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
push 0x3e8
lea edx, [esp + 0x1c]
push 0
push edx
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0x102
je 0x404fcd
test eax, eax
jne 0x404fcd
mov ecx, 0xb
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x24]
push eax
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test byte [esp + 0x24], 1
je 0x404fc9
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x404fc9
push 0
lea edx, [esp + 0x7c54]
push 0x2800
push edx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
mov dword [esp + 0x10], eax
jg 0x404fdf
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
inc eax
cmp eax, 5
mov dword [esp + 0x20], eax
jl 0x404ef0
mov eax, dword [esp + 0x14]
push 0
push eax
push ebx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x405079
mov byte [esp + eax + 0x7c50], 0
lea edx, [esp + 0x2c50]
lea eax, [esp + 0x7c50]
push edx
push eax
call fcn.00404240
add esp, 8
test al, al
je 0x405079
mov edi, dword [sym.imp.MSVCRT.dll_strstr]
mov esi, 0x409c50
mov ecx, dword [esp + 0xa454]
mov edx, dword [esi - 4]
mov eax, dword [esi]
push ecx
mov ecx, dword [str.urn:schemas_upnp_org:]
push edx
push eax
push ecx
push str._s_s:_s:_d
push 0x739124
call ebp
lea edx, [esp + 0x2c68]
push 0x739124
push edx
call edi
add esp, 0x20
test eax, eax
jne 0x405086
add esi, 8
cmp esi, 0x409c68
jl 0x405036
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xa440
ret
lea eax, [esp + 0x450]
lea ecx, [esp + 0x10]
push eax
push ecx
lea edx, [esp + 0x2c58]
push 0x409cd4
push edx
mov dword [esp + 0x20], 0
call fcn.00404070
lea edi, [esp + 0x460]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x405079
mov ebp, dword [sym.imp.MSVCRT.dll__strupr]
mov eax, dword [esp + 0x450]
mov ecx, dword [esp + 0x454]
mov dl, byte [esp + 0x458]
mov dword [esp + 0x50], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x54], ecx
push eax
mov byte [esp + 0x5c], dl
mov byte [esp + 0x5d], 0
call ebp
add esp, 4
mov esi, str.LOCATION:
lea eax, [esp + 0x50]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40512a
test cl, cl
je 0x405126
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40512a
add eax, 2
add esi, 2
test cl, cl
jne 0x405102
xor eax, eax
jmp 0x40512f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405179
lea eax, [esp + 0x450]
lea ecx, [esp + 0x10]
push eax
push ecx
lea edx, [esp + 0x2c58]
push 0x409cd4
push edx
call fcn.00404070
lea edi, [esp + 0x460]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x4050c9
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xa440
ret
lea edi, [esp + 0x450]
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x459]
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffff7
lea edi, [esp + 0x450]
mov eax, ecx
lea edx, [esp + 0x5450]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x450]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x5450]
push ecx
call fcn.00404190
lea edx, [esp + 0x5454]
push edx
call fcn.004041f0
lea eax, [esp + 0x5458]
push eax
call fcn.00404a70
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa440
ret