Function at 0x439560
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 [0x4ed018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xcd8], ebx
call sub.KERNEL32.dll_GetCurrentProcessId
movzx eax, ax
push 0x400
mov dword [ebp - 0xcd4], eax
lea eax, [ebp - 0x404]
push 0
push eax
mov dword [ebp - 0xccc], 0
call fcn.00411960
add esp, 0xc
test ebx, ebx
jne 0x4395cf
push str.ProbeForSubnet:_invalid_parameter
push 1
call fcn.00446b80
add esp, 8
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xcb8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x439606
push eax
push str.ProbeForSubnet:_WSAStartup_failed__error__d
push 1
call fcn.00446b80
add esp, 0xc
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push 1
push 3
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0xcd0], eax
cmp eax, 0xffffffff
jne 0x439644
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ProbeForSubnet:_Could_not_create_socket__error__d
push 1
call fcn.00446b80
add esp, 0xc
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push esi
push edi
push str.ProbeForSubnet:_socket_created
push 0x10
call fcn.00446b80
mov ax, word [ebp + 8]
xor esi, esi
add esp, 8
movsx edi, ax
mov ecx, 0xffffc0a8
mov edx, 2
cmp ax, cx
lfence
cmove esi, edx
shl edi, 8
mov eax, edi
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 0x439674
push 0xffffff00
call dword [sym.imp.WS2_32.dll_htonl]
push eax
lea eax, [ebp - 0x404]
push 0x100
push eax
call fcn.00439aa0
push 0
call fcn.004846e0
push eax
call fcn.00442f30
add esp, 0x14
mov edi, 0x200
call fcn.00442eb0
movzx esi, al
call fcn.00442eb0
movzx edx, al
mov eax, dword [ebp + esi*4 - 0x404]
mov ecx, dword [ebp + edx*4 - 0x404]
mov dword [ebp + esi*4 - 0x404], ecx
mov dword [ebp + edx*4 - 0x404], eax
sub edi, 1
jne 0x4396c4
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [ebp + ebx*4 - 0x404]
test eax, eax
je 0x43995e
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 - 0xb28]
push 0
push eax
call fcn.00411960
mov eax, dword [ebp - 0xcd4]
lea ecx, [ebp - 0xb28]
mov word [ebp - 0xb24], ax
add esp, 0xc
xor eax, eax
mov word [ebp - 0xb22], di
mov byte [ebp - 0xb28], 8
xor edx, edx
mov word [ebp - 0xb26], ax
mov edi, 0x20
movzx eax, word [ecx]
lea ecx, [ecx + 2]
add edx, eax
sub edi, 1
jne 0x439776
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 - 0xb26], ax
mov eax, 2
push 0x10
movups xmmword [ebp - 0x414], xmm0
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x414]
push eax
push edi
mov edi, dword [ebp - 0xcd0]
lea eax, [ebp - 0xb28]
push 0x40
push eax
push edi
mov dword [ebp - 0x410], esi
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0x40
jne 0x439a28
mov ecx, dword [ebp - 0xccc]
mov eax, ecx
push dword [ebp - 0xcd4]
inc ecx
push eax
push esi
mov dword [ebp - 0xccc], ecx
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.00446b80
add esp, 0x14
mov dword [ebp - 0x514], edi
lea eax, [ebp - 0xce4]
mov dword [ebp - 0x518], 1
mov dword [ebp - 0xce4], 3
mov dword [ebp - 0xce0], 0
push eax
push 0
push 0
lea eax, [ebp - 0x518]
push eax
push 0xffffffffffffffff
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x43993a
test eax, eax
je 0x4399ec
push str.ProbeForSubnet:_select_says_something_is_ready
push 0x10
call fcn.00446b80
add esp, 8
mov dword [ebp - 0xcdc], 0x10
lea eax, [ebp - 0xcdc]
push eax
lea eax, [ebp - 0xcc8]
push eax
push 0
push 0x60e
lea eax, [ebp - 0xb28]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edx, eax
test edx, edx
jle 0x4399d6
cmp edx, 0x14
jb 0x4399c4
movzx ecx, byte [ebp - 0xb28]
and ecx, 0xf
shl ecx, 2
lea eax, [ecx + 8]
cmp edx, eax
jl 0x4399b2
lea edi, [ebp - 0xb28]
add edi, ecx
lfence
movzx eax, word [edi + 6]
push eax
movzx eax, word [edi + 4]
push eax
movzx eax, byte [edi]
push eax
push dword [ebp - 0xcc4]
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.00446b80
add esp, 0x18
cmp dword [ebp - 0xcc4], esi
jne 0x43999a
cmp byte [edi], 0
jne 0x43999a
movzx eax, word [edi + 4]
cmp eax, dword [ebp - 0xcd4]
jne 0x43999a
movzx eax, word [edi + 6]
mov edi, dword [ebp - 0xccc]
cmp eax, edi
jg 0x43999a
push str.ProbeForSubnet:_received_ICMP_reply
push 0x10
call fcn.00446b80
add esp, 8
jmp 0x43995e
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.00446b80
mov edi, dword [ebp - 0xccc]
add esp, 0x10
inc ebx
cmp ebx, 0x100
jl 0x439700
mov eax, dword [ebp - 0xcd0]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push str.ProbeForSubnet:_didnt_find_suitable_address_in_subnet
push 1
call fcn.00446b80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0xcd0]
mov eax, str.ProbeForSubnet:_ICMP_reply_is_not_a_response_to_our_ping
push eax
push 2
call fcn.00446b80
add esp, 8
jmp 0x4399ec
mov eax, str.ProbeForSubnet:_Packet_too_small_to_be_ICMP
push eax
push 2
call fcn.00446b80
add esp, 8
jmp 0x4399ec
mov eax, str.ProbeForSubnet:_Packet_too_small_to_be_IP
push eax
push 2
call fcn.00446b80
add esp, 8
jmp 0x4399ec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.ProbeForSubnet:_receive_failed:__d
push 2
call fcn.00446b80
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.00446b80
mov eax, dword [ebp - 0xcd8]
add esp, 0xc
push edi
mov dword [eax], esi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0xcd0]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp edi, 0x2751
je 0x439a5d
cmp edi, 0x2743
je 0x439a5d
push edi
push str.ProbeForSubnet:_Cound_not_send_ping:_0x_08x
push 1
call fcn.00446b80
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.00446b80
mov eax, dword [ebp - 0xcd8]
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
mov dword [eax], esi
mov eax, 1
pop esi
pop ebx
call fcn.00401bd5
mov esp, ebp
pop ebp
ret