Function at 0x436910
Capabilities:
Create raw socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xce4
mov eax, dword [0x4e7018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov dword [ebp - 0xce4], ebx
call sub.KERNEL32.dll_GetCurrentProcessId
movzx eax, ax
xor edi, edi
push 0x400
mov dword [ebp - 0xcdc], eax
lea eax, [ebp - 0x404]
push edi
push eax
mov dword [ebp - 0xce0], edi
call fcn.0040f160
add esp, 0xc
test ebx, ebx
jne 0x43697e
push str.ProbeForSubnet:_invalid_parameter
push 1
call fcn.004439a0
add esp, 8
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xcc4]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4369b6
push eax
push str.ProbeForSubnet:_WSAStartup_failed__error__d
push 1
call fcn.004439a0
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push 1
push 3
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0xcd8], eax
cmp eax, 0xffffffff
jne 0x4369f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ProbeForSubnet:_Could_not_create_socket__error__d
push 1
call fcn.004439a0
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push esi
push str.ProbeForSubnet:_socket_created
push 0x10
call fcn.004439a0
movsx ebx, word [ebp + 8]
xor esi, esi
add esp, 8
mov ecx, 0xffffc0a8
cmp word [ebp + 8], cx
mov edx, 2
cmove esi, edx
shl ebx, 8
nop
mov eax, ebx
or eax, esi
shl eax, 8
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp + esi*4 - 0x404], eax
inc esi
cmp esi, 0x100
jl 0x436a20
push 0xffffff00
call dword [sym.imp.WS2_32.dll_htonl]
push eax
lea eax, [ebp - 0x404]
push 0x100
push eax
call fcn.00436e00
lea eax, [ebp - 0x404]
push 0x100
push eax
call fcn.00436fb0
add esp, 0x14
xor ebx, ebx
mov eax, dword [ebp + ebx*4 - 0x404]
test eax, eax
je 0x436cd2
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
and eax, 0xffffff01
or eax, 1
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push 0x40
mov esi, eax
mov dword [ebp + ebx*4 - 0x404], 0
lea eax, [ebp - 0xb34]
push 0
push eax
call fcn.0040f160
mov eax, dword [ebp - 0xcdc]
lea ecx, [ebp - 0xb34]
mov word [ebp - 0xb30], ax
add esp, 0xc
xor eax, eax
mov word [ebp - 0xb2e], di
mov byte [ebp - 0xb34], 8
xor edx, edx
mov word [ebp - 0xb32], ax
mov edi, 0x20
movzx eax, word [ecx]
lea ecx, [ecx + 2]
add edx, eax
sub edi, 1
jne 0x436ae7
mov ecx, edx
movzx eax, dx
sar ecx, 0x10
xorps xmm0, xmm0
add ecx, eax
mov eax, ecx
sar eax, 0x10
add eax, ecx
not eax
mov word [ebp - 0xb32], ax
mov eax, 2
push 0x10
movups xmmword [ebp - 0x420], xmm0
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x420]
push eax
push edi
mov edi, dword [ebp - 0xcd8]
lea eax, [ebp - 0xb34]
push 0x40
push eax
push edi
mov dword [ebp - 0x41c], esi
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0x40
jne 0x436d97
mov edi, dword [ebp - 0xce0]
push dword [ebp - 0xcdc]
inc edi
mov dword [ebp - 0xce0], edi
lea eax, [edi - 1]
push eax
push esi
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.ProbeForSubnet:_sent_ping:_sendto__s__seq__d__id__d
push 2
call fcn.004439a0
mov eax, dword [ebp - 0xcd8]
add esp, 0x14
mov dword [ebp - 0x520], eax
lea eax, [ebp - 0x410]
mov dword [ebp - 0x524], 1
mov dword [ebp - 0x410], 3
push eax
push 0
push 0
lea eax, [ebp - 0x524]
mov dword [ebp - 0x40c], 0
push eax
push 0xffffffffffffffff
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x436cb4
test eax, eax
je 0x436d56
push str.ProbeForSubnet:_select_says_something_is_ready
push 0x10
call fcn.004439a0
add esp, 8
mov dword [ebp - 0x408], 0x10
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0xcd4]
push eax
push 0
push 0x60e
lea eax, [ebp - 0xb34]
push eax
push dword [ebp - 0xcd8]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edx, eax
test edx, edx
jle 0x436d40
cmp edx, 0x14
jb 0x436d2f
movzx ecx, byte [ebp - 0xb34]
and ecx, 0xf
shl ecx, 2
lea eax, [ecx + 8]
cmp edx, eax
jl 0x436d1e
lea edi, [ebp - 0xb34]
add edi, ecx
movzx eax, word [edi + 6]
push eax
movzx eax, word [edi + 4]
push eax
movzx eax, byte [edi]
push eax
push dword [ebp - 0xcd0]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.ProbeForSubnet:_OnReceive:_from__s_type__d_id__d_seq__d
push 2
call fcn.004439a0
add esp, 0x18
cmp dword [ebp - 0xcd0], esi
jne 0x436d0d
cmp byte [edi], 0
jne 0x436d0d
movzx eax, word [edi + 4]
cmp eax, dword [ebp - 0xcdc]
jne 0x436d0d
movzx eax, word [edi + 6]
mov edi, dword [ebp - 0xce0]
cmp eax, edi
jg 0x436d0d
push str.ProbeForSubnet:_received_ICMP_reply
push 0x10
call fcn.004439a0
add esp, 8
jmp 0x436cd2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.ProbeForSubnet:_socket_select___error_using_address__s:__d
push 1
call fcn.004439a0
add esp, 0x10
inc ebx
cmp ebx, 0x100
jl 0x436a71
push dword [ebp - 0xcd8]
call dword [sym.imp.WS2_32.dll_closesocket]
push str.ProbeForSubnet:_didnt_find_suitable_address_in_subnet
push 1
call fcn.004439a0
add esp, 8
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push str.ProbeForSubnet:_ICMP_reply_is_not_a_response_to_our_ping
push 2
call fcn.004439a0
add esp, 8
jmp 0x436d56
push str.ProbeForSubnet:_Packet_too_small_to_be_ICMP
push 2
call fcn.004439a0
add esp, 8
jmp 0x436d56
push str.ProbeForSubnet:_Packet_too_small_to_be_IP
push 2
call fcn.004439a0
add esp, 8
jmp 0x436d56
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.ProbeForSubnet:_receive_failed:__d
push 2
call fcn.004439a0
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.ProbeForSubnet:_Ping_timeout__using_address__s
push 2
call fcn.004439a0
mov eax, dword [ebp - 0xce4]
add esp, 0xc
push dword [ebp - 0xcd8]
mov dword [eax], esi
call dword [sym.imp.WS2_32.dll_closesocket]
pop esi
pop edi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov ebx, eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp ebx, 0x2751
je 0x436dc6
cmp ebx, 0x2743
je 0x436dc6
push ebx
push str.ProbeForSubnet:_Cound_not_send_ping:_0x_08x
push 1
call fcn.004439a0
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.ProbeForSubnet:_OS_says_host_net_unreachable__so_assuming_okay_to_use__s
push 2
call fcn.004439a0
mov eax, dword [ebp - 0xce4]
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov dword [eax], esi
mov eax, 1
pop esi
pop edi
pop ebx
call fcn.00401bf1
mov esp, ebp
pop ebp
ret